本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.core.services.ViewService类的典型用法代码示例。如果您正苦于以下问题:Java ViewService类的具体用法?Java ViewService怎么用?Java ViewService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewService类属于org.eclipse.gmf.runtime.diagram.core.services包,在下文中一共展示了ViewService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:20,代码来源:StatemachineNewDiagramFileWizard.java
示例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();
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:18,代码来源:CreateSubdiagramCommand.java
示例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);
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:22,代码来源:ExtractSubdiagramRefactoring.java
示例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;
}
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:20,代码来源:Wc2014NewDiagramFileWizard.java
示例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;
}
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:20,代码来源:SimpleBPMNNewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:19,代码来源:ICSE15_SequenceDiagram_MAVONewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:NECSIS14_ClassDiagramNewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:NECSIS14_DatabaseSchemaNewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:19,代码来源:RelationalDatabase_MAVONewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:RelationalDatabaseNewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:19,代码来源:IStar_MAVONewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:StateMachineNewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:19,代码来源:StateMachine_MAVONewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:EconomyNewDiagramFileWizard.java
示例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;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:19,代码来源:ClassDiagram_MAVONewDiagramFileWizard.java
示例16: validatePage
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* @generated
*/
protected boolean validatePage() {
if (getModelElement() == null) {
setErrorMessage(
edu.toronto.cs.se.modelepedia.graph_mavo.diagram.part.Messages.Graph_MAVONewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService.getInstance()
.provides(new CreateDiagramViewOperation(new EObjectAdapter(
getModelElement()),
edu.toronto.cs.se.modelepedia.graph_mavo.diagram.edit.parts.GraphEditPart.MODEL_ID,
edu.toronto.cs.se.modelepedia.graph_mavo.diagram.part.Graph_MAVODiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: edu.toronto.cs.se.modelepedia.graph_mavo.diagram.part.Messages.Graph_MAVONewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:19,代码来源:Graph_MAVONewDiagramFileWizard.java
示例17: doExecuteWithResult
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
IAdaptable info) throws ExecutionException {
View view = ViewService.getInstance().createView(
viewDescriptor.getViewKind(),
viewDescriptor.getElementAdapter(), containerView,
viewDescriptor.getSemanticHint(), index,
viewDescriptor.isPersisted(),
viewDescriptor.getPreferencesHint());
Assert.isNotNull(view, "failed to create a view"); //$NON-NLS-1$
viewDescriptor.setView(view);
return CommandResult.newOKCommandResult(viewDescriptor);
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:16,代码来源:CompartmentChildCreateCommand.java
示例18: createExitPoint
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
protected void createExitPoint(Edge edge, Diagram subdiagram) {
Transition transition = (Transition) edge.getElement();
// create semantic exit point
Region exitPointContainer = getExitPointContainer(transition);
Exit exitPoint = createSemanticExitPoint(transition);
// create node for exit point
View exitPointContainerView = helper.getViewForSemanticElement(exitPointContainer, subdiagram);
View exitPointRegionCompartment = ViewUtil.getChildBySemanticHint(exitPointContainerView,
SemanticHints.REGION_COMPARTMENT);
Node exitNode = ViewService.createNode(exitPointRegionCompartment, exitPoint, SemanticHints.EXIT,
preferencesHint);
// re-wire existing transition to new exit point
Vertex oldTransitionTarget = transition.getTarget();
transition.setTarget(exitPoint);
View oldEdgeTarget = edge.getTarget();
edge.setTarget(exitNode);
// create transition from selected state to former transition target
Transition exitPointTransition = SGraphFactory.eINSTANCE.createTransition();
exitPointTransition.setSource((State) subdiagram.getElement());
exitPointTransition.setTarget(oldTransitionTarget);
ViewService.createEdge(getContextObject(), oldEdgeTarget, exitPointTransition, SemanticHints.TRANSITION,
preferencesHint);
addExitPointSpec(exitPointTransition, exitPoint);
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:29,代码来源:ExtractSubdiagramRefactoring.java
示例19: createSubdiagram
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
/**
* Creates a new {@link Diagram} and copies child elements
*/
protected Diagram createSubdiagram() {
View contextView = getContextObject();
State contextElement = (State) contextView.getElement();
Diagram subdiagram = ViewService.createDiagram(contextElement, StatechartDiagramEditor.ID, preferencesHint);
View figureCompartment = ViewUtil.getChildBySemanticHint(contextView, SemanticHints.STATE_FIGURE_COMPARTMENT);
getResource().getContents().add(subdiagram);
while (figureCompartment.getChildren().size() > 0) {
subdiagram.insertChild((View) figureCompartment.getChildren().get(0));
}
return subdiagram;
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:15,代码来源:ExtractSubdiagramRefactoring.java
示例20: doGraphicalRefactoring
import org.eclipse.gmf.runtime.diagram.core.services.ViewService; //导入依赖的package包/类
protected void doGraphicalRefactoring() {
Node compositeStateView = createNodeForCompositeState(compositeState);
Node innerRegionNode = ViewService.createNode(
getStateFigureCompartmentView(compositeStateView), innerRegion,
SemanticHints.REGION, preferencesHint);
View regionCompartment = ViewUtil.getChildBySemanticHint(innerRegionNode, SemanticHints.REGION_COMPARTMENT);
moveSelectedStateNodesTo(regionCompartment, (Bounds)compositeStateView.getLayoutConstraint());
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:10,代码来源:GroupStatesIntoCompositeRefactoring.java
注:本文中的org.eclipse.gmf.runtime.diagram.core.services.ViewService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论