import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.simantics.Simantics;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.common.request.PossibleIndexRoot;
import org.simantics.modeling.ModelingResources;
import org.simantics.modeling.ui.Activator;
import org.simantics.structural.stubs.StructuralResource2;
-import org.simantics.ui.SimanticsUI;
import org.simantics.ui.workbench.ResourceEditorInput2;
import org.simantics.ui.workbench.editor.AbstractResourceEditorAdapter;
import org.simantics.utils.ui.ErrorLogger;
*/
public class OpenDiagramFromSymbolAdapter extends AbstractResourceEditorAdapter {
- private static final String EDITOR_ID = "org.simantics.modeling.ui.symbolEditor";
+ private static final String EDITOR_ID = "org.simantics.modeling.ui.symbolEditor"; //$NON-NLS-1$
public OpenDiagramFromSymbolAdapter() {
- super("Symbol Editor", Activator.SYMBOL_ICON);
+ super(Messages.OpenDiagramFromSymbolAdapter_SymbolEditor, Activator.SYMBOL_ICON);
}
- protected String getEditorId() {
+ public String getEditorId() {
return EDITOR_ID;
}
@Override
public void openEditor(final Resource r) throws Exception {
- SimanticsUI.getSession().asyncRequest(new ReadRequest() {
+ Simantics.getSession().asyncRequest(new ReadRequest() {
@Override
public void run(ReadGraph g) throws DatabaseException {
StructuralResource2 sr = StructuralResource2.getInstance(g);