Project

General

Profile

« Previous | Next » 

Revision 4db8d201

Added by Cherian Mathew almost 9 years ago

corrected visibility check for edit authorities editor

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/command/BulkEditorPropertyTester.java
12 12

  
13 13
import org.apache.log4j.Logger;
14 14
import org.eclipse.core.expressions.PropertyTester;
15

  
16 15
import org.eclipse.ui.IEditorInput;
17 16

  
18 17
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
......
36 35

  
37 36
	private static final String IS_MERGING_ENABLED = "isMergingEnabled";
38 37

  
39
	private static final String IS_GROUP_EDITOR = "isGroupEditor";
38
	public static final String IS_GROUP_EDITOR = "isGroupEditor";
40 39
    public static final String IS_DERIVED_UNIT_EDITOR = "isDerivedUnitEditor";
41 40
    public static final String IS_TAXON_EDITOR = "isTaxonEditor";
42 41
    public static final String IS_CONVERT_ENABLED = "isConvertingEnabled";
......
50 49
    public boolean test(Object receiver, String property, Object[] args,
51 50
			Object expectedValue) {
52 51
		BulkEditor bulkEditor = null;
53
		
54
		
52

  
53

  
55 54
		bulkEditor = (BulkEditor) receiver;
56 55
		if (IS_MERGING_ENABLED.equals(property)) {
57 56
			IEditorInput input = bulkEditor.getEditorInput();
......
74 73
        else if(IS_TAXON_EDITOR.equals(property)){
75 74
            return bulkEditor.getEditorInput() instanceof TaxonEditorInput;
76 75
        }
77
		
76

  
78 77
//		if (("isPublishFlagEditingEnabled").equals(property)) {
79 78
//			IEditorInput input = bulkEditor.getEditorInput();
80 79
//			if (input instanceof NameEditorInput) {
eu.etaxonomy.taxeditor.editor/plugin.xml
943 943
               style="push">
944 944
            <visibleWhen>
945 945
               <reference
946
                     definitionId="isGroup">
946
                     definitionId="isGroupEditor">
947 947
               </reference>
948 948
            </visibleWhen>
949 949
         </command>
......
1600 1600
         </with>
1601 1601
      </definition>
1602 1602
      <definition
1603
            id="isGroup">
1603
            id="isGroupEditor">
1604 1604
         <with
1605 1605
               variable="activeEditor">
1606 1606
            <test
1607
                  property="taxeditor-bulkeditor.propertyTester.isGroup">
1607
                  property="taxeditor-bulkeditor.propertyTester.isGroupEditor">
1608 1608
            </test>
1609 1609
         </with>
1610 1610
      </definition>
......
1638 1638
            class="eu.etaxonomy.taxeditor.bulkeditor.command.BulkEditorPropertyTester"
1639 1639
            id="taxeditor-bulkeditor.PropertyTester"
1640 1640
            namespace="taxeditor-bulkeditor.propertyTester"
1641
            properties="isGroup"
1641
            properties="isGroupEditor"
1642 1642
            type="eu.etaxonomy.taxeditor.bulkeditor.BulkEditor">
1643 1643
      </propertyTester>
1644 1644
   </extension>

Also available in: Unified diff