本文整理汇总了Java中org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter类的典型用法代码示例。如果您正苦于以下问题:Java EObjectAdapter类的具体用法?Java EObjectAdapter怎么用?Java EObjectAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EObjectAdapter类属于org.eclipse.gmf.runtime.emf.core.util包,在下文中一共展示了EObjectAdapter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validatePage
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(Messages.StatemachineNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService
.getInstance()
.provides(
new CreateDiagramViewOperation(
new EObjectAdapter(getModelElement()),
StatemachineEditPart.MODEL_ID,
StatemachineDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: Messages.StatemachineNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例2: getState_2001Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getState_2001Text(View view) {
IParser parser = StatemachineParserProvider.getParser(
StatemachineElementTypes.State_2001,
view.getElement() != null ? view.getElement() : view,
StatemachineVisualIDRegistry
.getType(StateNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
StatemachineDiagramEditorPlugin.getInstance().logError(
"Parser was not found for label " + 5001); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例3: setConnectionPoints
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* Sets the points of a connection.
*
* @param connection
* - The connection
* @param bendpoints
* - Start, end and bending points
*/
public static void setConnectionPoints(ConnectionNodeEditPart connection, List<Point> bendpoints) {
TransactionalEditingDomain editingDomain = connection.getEditingDomain();
SetConnectionBendpointsCommand cmd = new SetConnectionBendpointsCommand(editingDomain);
cmd.setEdgeAdapter(new EObjectAdapter(connection.getNotationView()));
Point first = bendpoints.get(0);
Point last = bendpoints.get(bendpoints.size() - 1);
Point sourceRef = new Point(first.x(), first.y());
Point targetRef = new Point(last.x(), last.y());
PointList pointList = new PointList();
for (Point bendpoint : bendpoints) {
pointList.addPoint(new Point(bendpoint.x(), bendpoint.y()));
}
cmd.setNewPointList(pointList, sourceRef, targetRef);
Command proxy = new ICommandProxy(cmd);
proxy.execute();
}
示例4: getGroup_3011Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getGroup_3011Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.Group_3011,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.GroupName2EditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5024); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例5: getAND_2003Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getAND_2003Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.AND_2003,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.ANDNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5003); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例6: getAssociation_4006Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getAssociation_4006Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.Association_4006,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.AssociationNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 6006); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例7: getAND_3003Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getAND_3003Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.AND_3003,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.ANDName2EditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5016); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例8: getActivity_2007Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getActivity_2007Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.Activity_2007,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.ActivityNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5007); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例9: getLane_2004Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getLane_2004Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.Lane_2004,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.LaneNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5004); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例10: getPool_2005Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getPool_2005Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.Pool_2005,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.PoolNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5005); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例11: validatePage
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(SimpleBPMN.diagram.part.Messages.SimpleBPMNNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService
.getInstance()
.provides(
new CreateDiagramViewOperation(
new EObjectAdapter(getModelElement()),
SimpleBPMN.diagram.edit.parts.BusinessProcessDiagramEditPart.MODEL_ID,
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: SimpleBPMN.diagram.part.Messages.SimpleBPMNNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例12: getSequenceFlow_4005Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getSequenceFlow_4005Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.SequenceFlow_4005,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.SequenceFlowNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 6005); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例13: getIntermediateEvent_2011Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getIntermediateEvent_2011Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.IntermediateEvent_2011,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.IntermediateEventNameEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5012); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例14: getPool_3005Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getPool_3005Text(View view) {
IParser parser = SimpleBPMN.diagram.providers.SimpleBPMNParserProvider
.getParser(
SimpleBPMN.diagram.providers.SimpleBPMNElementTypes.Pool_3005,
view.getElement() != null ? view.getElement() : view,
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(SimpleBPMN.diagram.edit.parts.PoolName2EditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
SimpleBPMN.diagram.part.SimpleBPMNDiagramEditorPlugin.getInstance()
.logError("Parser was not found for label " + 5018); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}
示例15: getEliminationMatch_2001Text
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; //导入依赖的package包/类
/**
* @generated
*/
private String getEliminationMatch_2001Text(View view) {
IParser parser = Wc2014ParserProvider.getParser(
Wc2014ElementTypes.EliminationMatch_2001,
view.getElement() != null ? view.getElement() : view,
Wc2014VisualIDRegistry
.getType(EliminationMatchIdEditPart.VISUAL_ID));
if (parser != null) {
return parser.getPrintString(new EObjectAdapter(
view.getElement() != null ? view.getElement() : view),
ParserOptions.NONE.intValue());
} else {
Wc2014DiagramEditorPlugin.getInstance().logError(
"Parser was not found for label " + 5001); //$NON-NLS-1$
return ""; //$NON-NLS-1$
}
}