minor
authorKatja Luther <k.luther@bgbm.org>
Wed, 7 Oct 2015 10:34:54 +0000 (12:34 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 7 Oct 2015 10:34:54 +0000 (12:34 +0200)
12 files changed:
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.editor/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/Messages.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/ChangeConnectionHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/DeleteDataSourceHandler.java

index 6b0f9e75115fe42e7948f56559e5cadc3a893f50..40a9a442b204d56550298b23b38e7186fb9d04bb 100644 (file)
@@ -35,3 +35,7 @@ OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Derivativ
 OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
 OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
 OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
+
+DeleteTaxonBaseHandler_CONFIRM_DELETION=Confirm Deletion
+DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element has to be Synonym, Misapplication or Concept
+DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Are you sure you want to delete the selected taxon?
index e18d567305d6b44fa5f3daf5488d3df50d415854..cf767cd8cc83d6327347fb4a7dc8f300574dfb75 100644 (file)
@@ -35,3 +35,7 @@ OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Derivat-Editor ni
 OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
 OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
 OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
+
+DeleteTaxonBaseHandler_CONFIRM_DELETION=Löschen bestätigen
+DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element muss Synonym, Misapplication oder Konzept sein
+DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Wollen Sie wirklich das ausgewählte Taxon löschen?
index 34684d15d2ba91dc5dd7beb1a0485f12bd276105..5a3fd53ccbb89283cbea0bee450346ab978748aa 100644 (file)
@@ -32,6 +32,9 @@ public class Messages extends NLS {
     public static String DeleteDerivateOperation_CONFIRM;
     public static String DeleteDerivateOperation_DELETE_FAILED;
     public static String DeleteDerivateOperation_REALLY_DELETE;
+    public static String DeleteTaxonBaseHandler_CONFIRM_DELETION;
+    public static String DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT;
+    public static String DeleteTaxonBaseHandler_REALLY_DELETE_TAXON;
     public static String DerivateDropListener_MOVE_TO;
     public static String DerivateView_DERIVATIVE_EDITOR;
     public static String DerivateView_SAVING_HIERARCHY;
index 34119ea2971300778f4819e222816a349e7cb59f..b5851aa77d6fb7574abe2a0e1cab3ac4a1c322af 100644 (file)
@@ -23,6 +23,7 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.Page;
 import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
 import eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation;
@@ -35,8 +36,6 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 
 /**
- * <p>DeleteTaxonBaseHandler class.</p>
- *
  * @author n.hoffmann
  * @created 21.04.2009
  * @version 1.0
@@ -44,9 +43,6 @@ import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
 public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler, IPostOperationEnabled {
 
        TaxonNameEditor editor;
-       /* (non-Javadoc)
-        * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-        */
        /** {@inheritDoc} */
        @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -59,12 +55,6 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
                return null;
        }
 
-       /**
-        * @param editor
-        * @param selectedElement
-        * @param operation
-        * @param commandName
-        */
        protected void doExecute(ExecutionEvent event, TaxonNameEditor editor, Object selectedElement) {
                AbstractPostOperation operation = null;
                String commandName = null;
@@ -86,7 +76,7 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
                }
                else if (selectedElement instanceof Taxon){
                        //TODO: how to get the actual classification
-                       if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Confirm Deletion", "Are you sure you want to delete the selected taxon?")){
+                       if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_TAXON)){
                                return ;
                        }
 
@@ -105,7 +95,7 @@ public class DeleteTaxonBaseHandler extends AbstractHandler implements IHandler,
 
                }
                else {
-                       throw new IllegalArgumentException("Element has to be Synonym, Misapplication or Concept");
+                       throw new IllegalArgumentException(Messages.DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT);
                }
 
                AbstractUtility.executeOperation(operation);
index 0521535061ed0b26a326b50a689c45036504c677..f88d6402c9a94b26f9694a3a74591a41ab152974 100644 (file)
@@ -20,3 +20,17 @@ UriWithLabelElement_URL_NOT_SAVED=URI won't be saved\!
 UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Could not open external browser. URI is invalid.\r
 UriWithLabelElement_INVALID_URL=Invalid URI\r
 UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Open in external browser\r
+\r
+ChangeConnectionHandler_ALREADY_CONNECTING=Already connecting\r
+ChangeConnectionHandler_CONFIRM_DATASOURCE=Confirm Datasource Connection\r
+ChangeConnectionHandler_CURRENTLY_CONNECTING_ALREADY=You are currently connecting to a different datasource already.\r
+ChangeConnectionHandler_DATASOURCE_NOT_AVAILABLE=Chosen datasource is not available\r
+ChangeConnectionHandler_REALLY_WANT_TO_CONNECT=Do you really want to connect to this datasource?\n\n\r
+ChangeConnectionHandler_NOT_AVAILABLE_REASONS=This could mean that either the database server is not running or the machine is not reachable.\n\n Please also make sure that you are connected to the network when trying to connect to a remote datasource.\r
+\r
+LoginDialog_CANCEL_MESSAGE=Aborting the login procedure will close the database.\r
+LoginDialog_LOGIN=Login\r
+LoginDialog_PASSWORD=Password\r
+LoginDialog_REALLY_CANCEL=Do you really want to cancel?\r
+LoginDialog_USER_LOGIN=User Login\r
+LoginDialog_USER_NAME=Username\r
index ea9b770aad255268fb8be303e02c0b378bdaf562..ca0430e5008106625aac8a624fa6f113f7b1746a 100644 (file)
@@ -18,4 +18,18 @@ OrderPreferencePage_NewNavigatorWindowRequired=Nach dem 
 UriWithLabelElement_URL_NOT_SAVED=URI wird nicht gespeichert\! 
 UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Externer Browser konnte nicht geöffnet werden. URI ist ung\u00FCtlig.
 UriWithLabelElement_INVALID_URL=Ung\u00FCltige URI
-UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Im Browser öffnen 
\ No newline at end of file
+UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Im Browser öffnen 
+
+ChangeConnectionHandler_ALREADY_CONNECTING=Verbindung wird aufgebaut
+ChangeConnectionHandler_CONFIRM_DATASOURCE=Verbindung bestätigen
+ChangeConnectionHandler_CURRENTLY_CONNECTING_ALREADY=Es wird schon eine Verbindung zu einer Datenquelle aufgebaut
+ChangeConnectionHandler_DATASOURCE_NOT_AVAILABLE=Gewählte Datenquelle nicht verfügbar
+ChangeConnectionHandler_REALLY_WANT_TO_CONNECT=Wollen Sie sich wirklich mit dieser Datenquelle verbinden?\n\n
+ChangeConnectionHandler_NOT_AVAILABLE_REASONS=Eventuell ist der Server nicht verfügbar oder erreichbar.\n\nStellen Sie bitte auch sicher, dass sie Netzzugang haben, wenn sie sich zu einer Remote-Datenquelle verbinden.
+
+LoginDialog_CANCEL_MESSAGE=Ein Abbruch wird die Verbindung zur Datenquelle schließen.
+LoginDialog_LOGIN=Login
+LoginDialog_PASSWORD=Passwort
+LoginDialog_REALLY_CANCEL=Wollen Sie wirklich abbrechen?
+LoginDialog_USER_LOGIN=Benutzer Login
+LoginDialog_USER_NAME=Benutzername
index 0aa1e9c64bf59c75a92f0ac8e4439478b7219c74..eb3f832913463524f809cb521ddfbe9c0ed7b76e 100644 (file)
@@ -22,6 +22,12 @@ public class Messages extends NLS {
     public static String LanguageEditorPreferencePage_EditorHasToRestart;
     public static String LanguageEditorPreferencePage_PleaseRestart;
     public static String LanguageEditorPreferencePage_RestartRequired;
+    public static String LoginDialog_CANCEL_MESSAGE;
+    public static String LoginDialog_LOGIN;
+    public static String LoginDialog_PASSWORD;
+    public static String LoginDialog_REALLY_CANCEL;
+    public static String LoginDialog_USER_LOGIN;
+    public static String LoginDialog_USER_NAME;
     public static String OrderPreferencePage_NewNavigatorWindowRequired;
     public static String OrderPreferencePage_PleaseReopenNavigator;
     public static String CdmDataSourceViewPart_1;
@@ -36,6 +42,12 @@ public class Messages extends NLS {
     public static String CdmDataSourceViewPart_7;
     public static String CdmDataSourceViewPart_8;
     public static String CdmDataSourceViewPart_9;
+    public static String ChangeConnectionHandler_ALREADY_CONNECTING;
+    public static String ChangeConnectionHandler_CONFIRM_DATASOURCE;
+    public static String ChangeConnectionHandler_CURRENTLY_CONNECTING_ALREADY;
+    public static String ChangeConnectionHandler_DATASOURCE_NOT_AVAILABLE;
+    public static String ChangeConnectionHandler_REALLY_WANT_TO_CONNECT;
+    public static String ChangeConnectionHandler_NOT_AVAILABLE_REASONS;
     public static String UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
     public static String UriWithLabelElement_INVALID_URL;
     public static String UriWithLabelElement_OPEN_EXTERNAL_BROWSER;
index eaa7ae53c079ff48517a30a108048d208c1471dd..324befb64f65085338f965225c058e76f48db585 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
  * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy 
+ * European Distributed Institute of Taxonomy
  * http://www.e-taxonomy.eu
- * 
+ *
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
@@ -20,8 +20,9 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 
+import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 
 /**
  * TODO wrap in a LoginModule
@@ -32,40 +33,32 @@ import eu.etaxonomy.taxeditor.store.StoreUtil;
  * @version 1.0
  */
 public class LoginDialog extends Dialog {
-       
+
        private static Text text_password;
        private static Text text_username;
 
-       private String title;
+       private final String title;
 
-       /**
-        * <p>Constructor for LoginDialog.</p>
-        *
-        * @param parentShell a {@link org.eclipse.swt.widgets.Shell} object.
-        */
        public LoginDialog(Shell parentShell) {
                super(parentShell);
-               title = "Login";
+               title = Messages.LoginDialog_LOGIN;
        }
-               
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
-        */
+
        /** {@inheritDoc} */
        @Override
        protected Control createDialogArea(Composite parent) {
                Composite composite = (Composite) super.createDialogArea(parent);
                //add controls to composite as necessary
-               
+
 
                // Label for the heading
                final CLabel titleLabel = new CLabel(composite, SWT.NONE);
-               titleLabel.setText("User Login");
+               titleLabel.setText(Messages.LoginDialog_USER_LOGIN);
 
                // Label for the username
                final CLabel userNameLabel = new CLabel(composite, SWT.NONE);
-               userNameLabel.setText("Username");
+               userNameLabel.setText(Messages.LoginDialog_USER_NAME);
 
                // Textfield for the username
                text_username = new Text(composite, SWT.BORDER);
@@ -73,22 +66,18 @@ public class LoginDialog extends Dialog {
 
                // Label for the password
                final CLabel passwordLabel = new CLabel(composite, SWT.NONE);
-               passwordLabel.setText("Password");
+               passwordLabel.setText(Messages.LoginDialog_PASSWORD);
 
                // Textfield for the password
                text_password = new Text(composite, SWT.PASSWORD | SWT.BORDER);
                text_password.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-               
-               
+
+
                return composite;
        }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
-     */
     /** {@inheritDoc} */
+    @Override
     protected void configureShell(Shell shell) {
         super.configureShell(shell);
         if (title != null) {
@@ -96,33 +85,30 @@ public class LoginDialog extends Dialog {
                }
     }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.jface.dialogs.Dialog#okPressed()
-        */
        /** {@inheritDoc} */
        @Override
        protected void okPressed() {
                String username = text_username.getText();
                String password = text_password.getText();
-               
+
                boolean result = CdmStore.getLoginManager().authenticate(username, password);
-               
+
                if(result){
                        super.okPressed();
                }
-               
-       }       
-       
+
+       }
+
        @Override
-       protected void cancelPressed() {                
+       protected void cancelPressed() {
                if(CdmStore.getLoginManager().getAuthenticatedUser() != null){
                        super.cancelPressed();
                }else{
                        // if there is no active user and the current user chooses to cancel, we close the connection
-                       boolean result = MessageDialog.openConfirm(getShell(), "Do you really want to cancel", "Aborting the login procedure will close the database.");
-                       
+                       boolean result = MessageDialog.openConfirm(getShell(), Messages.LoginDialog_REALLY_CANCEL, Messages.LoginDialog_CANCEL_MESSAGE);
+
                        if(result){
-                               CdmStore.close(StoreUtil.getMonitor());
+                               CdmStore.close(AbstractUtility.getMonitor());
                                super.cancelPressed();
                        }
                }
index dc1ce081de1037bf229965bc79c480c40cf94b79..4444f18f585cfc20875dc89a724e0755f229a6c9 100644 (file)
@@ -36,8 +36,6 @@ import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * <p>FilteredNamedAreaSelectionDialog class.</p>
- *
  * @author n.hoffmann
  * @created May 11, 2010
  * @version 1.0
@@ -68,7 +66,7 @@ public class NamedAreaSelectionDialog extends
        }
 
        private Collection<TermVocabulary<NamedArea>> selectedVocabularies;
-    private final ArrayList<TermVocabulary> preselectedVocabularies;
+    private ArrayList<TermVocabulary> preselectedVocabularies;
 
 
        /**
@@ -88,25 +86,17 @@ public class NamedAreaSelectionDialog extends
                return getSelectionFromDialog(dialog);
        }
 
-       /**
-        * <p>Constructor for FilteredNamedAreaSelectionDialog.</p>
-        *
-        * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param title a {@link java.lang.String} object.
-        * @param multi a boolean.
-        * @param namedArea a {@link eu.etaxonomy.cdm.model.location.NamedArea} object.
-        * @param preselectedVocabularyUuids the {@link UUID}s of the pre-selected Vocabularies
-        */
        protected NamedAreaSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, NamedArea namedArea, UUID... preselectedVocabularyUuids) {
                super(shell, conversation, title, multi, NamedAreaSelectionDialog.class.getCanonicalName(), namedArea);
-               preselectedVocabularies = new ArrayList<TermVocabulary>();
-               for(int i=0;i<preselectedVocabularyUuids.length;i++){
-                   TermVocabulary preselectedVocabulary = CdmStore.getService(IVocabularyService.class).find(preselectedVocabularyUuids[i]);
-            preselectedVocabularies.add(preselectedVocabulary);
+               if(preselectedVocabularyUuids.length>0){
+                   preselectedVocabularies = new ArrayList<TermVocabulary>();
+                   for(int i=0;i<preselectedVocabularyUuids.length;i++){
+                       TermVocabulary preselectedVocabulary = CdmStore.getService(IVocabularyService.class).find(preselectedVocabularyUuids[i]);
+                       preselectedVocabularies.add(preselectedVocabulary);
+                   }
+                   selectedVocabularies.retainAll(preselectedVocabularies);
+                   initModel();//re-init to consider pre-selected vocabularies
                }
-               selectedVocabularies.retainAll(preselectedVocabularies);
-               initModel();//re-init to consider pre-selected vocabularies
        }
 
        /** {@inheritDoc} */
@@ -118,7 +108,7 @@ public class NamedAreaSelectionDialog extends
                for(TermVocabulary<NamedArea> vocabulary : getAvailableVocabularies()){
                        IncludeNamedAreaVocabulary action = new IncludeNamedAreaVocabulary(vocabulary);
                        menuManager.add(action);
-                       if(preselectedVocabularies.isEmpty() || preselectedVocabularies.contains(vocabulary)) {
+                       if(preselectedVocabularies==null || preselectedVocabularies.isEmpty() || preselectedVocabularies.contains(vocabulary)) {
                            action.setChecked(true);
                        }
                }
index 7fc0fd5eb22545c3c9173380b0d5d3d5d96b205d..32c20fd1db216730d29b779dc0e29a70426bf286 100644 (file)
@@ -260,6 +260,7 @@ public class EntitySelectionElement<T extends ICdmBase> extends
        /** {@inheritDoc} */
        @Override
        public void setEnabled(boolean enabled) {
+
                button_selection.setEnabled(enabled);
                if (isDeletable){
                    button_remove.setEnabled(enabled);
@@ -267,6 +268,7 @@ public class EntitySelectionElement<T extends ICdmBase> extends
                if (isEditable) {
                        updateButtonStates();
                }
+
        }
 
        /* (non-Javadoc)
index fcb455583524ce33fa014339ae971f473f69c0fe..2c140c247539281f5ec15a13858c295875034c42 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
 
+import eu.etaxonomy.taxeditor.Messages;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -37,22 +38,20 @@ public class ChangeConnectionHandler extends AbstractHandler {
                        CdmMetaDataAwareDataSourceContainer container = (CdmMetaDataAwareDataSourceContainer) ((IStructuredSelection) selection).getFirstElement();
 
                        if(CdmStore.isConnecting()){
-                               MessagingUtils.warningDialog("Already connecting", this, "You are currently connecting to a different datasource already.");
+                               MessagingUtils.warningDialog(Messages.ChangeConnectionHandler_ALREADY_CONNECTING, this, Messages.ChangeConnectionHandler_CURRENTLY_CONNECTING_ALREADY);
                                return null;
                        }
 
                        try {
                                container.getCdmSource().checkConnection();
-                               boolean confirmed = MessagingUtils.confirmDialog("Confirm Datasource Connection", "Do you really want to connect to this datasource?\n\n"
+                               boolean confirmed = MessagingUtils.confirmDialog(Messages.ChangeConnectionHandler_CONFIRM_DATASOURCE, Messages.ChangeConnectionHandler_REALLY_WANT_TO_CONNECT
                                                + container.getCdmSource().getName());
 
                                if(confirmed){
                                        CdmDataSourceRepository.changeDataSource(container.getCdmSource());
                                }
                        } catch (Exception e) {
-                               MessagingUtils.warningDialog("Chosen datasource is not available", this, "This could mean that either the database server is " +
-                                               "not running or the machine is not reachable.\n\n" +
-                                               "Please also make sure that you are connected to the network when trying to connect to a remote datasource.");
+                               MessagingUtils.warningDialog(Messages.ChangeConnectionHandler_DATASOURCE_NOT_AVAILABLE, this, Messages.ChangeConnectionHandler_NOT_AVAILABLE_REASONS);
                                MessagingUtils.warn(getClass(), e);
                                return null;
                        }
index 8aa1147e7d7a34ea840032d151a2996ba50506d9..72543d8ed31a266bf3e786ed64f756eb9a21c7a5 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -21,33 +21,28 @@ import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
 import eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer;
 
 /**
- * <p>DeleteDataSourceHandler class.</p>
- *
  * @author n.hoffmann
  * @created 15.04.2009
  * @version 1.0
  */
 public class DeleteDataSourceHandler extends AbstractDataSourceHandler {
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.store.datasource.handler.AbstractDataSourceHandler#specificExecute(org.eclipse.core.commands.ExecutionEvent)
-        */
        /** {@inheritDoc} */
        @Override
        public boolean specificExecute(ExecutionEvent event) {
                ISelection selection = HandlerUtil.getActivePart(event).getSite().getSelectionProvider().getSelection();
                if(selection instanceof IStructuredSelection){
                        Object[] selectedObjects = ((IStructuredSelection) selection).toArray();
-               
+
                        if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you want to delete the selected datasources?")){
                                return false;
                        }
-                       // Delete from persistent data sources          
+                       // Delete from persistent data sources
                        for(Object object : selectedObjects){
                                CdmPersistentDataSource dataSource = (CdmPersistentDataSource) ((CdmMetaDataAwareDataSourceContainer) object).getCdmSource();
                                CdmDataSourceRepository.delete(dataSource);
                        }
-                       
+
                        return true;
                }
                return false;