本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument类的典型用法代码示例。如果您正苦于以下问题:Java IDiagramDocument类的具体用法?Java IDiagramDocument怎么用?Java IDiagramDocument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDiagramDocument类属于org.eclipse.gmf.runtime.diagram.ui.resources.editor.document包,在下文中一共展示了IDiagramDocument类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element)
throws CoreException {
if (false == element instanceof FileEditorInput
&& false == element instanceof URIEditorInput) {
throw new CoreException(
new Status(
IStatus.ERROR,
StatemachineDiagramEditorPlugin.ID,
0,
NLS.bind(
Messages.StatemachineDocumentProvider_IncorrectInputError,
new Object[] {
element,
"org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:28,代码来源:StatemachineDocumentProvider.java
示例2: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
StatemachineNavigatorItem item = new StatemachineNavigatorItem(
diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:21,代码来源:StatemachineDiagramEditor.java
示例3: findSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
public IStructuredSelection findSelection(IEditorInput anInput) {
IDiagramDocument document = StatemachineDiagramEditorPlugin
.getInstance().getDocumentProvider()
.getDiagramDocument(anInput);
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
StatemachineNavigatorItem item = new StatemachineNavigatorItem(
diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:23,代码来源:StatemachineNavigatorLinkHelper.java
示例4: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element)
throws CoreException {
if (false == element instanceof FileEditorInput
&& false == element instanceof URIEditorInput) {
throw new CoreException(
new Status(
IStatus.ERROR,
SmcDiagramEditorPlugin.ID,
0,
NLS
.bind(
Messages.SmcDocumentProvider_IncorrectInputError,
new Object[] {
element,
"org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:29,代码来源:SmcDocumentProvider.java
示例5: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
Wc2014NavigatorItem item = new Wc2014NavigatorItem(diagram, file,
false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:21,代码来源:Wc2014DiagramEditor.java
示例6: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element)
throws CoreException {
if (false == element instanceof FileEditorInput
&& false == element instanceof URIEditorInput) {
throw new CoreException(
new Status(
IStatus.ERROR,
Wc2014DiagramEditorPlugin.ID,
0,
NLS.bind(
Messages.Wc2014DocumentProvider_IncorrectInputError,
new Object[] {
element,
"org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:28,代码来源:Wc2014DocumentProvider.java
示例7: findSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
public IStructuredSelection findSelection(IEditorInput anInput) {
IDiagramDocument document = Wc2014DiagramEditorPlugin.getInstance()
.getDocumentProvider().getDiagramDocument(anInput);
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
Wc2014NavigatorItem item = new Wc2014NavigatorItem(diagram, file,
false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:22,代码来源:Wc2014NavigatorLinkHelper.java
示例8: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element)
throws CoreException {
if (false == element instanceof FileEditorInput
&& false == element instanceof URIEditorInput) {
throw new CoreException(
new Status(
IStatus.ERROR,
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.ID,
0,
NLS.bind(
SimpleBPMN.diagram.part.Messages.SimpleBPMNDocumentProvider_IncorrectInputError,
new Object[] {
element,
"org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:28,代码来源:SimpleBPMNDocumentProvider.java
示例9: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
SimpleBPMN.diagram.navigator.SimpleBPMNNavigatorItem item = new SimpleBPMN.diagram.navigator.SimpleBPMNNavigatorItem(
diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:21,代码来源:SimpleBPMNDiagramEditor.java
示例10: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element) throws CoreException {
if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
throw new CoreException(new Status(IStatus.ERROR,
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditorPlugin.ID,
0,
NLS.bind(
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.ICSE15_SequenceDiagram_MAVODocumentProvider_IncorrectInputError,
new Object[] { element, "org.eclipse.ui.part.FileEditorInput", //$NON-NLS-1$
"org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:ICSE15_SequenceDiagram_MAVODocumentProvider.java
示例11: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.navigator.ICSE15_SequenceDiagram_MAVONavigatorItem item = new edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.navigator.ICSE15_SequenceDiagram_MAVONavigatorItem(
diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:21,代码来源:ICSE15_SequenceDiagram_MAVODiagramEditor.java
示例12: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element)
throws CoreException {
if (false == element instanceof FileEditorInput
&& false == element instanceof URIEditorInput) {
throw new CoreException(
new Status(
IStatus.ERROR,
edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramDiagramEditorPlugin.ID,
0,
NLS.bind(
edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.Messages.NECSIS14_ClassDiagramDocumentProvider_IncorrectInputError,
new Object[] {
element,
"org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:28,代码来源:NECSIS14_ClassDiagramDocumentProvider.java
示例13: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element) throws CoreException {
if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
throw new CoreException(
new Status(
IStatus.ERROR,
TransformationDependencyDiagramEditorPlugin.ID,
0,
NLS.bind(
Messages.TransformationDependencyDocumentProvider_IncorrectInputError,
new Object[] {
element,
"org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:26,代码来源:TransformationDependencyDocumentProvider.java
示例14: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.navigator.NECSIS14_ClassDiagramNavigatorItem item = new edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.navigator.NECSIS14_ClassDiagramNavigatorItem(
diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:21,代码来源:NECSIS14_ClassDiagramDiagramEditor.java
示例15: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.navigator.NECSIS14_DatabaseSchemaNavigatorItem item = new edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.navigator.NECSIS14_DatabaseSchemaNavigatorItem(
diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:21,代码来源:NECSIS14_DatabaseSchemaDiagramEditor.java
示例16: createElementInfo
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
protected ElementInfo createElementInfo(Object element)
throws CoreException {
if (false == element instanceof FileEditorInput
&& false == element instanceof URIEditorInput) {
throw new CoreException(
new Status(
IStatus.ERROR,
edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaDiagramEditorPlugin.ID,
0,
NLS.bind(
edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.Messages.NECSIS14_DatabaseSchemaDocumentProvider_IncorrectInputError,
new Object[] {
element,
"org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
return info;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:28,代码来源:NECSIS14_DatabaseSchemaDocumentProvider.java
示例17: isDeleted
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated NOT
*/
public boolean isDeleted(Object element) {
IDiagramDocument document = getDiagramDocument(element);
if (document != null) {
Resource diagramResource = document.getDiagram().eResource();
if (diagramResource != null) {
IFile file = WorkspaceSynchronizer.getFile(diagramResource);
// Check for files located outside workspace.
// getFile above returns null if it cannot be found inside the workspace.
if (file != null) {
return file.getLocation() == null || !file.getLocation().toFile().exists();
}
// check for files located outside workspace.
else {
// check if the file exists on disk
return !diagramResource.getURI().isFile()
|| !(new File(diagramResource.getURI().toFileString())).exists();
}
}
}
return super.isDeleted(element);
}
开发者ID:adisandro,项目名称:MMINT,代码行数:25,代码来源:MIDDocumentProvider.java
示例18: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
edu.toronto.cs.se.modelepedia.graph_mavo.diagram.navigator.Graph_MAVONavigatorItem item = new edu.toronto.cs.se.modelepedia.graph_mavo.diagram.navigator.Graph_MAVONavigatorItem(
diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:21,代码来源:Graph_MAVODiagramEditor.java
示例19: getNavigatorSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
MIDNavigatorItem item = new MIDNavigatorItem(diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:MIDDiagramEditor.java
示例20: findSelection
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; //导入依赖的package包/类
/**
* @generated
*/
public IStructuredSelection findSelection(IEditorInput anInput) {
IDiagramDocument document = MIDDiagramEditorPlugin
.getInstance()
.getDocumentProvider()
.getDiagramDocument(anInput);
if (document == null) {
return StructuredSelection.EMPTY;
}
Diagram diagram = document.getDiagram();
if (diagram == null || diagram.eResource() == null) {
return StructuredSelection.EMPTY;
}
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
if (file != null) {
MIDNavigatorItem item = new MIDNavigatorItem(diagram, file, false);
return new StructuredSelection(item);
}
return StructuredSelection.EMPTY;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:MIDNavigatorLinkHelper.java
注:本文中的org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论