Fixes #1790, also refactoring of perspective implementation
authorn.hoffmann <n.hoffmann@localhost>
Fri, 7 Jan 2011 16:39:21 +0000 (16:39 +0000)
committern.hoffmann <n.hoffmann@localhost>
Fri, 7 Jan 2011 16:39:21 +0000 (16:39 +0000)
21 files changed:
.gitattributes
taxeditor-application/plugin.xml
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/Perspective.java [deleted file]
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/BulkEditing.java [new file with mode: 0644]
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/Default.java [new file with mode: 0644]
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/PolytomousKey.java [new file with mode: 0644]
taxeditor-bulkeditor/plugin.xml
taxeditor-editor/META-INF/MANIFEST.MF
taxeditor-editor/plugin.xml
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/AbstractGroupedContainer.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/AcceptedNameContainer.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/ConceptContainer.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/MisapplicationContainer.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/RulerWithIcon.java
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/SynonymContainer.java
taxeditor-feature-product/build.properties
taxeditor-navigation/META-INF/MANIFEST.MF
taxeditor-store/icons/nominval_nud_no_bg.gif [new file with mode: 0644]
taxeditor-store/plugin.xml
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java

index 871ad2801cde1d16d8833113b4be6e6111d92157..d13fe3a3788f65cfd6996c426b62f38d5f5cd580 100644 (file)
@@ -40,10 +40,12 @@ taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalAboutPlat
 taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalHelpHandler.java -text
 taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/OpenExternalParserHelpHandler.java -text
 taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/P2Util.java -text
-taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/Perspective.java -text
 taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/SaveAllHandler.java -text
 taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/SaveHandler.java -text
 taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/TaxonomicEditorPlugin.java -text
+taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/BulkEditing.java -text
+taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/Default.java -text
+taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/PolytomousKey.java -text
 taxeditor-application/src/main/resources/log4j.properties -text
 taxeditor-bulkeditor/META-INF/MANIFEST.MF -text
 taxeditor-bulkeditor/build.properties -text
@@ -920,6 +922,7 @@ taxeditor-store/icons/move.gif -text
 taxeditor-store/icons/move_no_bg.gif -text
 taxeditor-store/icons/new_child.gif -text
 taxeditor-store/icons/newprj_wiz.gif -text
+taxeditor-store/icons/nominval_nud_no_bg.gif -text
 taxeditor-store/icons/open.gif -text
 taxeditor-store/icons/orthovariant.gif -text
 taxeditor-store/icons/orthovariant_no_bg.gif -text
index 7174514d694b6d6df678ca033f007801737428c0..0d3cc5489decfd66ff4991ac0341290fc850caed 100644 (file)
    <extension\r
          point="org.eclipse.ui.perspectives">\r
       <perspective\r
-            class="eu.etaxonomy.taxeditor.Perspective"\r
-            id="eu.etaxonomy.taxeditor.application.perspective"\r
+            class="eu.etaxonomy.taxeditor.perspective.Taxonomic"\r
+            id="eu.etaxonomy.taxeditor.application.perspective.taxonomic"\r
             name="Taxonomic">\r
       </perspective>\r
       <perspective\r
-            class="eu.etaxonomy.taxeditor.Perspective"\r
-            id="eu.etaxonomy.taxeditor.application.perspective.descriptive"\r
-            name="Descriptive">\r
+            class="eu.etaxonomy.taxeditor.perspective.BulkEditing"\r
+            id="eu.etaxonomy.taxeditor.application.perspective.bulkeditor"\r
+            name="Bulk Editing">\r
+      </perspective>\r
+      <perspective\r
+            class="eu.etaxonomy.taxeditor.perspective.PolytomousKey"\r
+            id="eu.etaxonomy.taxeditor.application.perspective.polytomous"\r
+            name="Polytomous Key">\r
       </perspective>\r
    </extension>\r
    <!--extension\r
             restorable="true">\r
       </view>\r
    </extension-->\r
+ <extension\r
+       point="org.eclipse.ui.perspectiveExtensions">\r
+    <perspectiveExtension\r
+          targetID="eu.etaxonomy.taxeditor.application.perspective.bulkeditor">\r
+       <showInPart\r
+             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
+       </showInPart>\r
+       <showInPart\r
+             id="eu.etaxonomy.taxeditor.bulkeditor.referencingobjectsview">\r
+       </showInPart>\r
+    </perspectiveExtension>\r
+    <perspectiveExtension\r
+          targetID="eu.etaxonomy.taxeditor.application.perspective.polytomous">\r
+       <showInPart\r
+             id="eu.etaxonomy.taxeditor.editor.forms.detailsView">\r
+       </showInPart>\r
+    </perspectiveExtension>\r
+ </extension>\r
    <extension\r
          point="org.eclipse.ui.menus">\r
       <menuContribution\r
index e8d9d8dabd9ac67b66a2ace0bc714a68eeb0143c..cac70d6a0db1f5d49e07a50fae9e73c783499688 100644 (file)
@@ -1,11 +1,11 @@
 package eu.etaxonomy.taxeditor;
 
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.application.IWorkbenchConfigurer;
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchAdvisor;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 
+
 /**
  * <p>ApplicationWorkbenchAdvisor class.</p>
  *
@@ -14,8 +14,6 @@ import org.eclipse.ui.application.WorkbenchWindowAdvisor;
  */
 public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 
-       private static final String PERSPECTIVE_ID = Perspective.ID;
-
        /*
         * (non-Javadoc)
         * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
@@ -37,7 +35,7 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
         * @return a {@link java.lang.String} object.
         */
        public String getInitialWindowPerspectiveId() {
-               return PERSPECTIVE_ID;
+               return "eu.etaxonomy.taxeditor.application.perspective.taxonomic";
        }
        
        /*
diff --git a/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/Perspective.java b/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/Perspective.java
deleted file mode 100644 (file)
index adbe9c3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-package eu.etaxonomy.taxeditor;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-import org.eclipse.ui.progress.IProgressConstants;
-
-import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
-import eu.etaxonomy.taxeditor.navigation.search.SearchResultView;
-
-/**
- * <p>Perspective class.</p>
- *
- * @author n.hoffmann
- * @version $Id: $
- */
-public class Perspective implements IPerspectiveFactory {
-
-       /** Constant <code>ID="eu.etaxonomy.taxeditor.application.pers"{trunked}</code> */
-       public static final String ID = "eu.etaxonomy.taxeditor.application.perspective";
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
-        */
-       /** {@inheritDoc} */
-       public void createInitialLayout(IPageLayout layout) {
-               IFolderLayout navigationFolder = layout.createFolder("navigation", IPageLayout.LEFT, 0.25f,
-                           layout.getEditorArea());
-               
-               // Note: ":*" is what allows us to call multiple searchResultView's with unique secondaryIds;
-               //      this can only be done here, with a placeholder, not in plugin.xml
-               navigationFolder.addPlaceholder(SearchResultView.ID + ":*");
-               navigationFolder.addView(TaxonNavigator.ID);
-               
-               navigationFolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
-       }
-}
diff --git a/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/BulkEditing.java b/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/BulkEditing.java
new file mode 100644 (file)
index 0000000..354e4a8
--- /dev/null
@@ -0,0 +1,33 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.perspective;
+
+import org.eclipse.ui.IPageLayout;
+
+import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
+import eu.etaxonomy.taxeditor.editor.view.detail.DetailsViewPart;
+import eu.etaxonomy.taxeditor.editor.view.supplementaldata.SupplementalDataViewPart;
+
+/**
+ * @author n.hoffmann
+ *
+ */
+public class BulkEditing extends Default {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+        */
+       @Override
+       public void createInitialLayout(IPageLayout layout) {
+               
+               layout.addView(DetailsViewPart.ID, IPageLayout.RIGHT, 0.5f, layout.getEditorArea());
+               
+               layout.addView(SupplementalDataViewPart.ID, IPageLayout.BOTTOM, 0.3f, DetailsViewPart.ID);
+               
+               layout.addView(ReferencingObjectsView.ID, IPageLayout.BOTTOM, 0.3f, SupplementalDataViewPart.ID);
+               
+               createAdditionalFolder(layout, layout.getEditorArea());
+       }
+
+}
diff --git a/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/Default.java b/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/Default.java
new file mode 100644 (file)
index 0000000..0cc9fec
--- /dev/null
@@ -0,0 +1,37 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.perspective;
+
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.IPlaceholderFolderLayout;
+import org.eclipse.ui.progress.IProgressConstants;
+
+import eu.etaxonomy.taxeditor.datasource.view.CdmDataSourceViewPart;
+import eu.etaxonomy.taxeditor.user.view.UserManagerView;
+
+/**
+ * @author n.hoffmann
+ *
+ */
+public abstract class Default implements IPerspectiveFactory {
+
+       protected IPlaceholderFolderLayout folderAdditional;
+       
+       public static final String ADDITIONAL = "additional";
+       
+       /**
+        * 
+        * @param layout
+        * @param refId
+        */
+       public void createAdditionalFolder(IPageLayout layout, String refId) {
+               folderAdditional = layout.createPlaceholderFolder(ADDITIONAL, IPageLayout.BOTTOM, 0.25f, refId);
+               
+               folderAdditional.addPlaceholder(CdmDataSourceViewPart.ID);
+               folderAdditional.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
+               folderAdditional.addPlaceholder(UserManagerView.ID);
+       }
+
+}
diff --git a/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/PolytomousKey.java b/taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/PolytomousKey.java
new file mode 100644 (file)
index 0000000..6c4f4fb
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * 
+ */
+package eu.etaxonomy.taxeditor.perspective;
+
+import org.eclipse.ui.IPageLayout;
+
+import eu.etaxonomy.taxeditor.editor.view.detail.DetailsViewPart;
+import eu.etaxonomy.taxeditor.editor.view.supplementaldata.SupplementalDataViewPart;
+import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
+
+/**
+ * @author n.hoffmann
+ *
+ */
+public class PolytomousKey extends Default {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+        */
+       @Override
+       public void createInitialLayout(IPageLayout layout) {
+               layout.addView(PolytomousKeyViewPart.ID, IPageLayout.LEFT, 0.25f, layout.getEditorArea());
+
+               layout.addView(DetailsViewPart.ID, IPageLayout.RIGHT, 0.25f, layout.getEditorArea());
+               
+               layout.addView(SupplementalDataViewPart.ID, IPageLayout.BOTTOM, 0.25f, DetailsViewPart.ID);
+               
+               createAdditionalFolder(layout, layout.getEditorArea());
+       }
+
+}
index e57dd5f2b43bc91e02bec5f247e1c67916803bea..8131754dfa0783b67aad9d98ada85cec79a6d133 100644 (file)
          </run>\r
       </application>\r
    </extension>\r
-   <extension\r
-         point="org.eclipse.ui.perspectives">\r
-      <perspective\r
-            class="eu.etaxonomy.taxeditor.bulkeditor.Perspective"\r
-            id="eu.etaxonomy.taxeditor.bulkeditor.perspective"\r
-            name="Bulk Editing">\r
-      </perspective>\r
-   </extension>\r
    <extension\r
          point="org.eclipse.ui.editors">\r
       <editor\r
             restorable="false">\r
       </view>\r
    </extension>   \r
-   <extension\r
-         point="org.eclipse.ui.perspectiveExtensions">\r
-      <perspectiveExtension\r
-            targetID="eu.etaxonomy.taxeditor.bulkeditor.perspective">\r
-         <view\r
-               closeable="true"\r
-               id="eu.etaxonomy.taxeditor.editor.forms.detailsView"\r
-               minimized="false"\r
-               moveable="true"\r
-               ratio="0.8"\r
-               relationship="right"\r
-               relative="org.eclipse.ui.editorss"\r
-               showTitle="true"\r
-               standalone="false"\r
-               visible="true">\r
-         </view>\r
-         <view\r
-               closeable="true"\r
-               id="eu.etaxonomy.taxeditor.bulkeditor.referencingobjectsview"\r
-               minimized="false"\r
-               moveable="true"\r
-               ratio="0.4"\r
-               relationship="bottom"\r
-               relative="org.eclipse.ui.editorss"\r
-               showTitle="true"\r
-               standalone="true"\r
-               visible="true">\r
-         </view>\r
-      </perspectiveExtension>\r
-   </extension>\r
    <extension\r
          point="org.eclipse.core.expressions.definitions">\r
       <definition\r
index b50aa7fb7be62a9d6ff610e10ba1a1cb380f0048..40ce65492db7d4c423656f33e2acf3e529bc8c5d 100644 (file)
@@ -18,6 +18,10 @@ Export-Package: eu.etaxonomy.taxeditor.dialogs.filteredSelection,
  eu.etaxonomy.taxeditor.editor.name.handler,
  eu.etaxonomy.taxeditor.editor.newWizard,
  eu.etaxonomy.taxeditor.editor.reference,
+ eu.etaxonomy.taxeditor.editor.view.descriptive,
+ eu.etaxonomy.taxeditor.editor.view.detail,
+ eu.etaxonomy.taxeditor.editor.view.media,
+ eu.etaxonomy.taxeditor.editor.view.supplementaldata,
  eu.etaxonomy.taxeditor.forms,
  eu.etaxonomy.taxeditor.forms.internal,
  eu.etaxonomy.taxeditor.forms.selection,
index 339a358f8bee480f24a96f3073f00fdd6e364c15..a54e298ac9129ee64bb85bd598cc3ba4cc28f097 100644 (file)
             </adapter>
          </factory>
       </extension>
+      <extension
+            point="org.eclipse.ui.newWizards">
+         <wizard
+               category="eu.etaxonomy.taxeditor.new.category.cdm"
+               class="eu.etaxonomy.taxeditor.editor.newWizard.NewReferenceWizard"
+               hasPages="true"
+               id="eu.etaxonomy.taxeditor.new.reference"
+               name="Reference">
+         </wizard>
+         <wizard
+               category="eu.etaxonomy.taxeditor.new.category.cdm"
+               class="eu.etaxonomy.taxeditor.editor.newWizard.NewNonViralNameWizard"
+               hasPages="true"
+               id="eu.etaxonomy.taxeditor.new.nonViralName"
+               name="Name">
+         </wizard>
+         <wizard
+               category="eu.etaxonomy.taxeditor.new.category.cdm"
+               class="eu.etaxonomy.taxeditor.editor.newWizard.NewTeamWizard"
+               hasPages="true"
+               id="eu.etaxonomy.taxeditor.new.team"
+               name="Team">
+         </wizard>
+         <wizard
+               category="eu.etaxonomy.taxeditor.new.category.cdm"
+               class="eu.etaxonomy.taxeditor.editor.newWizard.NewPersonWizard"
+               hasPages="true"
+               id="eu.etaxonomy.taxeditor.new.person"
+               name="Person">
+         </wizard>
+         <wizard
+               category="eu.etaxonomy.taxeditor.new.category.cdm"
+               class="eu.etaxonomy.taxeditor.editor.newWizard.NewDerivedUnitBaseWizard"
+               hasPages="true"
+               id="eu.etaxonomy.taxeditor.new.specimen"
+               name="Specimen">
+         </wizard>
+         <wizard
+               category="eu.etaxonomy.taxeditor.new.category.cdm"
+               class="eu.etaxonomy.taxeditor.editor.newWizard.NewPolytomousKeyWizard"
+               hasPages="true"
+               id="eu.etaxonomy.taxeditor.new.key.polytomous"
+               name="Polytomous Key">
+         </wizard>
+      </extension>
    <extension
          point="org.eclipse.ui.editors">
       <editor
                restorable="true">
          </view>
       </extension>
-   <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="eu.etaxonomy.taxeditor.application.perspective">
-         <view
-               id="eu.etaxonomy.taxeditor.editor.forms.detailsView"
-               ratio="0.7"
-               relationship="right"
-               relative="org.eclipse.ui.editorss">
-         </view>
-         <view
-               id="eu.etaxonomy.taxeditor.editor.view.description"
-               relationship="bottom"
-               relative="org.eclipse.ui.editorss">
-         </view>
-         <view
-               id="eu.etaxonomy.taxeditor.editor.view.media"
-               relationship="bottom"
-               relative="org.eclipse.ui.editorss">
-         </view>
-         <view
-               id="eu.etaxonomy.taxeditor.editor.view.supplementalData"
-               relationship="bottom"
-               relative="eu.etaxonomy.taxeditor.editor.forms.detailsView">
-         </view>
-      </perspectiveExtension>
-   </extension>
    <extension
          point="org.eclipse.ui.elementFactories">
       <factory
                name="Move Image Up In List">
          </command>
       </extension>
-      <extension
-            point="org.eclipse.ui.newWizards">
-         <wizard
-               category="eu.etaxonomy.taxeditor.new.category.cdm"
-               class="eu.etaxonomy.taxeditor.editor.newWizard.NewReferenceWizard"
-               hasPages="true"
-               id="eu.etaxonomy.taxeditor.new.reference"
-               name="Reference">
-         </wizard>
-         <wizard
-               category="eu.etaxonomy.taxeditor.new.category.cdm"
-               class="eu.etaxonomy.taxeditor.editor.newWizard.NewNonViralNameWizard"
-               hasPages="true"
-               id="eu.etaxonomy.taxeditor.new.nonViralName"
-               name="Name">
-         </wizard>
-         <wizard
-               category="eu.etaxonomy.taxeditor.new.category.cdm"
-               class="eu.etaxonomy.taxeditor.editor.newWizard.NewTeamWizard"
-               hasPages="true"
-               id="eu.etaxonomy.taxeditor.new.team"
-               name="Team">
-         </wizard>
-         <wizard
-               category="eu.etaxonomy.taxeditor.new.category.cdm"
-               class="eu.etaxonomy.taxeditor.editor.newWizard.NewPersonWizard"
-               hasPages="true"
-               id="eu.etaxonomy.taxeditor.new.person"
-               name="Person">
-         </wizard>
-         <wizard
-               category="eu.etaxonomy.taxeditor.new.category.cdm"
-               class="eu.etaxonomy.taxeditor.editor.newWizard.NewDerivedUnitBaseWizard"
-               hasPages="true"
-               id="eu.etaxonomy.taxeditor.new.specimen"
-               name="Specimen">
-         </wizard>
-         <wizard
-               category="eu.etaxonomy.taxeditor.new.category.cdm"
-               class="eu.etaxonomy.taxeditor.editor.newWizard.NewPolytomousKeyWizard"
-               hasPages="true"
-               id="eu.etaxonomy.taxeditor.new.key.polytomous"
-               name="Polytomous Key">
-         </wizard>
-      </extension>
       <extension
             point="org.eclipse.ui.menus">
          <menuContribution
index b3c54bc67ae06669a1c41a3303b2a8c42852809d..0befdbae6bd109333b0d94b8b763b1ffad6be359 100644 (file)
@@ -133,6 +133,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                        ImageResources.HOMOTYPIC_SYN_ORIGINAL_ICON);
        /** Constant <code>HETEROTYPIC_SYNONYM_ICON</code> */
        public static final Image HETEROTYPIC_SYNONYM_ICON = ImageResources.getImage(ImageResources.HETEROTYPIC_SYN_ICON);
+       public static final Image INVALID_OR_NUDUM_NAME_ICON = ImageResources.getImage(ImageResources.NOM_INVAL_NUD_SYN_ICON);
        /** Constant <code>HETEROTYPIC_SYNONYM_ORIGINAL_COMBINATION_ICON</code> */
        public static final Image HETEROTYPIC_SYNONYM_ORIGINAL_COMBINATION_ICON = ImageResources.getImage(
                        ImageResources.HETEROTYPIC_SYN_ORIGINAL_ICON);
@@ -327,6 +328,8 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                
 //             showNameRelations();
                
+               updateIcon();
+               
                String text = NameHelper.getDisplayNameWithRef(getData());
                
                if (text.length() == 0) {
@@ -379,11 +382,19 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
                
                updateNonEditableInfo();
                
+               updateIcon();
 //             placeCursor();
                
                isFreeTextEnabled();
        }
 
+       /**
+        * 
+        */
+       protected abstract void updateIcon();
+
+
+
        /**
         * <p>updateNonEditableInfo</p>
         */
@@ -474,7 +485,7 @@ abstract public class AbstractGroupedContainer<T extends TaxonBase> implements I
         * @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
         */
        public TaxonNameBase getName(){
-               return getTaxonBase().getName();
+               return (TaxonNameBase) HibernateProxyHelper.deproxy(getTaxonBase().getName());
        }
 
        /**
index 0b88b75cc6ca7a9cd2e8fc0541d911457dfa7285..23b556d5157386ae5f91a9e176f74f8c62d226e2 100644 (file)
@@ -8,9 +8,7 @@
 */
 package eu.etaxonomy.taxeditor.editor.name;
 
-import org.apache.log4j.Logger;
 import org.eclipse.swt.graphics.Font;
-import org.eclipse.ui.forms.IManagedForm;
 
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
@@ -24,9 +22,6 @@ import eu.etaxonomy.taxeditor.preference.Resources;
  * @version 1.0
  */
 public class AcceptedNameContainer extends AbstractGroupedContainer<Taxon> {
-       @SuppressWarnings("unused")
-       private static final Logger logger = Logger
-                       .getLogger(AcceptedNameContainer.class);
        
        /**
         * <p>Constructor for AcceptedNameContainer.</p>
@@ -43,7 +38,6 @@ public class AcceptedNameContainer extends AbstractGroupedContainer<Taxon> {
         * <p>initializeComposite</p>
         */
        public void initializeComposite(){
-               setIcon(ACCEPTED_ICON);
                setFont(getViewerFont());
                setIndent(ACCEPTED_INDENT);
                
@@ -64,4 +58,10 @@ public class AcceptedNameContainer extends AbstractGroupedContainer<Taxon> {
                // not needed
        }
 
+
+       @Override
+       protected void updateIcon() {
+               setIcon(ACCEPTED_ICON);         
+       }
+
 }
index 7aa7d1a2a34101b7714a086bf54bdeac51318238..f817c1caf0d08f179782740b84651c6aaff5ae68 100644 (file)
@@ -49,7 +49,6 @@ public class ConceptContainer extends AbstractGroupedContainer<Taxon> {
        protected void initializeComposite() {
                
                setIsDraggable(true);
-               setIcon(CONCEPT_ICON);
                setFont(getViewerFont());
                setIndent(CONCEPT_INDENT);
                
@@ -58,6 +57,11 @@ public class ConceptContainer extends AbstractGroupedContainer<Taxon> {
                initTextViewer();
        }
        
+       @Override
+       protected void updateIcon() {
+               setIcon(CONCEPT_ICON);
+       }
+       
        private void showRelationshipType() {
                setNonEditableInfo(relationshipType.getLabel(), true);
        }
index 20621a0ff0bebb71d72b35477c1d1fc2444af435..f6516ceacb58c31fcb3ccd95c14f8fd07acb024b 100644 (file)
@@ -43,7 +43,6 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
        @Override
        protected void initializeComposite() {
                setIsDraggable(true);
-               setIcon(MISAPPLIEDNAME_ICON);
                setFont(getViewerFont());
                setIndent(MISAPPLIEDNAME_INDENT);
                
@@ -52,6 +51,11 @@ public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> {
                initTextViewer();
        }
 
+       @Override
+       protected void updateIcon() {
+               setIcon(MISAPPLIEDNAME_ICON);
+       }
+       
        private void showSec() {
                if (getMisappliedName() == null) {
                        return;
index 2e7e824dcad48272c71e40747c77abfb4fb7f452..16559fd88a381bd5785a0b513490113f29180013 100644 (file)
@@ -654,6 +654,7 @@ public class RulerWithIcon implements IVerticalRuler, IVerticalRulerExtension {
         */
        public void setIcon(Image icon) {
                this.icon = icon;
+               redraw();
        }
 }
        
index 0d0ab99fe79bc5827782dc84cadc6be9cb70e6b0..813ee4118af46fdfaeb2c2e32d7de6bbcff0b054 100644 (file)
@@ -9,10 +9,13 @@
 
 package eu.etaxonomy.taxeditor.editor.name;
 
-import org.apache.log4j.Logger;
+import java.util.Set;
+
 import org.eclipse.swt.graphics.Font;
 
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
+import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
@@ -26,9 +29,6 @@ import eu.etaxonomy.taxeditor.preference.Resources;
  * @version 1.0
  */
 public class SynonymContainer extends AbstractGroupedContainer<Synonym> {
-       @SuppressWarnings("unused")
-       private static final Logger logger = Logger
-                       .getLogger(SynonymContainer.class);
        
        /**
         * <p>Constructor for SynonymContainer.</p>
@@ -51,27 +51,44 @@ public class SynonymContainer extends AbstractGroupedContainer<Synonym> {
                setFont(getViewerFont());
                setIndent(SYNONYM_INDENT);
                
-               TaxonNameBase name = getSynonym().getName();
-               
-               if(name == null){
-                       logger.error("Synonym with a null name detected. This should never happen.");
+               if(getName() == null){
+                       EditorUtil.warn(getClass(), "Synonym with a null name detected. This should never happen.");
                }
                
+               initTextViewer();
+       }
+       
+       protected void updateIcon(){
+               TaxonNameBase name = getName();
+               
                if (isHomotypic()) {
                        if (name.isGroupsBasionym()) {
                                setIcon(HOMOTYPIC_SYNONYM_ORIGINAL_COMBINATION_ICON);
                        } else {
                                setIcon(HOMOTYPIC_SYNONYM_ICON);
                        }       
-               } else {
-                       if (name.isGroupsBasionym()) {
-                               setIcon(HETEROTYPIC_SYNONYM_ORIGINAL_COMBINATION_ICON);
-                       } else {
-                               setIcon(HETEROTYPIC_SYNONYM_ICON);
+                       
+                       return;
+               } 
+               
+               if(! name.getStatus().isEmpty()){
+               
+                       Set<NomenclaturalStatus> allStatus = name.getStatus();
+                       
+                       for (NomenclaturalStatus status : allStatus){
+                               if(status.getType() != null && (status.getType().equals(NomenclaturalStatusType.INVALID()) || status.getType().equals(NomenclaturalStatusType.NUDUM()))){
+                                       setIcon(INVALID_OR_NUDUM_NAME_ICON);
+                                       return;
+                               }
                        }
                }
+                       
                
-               initTextViewer();
+               if (name.isGroupsBasionym()) {
+                       setIcon(HETEROTYPIC_SYNONYM_ORIGINAL_COMBINATION_ICON);
+               } else {
+                       setIcon(HETEROTYPIC_SYNONYM_ICON);
+               }               
        }
        
        private boolean isHomotypic() {
index 3afebf10a3c46d7df1cacd5afbd5d786c406e946..e10104d9e67165a498d54a65308b541f25456873 100644 (file)
@@ -1,3 +1,3 @@
-p2.gathering = true
 bin.includes = plugin_customization.ini,\
                feature.xml
+p2.gathering = true
index c5c904efd27492835786a41f00dd00a7da7cd76b..9124ce60742890835fba9953964393e13f5d0936 100644 (file)
@@ -8,6 +8,7 @@ Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.navigation,
  eu.etaxonomy.taxeditor.navigation.handler,
  eu.etaxonomy.taxeditor.navigation.internal,
+ eu.etaxonomy.taxeditor.navigation.key.polytomous,
  eu.etaxonomy.taxeditor.navigation.navigator,
  eu.etaxonomy.taxeditor.navigation.search,
  eu.etaxonomy.taxeditor.wizard
diff --git a/taxeditor-store/icons/nominval_nud_no_bg.gif b/taxeditor-store/icons/nominval_nud_no_bg.gif
new file mode 100644 (file)
index 0000000..c2c8faf
Binary files /dev/null and b/taxeditor-store/icons/nominval_nud_no_bg.gif differ
index e1099da50bfd25b3d7209a620eaceb1967fd5ea6..248134d02b4e34111f548e985b2aa8f44e84cacc 100644 (file)
             name="Toggle User Enablement">
       </command>
    </extension>
-   <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="eu.etaxonomy.taxeditor.application.perspective">
-         <view
-               id="eu.etaxonomy.taxeditor.store.datasource.datasourceView"
-               minimized="false"
-               ratio="0.8"
-               relationship="bottom"
-               relative="org.eclipse.ui.editorss"
-               visible="false">
-         </view>
-         <view
-               id="eu.etaxonomy.taxeditor.store.userManagerView"
-               minimized="false"
-               ratio="0.8"
-               relationship="bottom"
-               relative="org.eclipse.ui.editorss"
-               visible="false">
-         </view>
-      </perspectiveExtension>
-   </extension>
    <extension
          point="org.eclipse.ui.importWizards">
       <category
index 9cb90b87172034c819704d001f7bd74b0a311764..0658c7cfe9742d2fc6cb89d9312c27f59a665973 100644 (file)
@@ -70,6 +70,7 @@ public class ImageResources {
        public static final String HOMOTYPIC_SYN_ORIGINAL_ICON = "homotypic_syn_original_icon";
        /** Constant <code>HETEROTYPIC_SYN_ICON="heterotypic_syn_icon"</code> */
        public static final String HETEROTYPIC_SYN_ICON = "heterotypic_syn_icon";
+       public static final String NOM_INVAL_NUD_SYN_ICON = "nom_inval_nud_syn_icon";
        /** Constant <code>HETEROTYPIC_SYN_ORIGINAL_ICON="heterotypic_syn_original_icon"</code> */
        public static final String HETEROTYPIC_SYN_ORIGINAL_ICON = "heterotypic_syn_original_icon";
        /** Constant <code>MISAPPLIED_NAME_ICON="misapplied_icon"</code> */
@@ -224,20 +225,21 @@ public class ImageResources {
                                "trash.gif");
                registerImage(registry, EDIT_ICON, 
                                "text.gif");
-               registerImage(registry, EDIT_LOGO_ICON, "edit_16x16.ico");
+               registerImage(registry, EDIT_LOGO_ICON, 
+                               "edit_16x16.ico");
                registerImage(registry, WARNING_ICON,
                                "warn_tsk.gif");
                registerImage(registry, BLACK_SQUARE_ICON,
                                "accepted_small.gif");
                registerImage(registry, HOMOTYPIC_SYN_ICON,
                                "homosyn_no_bg.gif");
-               registerImage(registry,
-                               HOMOTYPIC_SYN_ORIGINAL_ICON,
+               registerImage(registry, HOMOTYPIC_SYN_ORIGINAL_ICON,
                                "homosyn_original_no_bg.gif");
                registerImage(registry, HETEROTYPIC_SYN_ICON,
                                "heterosyn_no_bg.gif");
-               registerImage(registry,
-                               HETEROTYPIC_SYN_ORIGINAL_ICON,
+               registerImage(registry, NOM_INVAL_NUD_SYN_ICON, 
+                               "nominval_nud_no_bg.gif");
+               registerImage(registry, HETEROTYPIC_SYN_ORIGINAL_ICON,
                                "heterosyn_original_no_bg.gif");
                registerImage(registry, MISAPPLIED_NAME_ICON,
                                "misapplied_no_bg.gif");
@@ -249,14 +251,16 @@ public class ImageResources {
                                "basionym_no_bg.gif");
                registerImage(registry, ORTHOGRAPHIC_VARIANT_ICON,
                                "orthovariant_no_bg.gif");
-               registerImage(registry, DB_ICON, "db.gif");
+               registerImage(registry, DB_ICON, 
+                               "db.gif");
                registerImage(registry, MOVE_ICON,
                                "correction_change.gif");
                registerImage(registry, ACTIVE_DELETE_ICON,
                                "delete_edit.gif");
                registerImage(registry, SYNONYM_TO_TAXON_ICON,
                                "change.gif");
-               registerImage(registry, OPEN_TAXON_ICON, "open.gif");
+               registerImage(registry, OPEN_TAXON_ICON, 
+                               "open.gif");
                registerImage(registry, ADD_CHILD_TAXON_ICON,
                                "new_child.gif");
                registerImage(registry,