Delete unused extension point and interface
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / CdmViewerContextMenu.java
index db59d464d01ba40ddfd6c14b3a10fdb4a4b783d1..2811fe14a38fc719795857cae83e4b0b24fe4f7f 100644 (file)
@@ -24,6 +24,7 @@ import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.handlers.IHandlerService;
 
 import eu.etaxonomy.cdm.model.common.ICdmBase;
+import eu.etaxonomy.taxeditor.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 /**
@@ -52,12 +53,12 @@ public class CdmViewerContextMenu extends CompoundContributionItem {
                                 String viewerName = entry.getValue();
 
                                 MenuItem addItem = new MenuItem(menu, SWT.CASCADE);
-                                addItem.setText(String.format("Open (%s)", viewerName));
+                                addItem.setText(String.format(Messages.CdmViewerContextMenu_OPEN, viewerName));
                                 addItem.addSelectionListener(new CommandInvoker(command, firstElement)) ;
                             }
                             else if(enabledCommands.size()>1){
                                 MenuItem addItem = new MenuItem(menu, SWT.CASCADE);
-                                addItem.setText("Open in...");
+                                addItem.setText(Messages.CdmViewerContextMenu_OPEN_IN);
                                 Menu addMenu = new Menu(menu);
                                 addItem.setMenu(addMenu);
                                 for(Entry<Command, String> entry:enabledCommands.entrySet()){
@@ -104,7 +105,7 @@ public class CdmViewerContextMenu extends CompoundContributionItem {
             IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
             Map<String, UUID> params = new HashMap<String, UUID>();
             if(selectedObject instanceof ICdmBase){
-                params.put(command.getId()+".uuid", ((ICdmBase) selectedObject).getUuid());
+                params.put(command.getId()+".uuid", ((ICdmBase) selectedObject).getUuid()); //$NON-NLS-1$
             }
             ParameterizedCommand parameterizedCommand = ParameterizedCommand.generateCommand(command, params);
             try {
@@ -115,9 +116,9 @@ public class CdmViewerContextMenu extends CompoundContributionItem {
                     handlerService.executeCommand(command.getId(), null);
                 }
             } catch (NotDefinedException nde) {
-                throw new RuntimeException("Could not find open command: " + command.getId());
+                throw new RuntimeException("Could not find open command: " + command.getId()); //$NON-NLS-1$
             } catch (Exception exception) {
-                MessagingUtils.error(getClass(), "An exception occured while trying execute "+command.getId(), exception);
+                MessagingUtils.error(getClass(), "An exception occured while trying execute "+command.getId(), exception); //$NON-NLS-1$
             }
             PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getSelection();
         }