本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation.getContainerView方法的典型用法代码示例。如果您正苦于以下问题:Java CreateNodeViewOperation.getContainerView方法的具体用法?Java CreateNodeViewOperation.getContainerView怎么用?Java CreateNodeViewOperation.getContainerView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation
的用法示例。
在下文中一共展示了CreateNodeViewOperation.getContainerView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = StatemachineVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement);
} else {
visualID = StatemachineVisualIDRegistry.getVisualID(op
.getSemanticHint());
if (elementType != null) {
if (!StatemachineElementTypes.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != StatemachineVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!StatemachineEditPart.MODEL_ID
.equals(StatemachineVisualIDRegistry.getModelID(op
.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case StateEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != StatemachineVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return StateEditPart.VISUAL_ID == visualID;
}
示例2: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = SmcVisualIDRegistry.getNodeVisualID(op
.getContainerView(), domainElement);
} else {
visualID = SmcVisualIDRegistry.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!SmcElementTypes.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != SmcVisualIDRegistry.getNodeVisualID(op
.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!SystemEditPart.MODEL_ID.equals(SmcVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case SMCEditPart.VISUAL_ID:
case PlayerEditPart.VISUAL_ID:
case RoleEditPart.VISUAL_ID:
case ContractEditPart.VISUAL_ID:
case FactEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != SmcVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return SMCEditPart.VISUAL_ID == visualID
|| PlayerEditPart.VISUAL_ID == visualID
|| RoleEditPart.VISUAL_ID == visualID
|| ContractEditPart.VISUAL_ID == visualID
|| FactEditPart.VISUAL_ID == visualID;
}
示例3: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = Wc2014VisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement);
} else {
visualID = Wc2014VisualIDRegistry.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!Wc2014ElementTypes.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != Wc2014VisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!WorldCupEditPart.MODEL_ID.equals(Wc2014VisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case EliminationMatchEditPart.VISUAL_ID:
case TeamEditPart.VISUAL_ID:
case GroupEditPart.VISUAL_ID:
case GroupMatchEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != Wc2014VisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return EliminationMatchEditPart.VISUAL_ID == visualID
|| TeamEditPart.VISUAL_ID == visualID
|| GroupEditPart.VISUAL_ID == visualID
|| GroupMatchEditPart.VISUAL_ID == visualID;
}
示例4: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement);
} else {
visualID = edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOVisualIDRegistry
.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.providers.ICSE15_SequenceDiagram_MAVOElementTypes
.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.SequenceDiagramEditPart.MODEL_ID
.equals(edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.LifelineEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.ClassEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.MessageEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.OperationEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.LifelineEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.ClassEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.MessageEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts.OperationEditPart.VISUAL_ID == visualID;
}
示例5: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement);
} else {
visualID = edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramVisualIDRegistry
.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.providers.NECSIS14_ClassDiagramElementTypes
.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.ClassDiagramEditPart.MODEL_ID
.equals(edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.ClassEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.AttributeEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.ClassEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.AttributeEditPart.VISUAL_ID == visualID;
}
示例6: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement);
} else {
visualID = edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaVisualIDRegistry
.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.providers.NECSIS14_DatabaseSchemaElementTypes
.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.edit.parts.DatabaseSchemaEditPart.MODEL_ID
.equals(edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.edit.parts.TableEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.edit.parts.ColumnEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.edit.parts.TableEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.edit.parts.ColumnEditPart.VISUAL_ID == visualID;
}
示例7: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = MIDVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
}
else {
visualID = MIDVisualIDRegistry.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!MIDElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != MIDVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
}
else {
if (!MIDEditPart.MODEL_ID.equals(MIDVisualIDRegistry.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case ModelEditPart.VISUAL_ID:
case ModelRelEditPart.VISUAL_ID:
case OperatorEditPart.VISUAL_ID:
case Model2EditPart.VISUAL_ID:
case ModelRel2EditPart.VISUAL_ID:
if (domainElement == null || visualID != MIDVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return ModelEditPart.VISUAL_ID == visualID || Model2EditPart.VISUAL_ID == visualID
|| ModelRelEditPart.VISUAL_ID == visualID || ModelRel2EditPart.VISUAL_ID == visualID
|| OperatorEditPart.VISUAL_ID == visualID;
}
示例8: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = MIDVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
} else {
visualID = MIDVisualIDRegistry.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!MIDElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != MIDVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!ModelRelEditPart.MODEL_ID.equals(MIDVisualIDRegistry.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case ModelEndpointReferenceEditPart.VISUAL_ID:
case MappingReferenceEditPart.VISUAL_ID:
case ModelElementReferenceEditPart.VISUAL_ID:
case MappingReference2EditPart.VISUAL_ID:
case ModelEndpointReference2EditPart.VISUAL_ID:
case ModelElementReference2EditPart.VISUAL_ID:
case ModelElementReference3EditPart.VISUAL_ID:
if (domainElement == null
|| visualID != MIDVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return ModelEndpointReferenceEditPart.VISUAL_ID == visualID || MappingReferenceEditPart.VISUAL_ID == visualID
|| MappingReference2EditPart.VISUAL_ID == visualID
|| ModelEndpointReference2EditPart.VISUAL_ID == visualID
|| ModelElementReferenceEditPart.VISUAL_ID == visualID
|| ModelElementReference2EditPart.VISUAL_ID == visualID
|| ModelElementReference3EditPart.VISUAL_ID == visualID;
}
示例9: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement);
} else {
visualID = edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.providers.RelationalDatabase_MAVOElementTypes
.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.RelationalDatabaseEditPart.MODEL_ID
.equals(edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.TableEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.ColumnEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.ForeignKeyEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.TableEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.ColumnEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.edit.parts.ForeignKeyEditPart.VISUAL_ID == visualID;
}
示例10: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = RelationalDatabaseVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement);
} else {
visualID = RelationalDatabaseVisualIDRegistry.getVisualID(op
.getSemanticHint());
if (elementType != null) {
if (!RelationalDatabaseElementTypes
.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != RelationalDatabaseVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!RelationalDatabaseEditPart.MODEL_ID
.equals(RelationalDatabaseVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case TableEditPart.VISUAL_ID:
case ColumnEditPart.VISUAL_ID:
case ForeignKeyEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != RelationalDatabaseVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return TableEditPart.VISUAL_ID == visualID
|| ColumnEditPart.VISUAL_ID == visualID
|| ForeignKeyEditPart.VISUAL_ID == visualID;
}
示例11: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement);
} else {
visualID = edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOVisualIDRegistry
.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!edu.toronto.cs.se.modelepedia.istar_mavo.diagram.providers.IStar_MAVOElementTypes
.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.IStarEditPart.MODEL_ID
.equals(edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.SoftGoalEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.TaskEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.ResourceEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.GoalEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.ActorEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.SoftGoal2EditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.Task2EditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.Resource2EditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.Goal2EditPart.VISUAL_ID:
if (domainElement == null
|| visualID != edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.SoftGoalEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.TaskEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.ResourceEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.GoalEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.ActorEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.SoftGoal2EditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.Task2EditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.Resource2EditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.istar_mavo.diagram.edit.parts.Goal2EditPart.VISUAL_ID == visualID;
}
示例12: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = IStarVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement);
} else {
visualID = IStarVisualIDRegistry.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!IStarElementTypes.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != IStarVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!IStarEditPart.MODEL_ID.equals(IStarVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case SoftGoalEditPart.VISUAL_ID:
case TaskEditPart.VISUAL_ID:
case ResourceEditPart.VISUAL_ID:
case GoalEditPart.VISUAL_ID:
case ActorEditPart.VISUAL_ID:
case SoftGoal2EditPart.VISUAL_ID:
case Task2EditPart.VISUAL_ID:
case Resource2EditPart.VISUAL_ID:
case Goal2EditPart.VISUAL_ID:
if (domainElement == null
|| visualID != IStarVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return SoftGoalEditPart.VISUAL_ID == visualID
|| TaskEditPart.VISUAL_ID == visualID
|| ResourceEditPart.VISUAL_ID == visualID
|| GoalEditPart.VISUAL_ID == visualID
|| ActorEditPart.VISUAL_ID == visualID
|| SoftGoal2EditPart.VISUAL_ID == visualID
|| Task2EditPart.VISUAL_ID == visualID
|| Resource2EditPart.VISUAL_ID == visualID
|| Goal2EditPart.VISUAL_ID == visualID;
}
示例13: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = StateMachineVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement);
} else {
visualID = StateMachineVisualIDRegistry.getVisualID(op
.getSemanticHint());
if (elementType != null) {
if (!StateMachineElementTypes.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != StateMachineVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!StateMachineEditPart.MODEL_ID
.equals(StateMachineVisualIDRegistry.getModelID(op
.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case StateEditPart.VISUAL_ID:
case InitialStateEditPart.VISUAL_ID:
case FinalStateEditPart.VISUAL_ID:
case StateActionEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != StateMachineVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return StateEditPart.VISUAL_ID == visualID
|| InitialStateEditPart.VISUAL_ID == visualID
|| FinalStateEditPart.VISUAL_ID == visualID
|| StateActionEditPart.VISUAL_ID == visualID;
}
示例14: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement);
} else {
visualID = edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry
.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.providers.StateMachine_MAVOElementTypes
.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.StateMachineEditPart.MODEL_ID
.equals(edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.StateEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.InitialStateEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.FinalStateEditPart.VISUAL_ID:
case edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.StateActionEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry
.getNodeVisualID(op.getContainerView(), domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.StateEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.InitialStateEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.FinalStateEditPart.VISUAL_ID == visualID
|| edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.edit.parts.StateActionEditPart.VISUAL_ID == visualID;
}
示例15: provides
import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation; //导入方法依赖的package包/类
/**
* @generated
*/
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
}
IElementType elementType = getSemanticElementType(op
.getSemanticAdapter());
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
// In this situation there should be NO elementType, visualID will be determined
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
}
visualID = StateVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement);
} else {
visualID = StateVisualIDRegistry.getVisualID(op.getSemanticHint());
if (elementType != null) {
if (!StateElementTypes.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
}
String elementTypeHint = ((IHintedType) elementType)
.getSemanticHint();
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the same as in element type
}
if (domainElement != null
&& visualID != StateVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id from element type
}
} else {
if (!StateEditPart.MODEL_ID.equals(StateVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
}
switch (visualID) {
case RegionEditPart.VISUAL_ID:
case CityEditPart.VISUAL_ID:
if (domainElement == null
|| visualID != StateVisualIDRegistry
.getNodeVisualID(op.getContainerView(),
domainElement)) {
return false; // visual id in semantic hint should match visual id for domain element
}
break;
default:
return false;
}
}
}
return RegionEditPart.VISUAL_ID == visualID
|| CityEditPart.VISUAL_ID == visualID;
}