X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.debug.ui%2Fsrc%2Forg%2Fsimantics%2Fdebug%2Fui%2Finternal%2FGraphicalDebuggerEditorAdapter.java;h=d98edc4c4bcf32a0fb27cdeb97bc5dba08b90a78;hp=2b8b8aed0d055745b34792497723a3f6195930e7;hb=59724aa55a75a4efc3ec17e3b4a4ef62f463526e;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/internal/GraphicalDebuggerEditorAdapter.java b/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/internal/GraphicalDebuggerEditorAdapter.java index 2b8b8aed0..d98edc4c4 100644 --- a/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/internal/GraphicalDebuggerEditorAdapter.java +++ b/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/internal/GraphicalDebuggerEditorAdapter.java @@ -1,39 +1,39 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.debug.ui.internal; - -import org.eclipse.core.runtime.Platform; -import org.simantics.db.Resource; -import org.simantics.db.ReadGraph; -import org.simantics.debug.ui.graph.GraphicalDebuggerEditor; -import org.simantics.ui.SimanticsUI; -import org.simantics.ui.workbench.ResourceEditorInput; -import org.simantics.ui.workbench.editor.AbstractResourceEditorAdapter; - - -public class GraphicalDebuggerEditorAdapter extends AbstractResourceEditorAdapter { - - public GraphicalDebuggerEditorAdapter() { - super("Graphical Debugger", SimanticsUI.getImageDescriptor("icons/etool16/bug.png")); - } - - @Override - public boolean canHandle(ReadGraph g, Resource r) { - return Platform.inDevelopmentMode(); - } - - @Override - public void openEditor(Resource r) throws Exception { - openEditorWithId(GraphicalDebuggerEditor.EDITOR_ID, new ResourceEditorInput(GraphicalDebuggerEditor.EDITOR_ID,r)); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.debug.ui.internal; + +import org.eclipse.core.runtime.Platform; +import org.simantics.db.Resource; +import org.simantics.db.ReadGraph; +import org.simantics.debug.ui.graph.GraphicalDebuggerEditor; +import org.simantics.ui.SimanticsUI; +import org.simantics.ui.workbench.ResourceEditorInput; +import org.simantics.ui.workbench.editor.AbstractResourceEditorAdapter; + + +public class GraphicalDebuggerEditorAdapter extends AbstractResourceEditorAdapter { + + public GraphicalDebuggerEditorAdapter() { + super(Messages.GraphicalDebuggerEditorAdapter_GraphicalDebugger, SimanticsUI.getImageDescriptor("icons/etool16/bug.png")); //$NON-NLS-1$ + } + + @Override + public boolean canHandle(ReadGraph g, Resource r) { + return Platform.inDevelopmentMode(); + } + + @Override + public void openEditor(Resource r) throws Exception { + openEditorWithId(GraphicalDebuggerEditor.EDITOR_ID, new ResourceEditorInput(GraphicalDebuggerEditor.EDITOR_ID,r)); + } + +}