use of org.eclipse.emf.ecore.EAnnotation in project tdi-studio-se by Talend.
the class GearBusinessItemViewFactory method decorateView.
/**
* @generated
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
semanticHint = BusinessVisualIDRegistry.getType(org.talend.designer.business.model.business.diagram.edit.parts.GearBusinessItemEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
if (!BusinessProcessEditPart.MODEL_ID.equals(BusinessVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
//$NON-NLS-1$
shortcutAnnotation.setSource("Shortcut");
//$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", BusinessProcessEditPart.MODEL_ID);
view.getEAnnotations().add(shortcutAnnotation);
}
getViewService().createNode(semanticAdapter, view, BusinessVisualIDRegistry.getType(GearBusinessItemNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
use of org.eclipse.emf.ecore.EAnnotation in project tdi-studio-se by Talend.
the class BusinessVisualIDRegistry method getModelID.
/**
* @generated
*/
public static String getModelID(View view) {
View diagram = view.getDiagram();
while (view != diagram) {
//$NON-NLS-1$
EAnnotation annotation = view.getEAnnotation("Shortcut");
if (annotation != null) {
//$NON-NLS-1$
return (String) annotation.getDetails().get("modelID");
}
view = (View) view.eContainer();
}
return diagram != null ? diagram.getType() : null;
}
use of org.eclipse.emf.ecore.EAnnotation in project tdi-studio-se by Talend.
the class DataBusinessItemViewFactory method decorateView.
/**
* @generated
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
semanticHint = BusinessVisualIDRegistry.getType(org.talend.designer.business.model.business.diagram.edit.parts.DataBusinessItemEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
if (!BusinessProcessEditPart.MODEL_ID.equals(BusinessVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
//$NON-NLS-1$
shortcutAnnotation.setSource("Shortcut");
//$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", BusinessProcessEditPart.MODEL_ID);
view.getEAnnotations().add(shortcutAnnotation);
}
getViewService().createNode(semanticAdapter, view, BusinessVisualIDRegistry.getType(DataBusinessItemNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
use of org.eclipse.emf.ecore.EAnnotation in project tdi-studio-se by Talend.
the class DatabaseBusinessItemViewFactory method decorateView.
/**
* @generated
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
semanticHint = BusinessVisualIDRegistry.getType(org.talend.designer.business.model.business.diagram.edit.parts.DatabaseBusinessItemEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
if (!BusinessProcessEditPart.MODEL_ID.equals(BusinessVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
//$NON-NLS-1$
shortcutAnnotation.setSource("Shortcut");
//$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", BusinessProcessEditPart.MODEL_ID);
view.getEAnnotations().add(shortcutAnnotation);
}
getViewService().createNode(semanticAdapter, view, BusinessVisualIDRegistry.getType(DatabaseBusinessItemNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
use of org.eclipse.emf.ecore.EAnnotation in project tdi-studio-se by Talend.
the class BidirectionalBusinessItemRelationshipViewFactory method decorateView.
/**
* @generated
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
semanticHint = BusinessVisualIDRegistry.getType(org.talend.designer.business.model.business.diagram.edit.parts.BidirectionalBusinessItemRelationshipEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
if (!BusinessProcessEditPart.MODEL_ID.equals(BusinessVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
//$NON-NLS-1$
shortcutAnnotation.setSource("Shortcut");
//$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", BusinessProcessEditPart.MODEL_ID);
view.getEAnnotations().add(shortcutAnnotation);
}
getViewService().createNode(semanticAdapter, view, BusinessVisualIDRegistry.getType(BidirectionalBusinessItemRelationshipNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
Aggregations