]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/OpenSheetAdapter.java
Allow OpenWithMenuContribution to filter out currently active editor.
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / diagramEditor / OpenSheetAdapter.java
index ae88498dc948dc572b800d44a385c0f01e40a83d..70ff7ea62d4e2e2a8615cbeffb426221a1236e98 100644 (file)
@@ -33,13 +33,13 @@ import org.slf4j.LoggerFactory;
 public class OpenSheetAdapter extends AbstractResourceEditorAdapter {
     private static final Logger LOGGER = LoggerFactory.getLogger(OpenSheetAdapter.class);
 
-    private static final String EDITOR_ID = "org.simantics.spreadsheet.ui.editor2";
+    private static final String EDITOR_ID = "org.simantics.spreadsheet.ui.editor2"; //$NON-NLS-1$
 
     public OpenSheetAdapter() {
-        super("Spreadsheet Editor", Activator.COMPOSITE_ICON);
+        super(Messages.OpenSheetAdapter_SpreadsheetEditor, Activator.COMPOSITE_ICON);
     }
 
-    protected String getEditorId() {
+    public String getEditorId() {
         return EDITOR_ID;
     }
 
@@ -65,7 +65,7 @@ public class OpenSheetAdapter extends AbstractResourceEditorAdapter {
                             String editorId = getEditorId();
                             WorkbenchUtils.openEditor(editorId, new ResourceEditorInput2(editorId, r, model, rvi));
                         } catch (PartInitException e) {
-                               LOGGER.error("Failed to open the spreadsheet editor.", e);
+                               LOGGER.error("Failed to open the spreadsheet editor.", e); //$NON-NLS-1$
                         }
                     }
                 });