本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint类的典型用法代码示例。如果您正苦于以下问题:Java PreferencesHint类的具体用法?Java PreferencesHint怎么用?Java PreferencesHint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PreferencesHint类属于org.eclipse.gmf.runtime.diagram.core.preferences包,在下文中一共展示了PreferencesHint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNode
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createNode(IAdaptable semanticAdapter, View containerView,
String semanticHint, int index, boolean persisted,
PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
visualID = StatemachineVisualIDRegistry.getNodeVisualID(
containerView, domainElement);
} else {
visualID = StatemachineVisualIDRegistry.getVisualID(semanticHint);
}
switch (visualID) {
case StateEditPart.VISUAL_ID:
return createState_2001(domainElement, containerView, index,
persisted, preferencesHint);
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
return null;
}
示例2: createNode
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index,
boolean persisted, PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
visualID = TransformationDependencyVisualIDRegistry.getNodeVisualID(containerView, domainElement);
} else {
visualID = TransformationDependencyVisualIDRegistry.getVisualID(semanticHint);
}
switch (visualID) {
case TransformationSetEditPart.VISUAL_ID:
return createTransformationSet_2004(domainElement, containerView, index, persisted, preferencesHint);
case TransformationSetExtensionEditPart.VISUAL_ID:
return createTransformationSetExtension_2005(domainElement, containerView, index, persisted,
preferencesHint);
case ExternalTransformationEditPart.VISUAL_ID:
return createExternalTransformation_2006(domainElement, containerView, index, persisted, preferencesHint);
case TransformationEditPart.VISUAL_ID:
return createTransformation_3003(domainElement, containerView, index, persisted, preferencesHint);
case Transformation2EditPart.VISUAL_ID:
return createTransformation_3004(domainElement, containerView, index, persisted, preferencesHint);
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
return null;
}
示例3: createEdge
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Edge createEdge(IAdaptable semanticAdapter, View containerView,
String semanticHint, int index, boolean persisted,
PreferencesHint preferencesHint) {
IElementType elementType = getSemanticElementType(semanticAdapter);
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
switch (edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramVisualIDRegistry
.getVisualID(elementTypeHint)) {
case edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.AssociationEditPart.VISUAL_ID:
return createAssociation_4001(getSemanticElement(semanticAdapter),
containerView, index, persisted, preferencesHint);
case edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.ClassParentEditPart.VISUAL_ID:
return createClassParent_4002(containerView, index, persisted,
preferencesHint);
}
// can never happen, provided #provides(CreateEdgeViewOperation) is correct
return null;
}
示例4: createNode
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createNode(IAdaptable semanticAdapter, View containerView,
String semanticHint, int index, boolean persisted,
PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
visualID = ArmyVisualIDRegistry.getNodeVisualID(containerView,
domainElement);
} else {
visualID = ArmyVisualIDRegistry.getVisualID(semanticHint);
}
switch (visualID) {
case UnitEditPart.VISUAL_ID:
return createUnit_2001(domainElement, containerView, index,
persisted, preferencesHint);
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
return null;
}
示例5: createNode
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createNode(IAdaptable semanticAdapter, View containerView,
String semanticHint, int index, boolean persisted,
PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
visualID = EconomyVisualIDRegistry.getNodeVisualID(containerView,
domainElement);
} else {
visualID = EconomyVisualIDRegistry.getVisualID(semanticHint);
}
switch (visualID) {
case GoldEditPart.VISUAL_ID:
return createGold_2001(domainElement, containerView, index,
persisted, preferencesHint);
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
return null;
}
示例6: createNode
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createNode(
IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted,
PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
visualID = ClassDiagramVisualIDRegistry.getNodeVisualID(containerView, domainElement);
}
else {
visualID = ClassDiagramVisualIDRegistry.getVisualID(semanticHint);
}
switch (visualID) {
case ClassEditPart.VISUAL_ID:
return createClass_2001(domainElement, containerView, index, persisted, preferencesHint);
case AttributeEditPart.VISUAL_ID:
return createAttribute_3001(domainElement, containerView, index, persisted, preferencesHint);
case OperationEditPart.VISUAL_ID:
return createOperation_3002(domainElement, containerView, index, persisted, preferencesHint);
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
return null;
}
示例7: createNode
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index,
boolean persisted, PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
visualID = edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getNodeVisualID(containerView, domainElement);
} else {
visualID = edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getVisualID(semanticHint);
}
switch (visualID) {
case edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.TableEditPart.VISUAL_ID:
return createTable_2001(domainElement, containerView, index, persisted, preferencesHint);
case edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.ColumnEditPart.VISUAL_ID:
return createColumn_3001(domainElement, containerView, index, persisted, preferencesHint);
case edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.ForeignKeyEditPart.VISUAL_ID:
return createForeignKey_3002(domainElement, containerView, index, persisted, preferencesHint);
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
return null;
}
示例8: start
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public void start(BundleContext context) throws Exception {
super.start(context);
instance = this;
myLogHelper = new LogHelper(this);
PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT,
getPreferenceStore());
adapterFactory = createAdapterFactory();
}
示例9: createDiagram
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Diagram createDiagram(IAdaptable semanticAdapter,
String diagramKind, PreferencesHint preferencesHint) {
Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
diagram.setType(StatemachineEditPart.MODEL_ID);
diagram.setElement(getSemanticElement(semanticAdapter));
diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
return diagram;
}
示例10: createEdge
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Edge createEdge(IAdaptable semanticAdapter, View containerView,
String semanticHint, int index, boolean persisted,
PreferencesHint preferencesHint) {
IElementType elementType = getSemanticElementType(semanticAdapter);
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
switch (StatemachineVisualIDRegistry.getVisualID(elementTypeHint)) {
case TransitionEditPart.VISUAL_ID:
return createTransition_4001(getSemanticElement(semanticAdapter),
containerView, index, persisted, preferencesHint);
}
// can never happen, provided #provides(CreateEdgeViewOperation) is correct
return null;
}
示例11: createState_2001
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createState_2001(EObject domainElement, View containerView,
int index, boolean persisted, PreferencesHint preferencesHint) {
Node node = NotationFactory.eINSTANCE.createNode();
node.getStyles()
.add(NotationFactory.eINSTANCE.createDescriptionStyle());
node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(StatemachineVisualIDRegistry
.getType(StateEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
.getPreferenceStore();
FontStyle nodeFontStyle = (FontStyle) node
.getStyle(NotationPackage.Literals.FONT_STYLE);
if (nodeFontStyle != null) {
FontData fontData = PreferenceConverter.getFontData(prefStore,
IPreferenceConstants.PREF_DEFAULT_FONT);
nodeFontStyle.setFontName(fontData.getName());
nodeFontStyle.setFontHeight(fontData.getHeight());
nodeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
nodeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
.getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
nodeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
.intValue());
}
Node label5001 = createLabel(node,
StatemachineVisualIDRegistry
.getType(StateNameEditPart.VISUAL_ID));
return node;
}
示例12: start
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
EValidator.Registry.INSTANCE.put(SGraphPackage.eINSTANCE, new DomainValidator());
}
示例13: start
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public void start(BundleContext context) throws Exception {
super.start(context);
instance = this;
PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT,
getPreferenceStore());
adapterFactory = createAdapterFactory();
}
示例14: createDiagram
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Diagram createDiagram(IAdaptable semanticAdapter,
String diagramKind, PreferencesHint preferencesHint) {
Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
diagram.setType(SystemEditPart.MODEL_ID);
diagram.setElement(getSemanticElement(semanticAdapter));
diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
return diagram;
}
示例15: createNode
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; //导入依赖的package包/类
/**
* @generated
*/
public Node createNode(IAdaptable semanticAdapter, View containerView,
String semanticHint, int index, boolean persisted,
PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
visualID = SmcVisualIDRegistry.getNodeVisualID(containerView,
domainElement);
} else {
visualID = SmcVisualIDRegistry.getVisualID(semanticHint);
}
switch (visualID) {
case SMCEditPart.VISUAL_ID:
return createSMC_2001(domainElement, containerView, index,
persisted, preferencesHint);
case PlayerEditPart.VISUAL_ID:
return createPlayer_2002(domainElement, containerView, index,
persisted, preferencesHint);
case RoleEditPart.VISUAL_ID:
return createRole_3001(domainElement, containerView, index,
persisted, preferencesHint);
case ContractEditPart.VISUAL_ID:
return createContract_3002(domainElement, containerView, index,
persisted, preferencesHint);
case FactEditPart.VISUAL_ID:
return createFact_3003(domainElement, containerView, index,
persisted, preferencesHint);
}
// can't happen, provided #provides(CreateNodeViewOperation) is correct
return null;
}