本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor类的典型用法代码示例。如果您正苦于以下问题:Java DiagramEditor类的具体用法?Java DiagramEditor怎么用?Java DiagramEditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DiagramEditor类属于org.eclipse.gmf.runtime.diagram.ui.parts包,在下文中一共展示了DiagramEditor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
StatemachineDiagramEditorUtil.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例2: setUp
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
@Before
public void setUp(){
IMultiDiagramEditor editor = Mockito.mock(IMultiDiagramEditor.class);
ServicesRegistry reg = Mockito.mock(ServicesRegistry.class);
this.ms = Mockito.mock(ModelSet.class);
try {
Mockito.when(reg.getService(ModelSet.class)).thenReturn(this.ms);
} catch (ServiceException e) {
e.printStackTrace();
}
this.editorPart = Mockito.mock(DiagramEditor.class);
Mockito.when(editor.getServicesRegistry()).thenReturn(reg);
Mockito.when(editor.getActiveEditor()).thenReturn(this.editorPart);
this.diagramManager = new DiagramManager(editor);
}
示例3: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorUtil
.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例4: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditorUtil
.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例5: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramDiagramEditorUtil
.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例6: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaDiagramEditorUtil
.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例7: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
MIDDiagramEditorUtil.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例8: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
MIDDiagramEditorUtil.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例9: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVODiagramEditorUtil
.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例10: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
RelationalDatabaseDiagramEditorUtil.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例11: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditorUtil
.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例12: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
IStarDiagramEditorUtil.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例13: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
StateMachineDiagramEditorUtil.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例14: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVODiagramEditorUtil
.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
}
}
示例15: doGotoMarker
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; //导入依赖的package包/类
/**
* @generated
*/
protected void doGotoMarker(IMarker marker) {
String elementId = marker
.getAttribute(
org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID,
null);
if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
DiagramEditor editor = (DiagramEditor) getEditor();
Map editPartRegistry = editor.getDiagramGraphicalViewer()
.getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource()
.getEObject(elementId);
if (targetView == null) {
return;
}
EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
if (targetEditPart != null) {
StateDiagramEditorUtil.selectElementsInDiagram(editor,
Arrays.asList(new EditPart[] { targetEditPart }));
}
}