Made preferred nom. code generic.
authorp.ciardelli <p.ciardelli@localhost>
Fri, 11 Sep 2009 15:43:51 +0000 (15:43 +0000)
committerp.ciardelli <p.ciardelli@localhost>
Fri, 11 Sep 2009 15:43:51 +0000 (15:43 +0000)
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchWindowAdvisor.java

index 3049bfb12c08bf66b8d409659148d895ce717c88..12b1369b41c712bf1f043ab685a867d76ef06035 100644 (file)
@@ -18,6 +18,7 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
                return new ApplicationWorkbenchWindowAdvisor(configurer);
        }
 
+       
        /*
         * (non-Javadoc)
         * @see org.eclipse.ui.application.WorkbenchAdvisor#getInitialWindowPerspectiveId()
@@ -35,10 +36,12 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
                                
                // Remembers the user's view layout, window size, window location etc.
                //  for the next time application is started
-               configurer.setSaveAndRestore(true);             
+               configurer.setSaveAndRestore(true);
        }       
        
-
+/**
+ * see:        https://bugs.eclipse.org/bugs/show_bug.cgi?id=234252
+ */
 //     public void initialize(IWorkbenchConfigurer configurer) {
 //
 //             WorkbenchAdapterBuilder.registerAdapters();
@@ -67,4 +70,6 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 //             return workspace.getRoot();
 //     }
 
+       
+
 }
index 39de0ce1f9e362d7f5db3d519b1ba9ed2ccc904a..81b5e8cae90e70824881655f3083d9df014c67a3 100644 (file)
@@ -11,7 +11,9 @@ import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 import org.springframework.security.BadCredentialsException;
 
+import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
 import eu.etaxonomy.taxeditor.dialogs.LoginDialog;
+import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;
 import eu.etaxonomy.taxeditor.preference.InitNomenclaturalCodePrefDialog;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
@@ -52,7 +54,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
                // First time Editor is opened, no nomenclatural code has been set
                if (PreferencesUtil.getPreferredNomenclaturalCode() == null) {
 
-                       logger.debug("No nomencatural code set.");
+                       logger.info("No nomencatural code set.");
                        
                        Shell shell = TaxonomicEditorPlugin.getDefault().getWorkbench()
                                        .getActiveWorkbenchWindow().getShell();
@@ -62,10 +64,10 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
                        dialog.open();
                        
                        // Short message confirming user's choice
-                       String code = PreferencesUtil.getPreferredNomenclaturalCodeAsString();
+                       NomenclaturalCode code = PreferencesUtil.getPreferredNomenclaturalCode();
                        MessageDialog.openInformation(shell, "Nomenclatural code set", 
                                        "The following has been set as your preferred nomenclatural code:\n\n\t" + 
-                                       code + "\n\nYou can change the nomenclatural code at any time in the \"Preferences\" menu.");
+                                       NomenclaturalCodeHelper.getDescription(code) + "\n\nYou can change the nomenclatural code at any time in the \"Preferences\" menu.");
                }               
        }