本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.core.services.ViewService类的典型用法代码示例。如果您正苦于以下问题:Java ViewService类的具体用法?Java ViewService怎么用?Java ViewService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewService类属于org.eclipse.gmf.runtime.diagram.core.services包,在下文中一共展示了ViewService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的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: doExecuteWithResult
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
BooleanValueStyle inlineStyle = DiagramPartitioningUtil.getInlineStyle(node);
if (inlineStyle != null) {
inlineStyle.setBooleanValue(false);
} else {
inlineStyle = DiagramPartitioningUtil.createInlineStyle();
inlineStyle.setBooleanValue(false);
node.getStyles().add(inlineStyle);
}
Diagram subdiagram = ViewService.createDiagram(node.getElement(), StatechartDiagramEditor.ID,
DiagramActivator.DIAGRAM_PREFERENCES_HINT);
node.eResource().getContents().add(subdiagram);
return CommandResult.newOKCommandResult();
}
示例3: createEntryPoint
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
protected void createEntryPoint(Edge edge, Diagram subdiagram) {
Transition transition = (Transition) edge.getElement();
Region entryPointContainer = getEntryPointContainer(transition);
Entry entryPoint = createSemanticEntryPoint(transition);
// re-wire old transition to targeting the selected state
transition.setTarget((State) subdiagram.getElement());
View oldTarget = edge.getTarget();
edge.setTarget(getContextObject());
// create node for entry point
View entryPointContainerView = helper.getViewForSemanticElement(entryPointContainer, subdiagram);
View entryPointRegionCompartment = ViewUtil.getChildBySemanticHint(entryPointContainerView,
SemanticHints.REGION_COMPARTMENT);
Node entryNode = ViewService.createNode(entryPointRegionCompartment, entryPoint, SemanticHints.ENTRY,
preferencesHint);
ViewService.createEdge(entryNode, oldTarget, entryPoint.getOutgoingTransitions().get(0),
SemanticHints.TRANSITION, preferencesHint);
addEntryPointSpec(transition, entryPoint);
}
示例4: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(Messages.Wc2014NewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService
.getInstance()
.provides(
new CreateDiagramViewOperation(
new EObjectAdapter(getModelElement()),
WorldCupEditPart.MODEL_ID,
Wc2014DiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: Messages.Wc2014NewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例5: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的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;
}
示例6: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.ICSE15_SequenceDiagram_MAVONewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService.getInstance()
.provides(new CreateDiagramViewOperation(new EObjectAdapter(
getModelElement()),
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.SequenceDiagramEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.Messages.ICSE15_SequenceDiagram_MAVONewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例7: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.Messages.NECSIS14_ClassDiagramNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService
.getInstance()
.provides(
new CreateDiagramViewOperation(
new EObjectAdapter(getModelElement()),
edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.ClassDiagramEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.Messages.NECSIS14_ClassDiagramNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例8: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.Messages.NECSIS14_DatabaseSchemaNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService
.getInstance()
.provides(
new CreateDiagramViewOperation(
new EObjectAdapter(getModelElement()),
edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.edit.parts.DatabaseSchemaEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.Messages.NECSIS14_DatabaseSchemaNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例9: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(
edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.Messages.RelationalDatabase_MAVONewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService.getInstance()
.provides(new CreateDiagramViewOperation(new EObjectAdapter(
getModelElement()),
edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.RelationalDatabaseEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVODiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.Messages.RelationalDatabase_MAVONewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例10: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (selectedModelElement == null) {
setErrorMessage(Messages.RelationalDatabaseNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService
.getInstance()
.provides(
new CreateDiagramViewOperation(
new EObjectAdapter(selectedModelElement),
RelationalDatabaseEditPart.MODEL_ID,
RelationalDatabaseDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: Messages.RelationalDatabaseNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例11: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(
edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.IStar_MAVONewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService.getInstance()
.provides(new CreateDiagramViewOperation(new EObjectAdapter(
getModelElement()),
edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.IStarEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.Messages.IStar_MAVONewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例12: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的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;
}
示例13: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(
edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.Messages.StateMachine_MAVONewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService.getInstance()
.provides(new CreateDiagramViewOperation(new EObjectAdapter(
getModelElement()),
edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.StateMachineEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVODiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.Messages.StateMachine_MAVONewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例14: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(Messages.EconomyNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService
.getInstance()
.provides(
new CreateDiagramViewOperation(
new EObjectAdapter(getModelElement()),
EconomyEditPart.MODEL_ID,
EconomyDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: Messages.EconomyNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
示例15: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(
edu.toronto.cs.se.modelepedia.classdiagram_mavo.diagram.part.Messages.ClassDiagram_MAVONewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService.getInstance()
.provides(new CreateDiagramViewOperation(new EObjectAdapter(
getModelElement()),
edu.toronto.cs.se.modelepedia.classdiagram_mavo.diagram.edit.parts.ClassDiagramEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.classdiagram_mavo.diagram.part.ClassDiagram_MAVODiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.classdiagram_mavo.diagram.part.Messages.ClassDiagram_MAVONewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}