Project

General

Profile

« Previous | Next » 

Revision 8ccf2acc

Added by Katja Luther about 6 years ago

improve deduplication handling and saving in bulkeditor

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorMenuPropertyTester.java
24 24

  
25 25
	private static final String IS_TEAM = "isTeam";
26 26
	private static final String IS_PERSON = "isPerson";
27
	
27
	private static final String IS_TEAM_OR_PERSON = "isTeamOrPerson";
28

  
28 29
	public BulkEditorMenuPropertyTester(){
29 30
	}
30 31
	/**
......
36 37
		if(receiver instanceof IStructuredSelection){
37 38
			IStructuredSelection selection = (IStructuredSelection) receiver;
38 39
			Object selectedElement = selection.getFirstElement();
40
			if (property.equals(IS_TEAM_OR_PERSON) && (selectedElement instanceof Team || selectedElement instanceof Person)){
41
                return true;
42
            }
39 43
			if (property.equals(IS_PERSON) && selectedElement instanceof Person){
40 44
				return true;
41
			} 
45
			}
42 46
			if (property.equals(IS_TEAM) && selectedElement instanceof Team){
43 47
				return true;
44 48
			}
45 49
			return false;
46
		
50

  
47 51
		}
48 52
		return false;
49 53
	}

Also available in: Unified diff