当前位置: 首页>>代码示例>>Java>>正文


Java PreferencesHint类代码示例

本文整理汇总了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;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:23,代码来源:StatemachineViewProvider.java

示例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;
}
 
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:29,代码来源:TransformationDependencyViewProvider.java

示例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;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:21,代码来源:NECSIS14_ClassDiagramViewProvider.java

示例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;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:ArmyViewProvider.java

示例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;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:EconomyViewProvider.java

示例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;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:ClassDiagramViewProvider.java

示例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;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:RelationalDatabase_MAVOViewProvider.java

示例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();
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:12,代码来源:StatemachineDiagramEditorPlugin.java

示例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;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:13,代码来源:StatemachineViewProvider.java

示例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;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:17,代码来源:StatemachineViewProvider.java

示例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;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:38,代码来源:StatemachineViewProvider.java

示例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());
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:8,代码来源:DiagramActivator.java

示例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();
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:11,代码来源:SmcDiagramEditorPlugin.java

示例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;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:13,代码来源:SmcViewProvider.java

示例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;
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:35,代码来源:SmcViewProvider.java


注:本文中的org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。