Java Code Examples for org.eclipse.emf.ecore.EAnnotation#setSource()
The following examples show how to use
org.eclipse.emf.ecore.EAnnotation#setSource() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TreeLayoutUtil.java From statecharts with Eclipse Public License 1.0 | 6 votes |
public static void setTreeNodesPositionAnnotation(List<View> viewElements) { if (viewElements != null) { for (int index = 0; index < viewElements.size(); index++) { final View view = viewElements.get(index); EAnnotation xmiIdAnnotation = view .getEAnnotation(TREE_LAYOUT_ANNOTATION); if (xmiIdAnnotation == null) { xmiIdAnnotation = EcoreFactory.eINSTANCE .createEAnnotation(); xmiIdAnnotation.setSource(TREE_LAYOUT_ANNOTATION); } xmiIdAnnotation.getDetails().put(TREE_NODE_POSITION, Integer.toString(index)); xmiIdAnnotation.setEModelElement(view); } } }
Example 2
Source File: CrossflowViewProvider.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ private void stampShortcut(View containerView, Node target) { if (!WorkflowEditPart.MODEL_ID.equals(CrossflowVisualIDRegistry.getModelID(containerView))) { EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation.getDetails().put("modelID", WorkflowEditPart.MODEL_ID); //$NON-NLS-1$ target.getEAnnotations().add(shortcutAnnotation); } }
Example 3
Source File: ProcessViewProvider.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ private void stampShortcut(View containerView, Node target) { if (!MainProcessEditPart.MODEL_ID.equals(ProcessVisualIDRegistry.getModelID(containerView))) { EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation.getDetails().put("modelID", MainProcessEditPart.MODEL_ID); //$NON-NLS-1$ target.getEAnnotations().add(shortcutAnnotation); } }
Example 4
Source File: Schema.java From BIMserver with GNU Affero General Public License v3.0 | 5 votes |
public void addIndex(EStructuralFeature eStructuralFeature) { for (EAnnotation eAnnotation : eStructuralFeature.getEAnnotations()) { if (eAnnotation.getSource().equals("singleindex")) { throw new RuntimeException(eStructuralFeature + " already has an index"); } } changes.add(new AddIndexChange(this, eStructuralFeature)); EAnnotation index = EcoreFactory.eINSTANCE.createEAnnotation(); index.setSource("singleindex"); eStructuralFeature.getEAnnotations().add(index); }
Example 5
Source File: TreeLayoutUtil.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public static void setTreeNodeParentAnnotation(View child, View parent) { EAnnotation xmiIdAnnotation = child .getEAnnotation(TREE_LAYOUT_ANNOTATION); if (xmiIdAnnotation == null) { xmiIdAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); xmiIdAnnotation.setSource(TREE_LAYOUT_ANNOTATION); } xmiIdAnnotation.getDetails().put(TREE_NODE_PARENT_URI, parent.eResource().getURIFragment(parent)); xmiIdAnnotation.setEModelElement(child); }
Example 6
Source File: SubdiagramAwareCopyCommand.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected EAnnotation getMeasurementUnitAnnotation(List views) { View firstView = (View) views.get(0); Diagram dgrm = firstView.getDiagram(); EAnnotation measureUnitAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); measureUnitAnnotation.setSource(dgrm.getMeasurementUnit().getName()); return measureUnitAnnotation; }
Example 7
Source File: CrossflowCreateShortcutDecorationsCommand.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { for (Iterator it = myDescriptors.iterator(); it.hasNext();) { CreateViewRequest.ViewDescriptor nextDescriptor = (CreateViewRequest.ViewDescriptor) it.next(); View view = (View) nextDescriptor.getAdapter(View.class); if (view != null && view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ shortcutAnnotation.getDetails().put("modelID", WorkflowEditPart.MODEL_ID); //$NON-NLS-1$ view.getEAnnotations().add(shortcutAnnotation); } } return CommandResult.newOKCommandResult(); }
Example 8
Source File: Migration.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
protected EAnnotation createEmbedsReferenceAnnotation() { EAnnotation embedsReferenceAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); embedsReferenceAnnotation.setSource("embedsreference"); return embedsReferenceAnnotation; }
Example 9
Source File: Migration.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
protected EAnnotation createDbEmbedReferenceAnnotation() { EAnnotation embedsReferenceAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); embedsReferenceAnnotation.setSource("dbembed"); return embedsReferenceAnnotation; }
Example 10
Source File: Migration.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
protected EAnnotation createNoDatabaseAnnotation() { EAnnotation embedsReferenceAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); embedsReferenceAnnotation.setSource("nodatabase"); return embedsReferenceAnnotation; }
Example 11
Source File: Migration.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
protected EAnnotation createHiddenAnnotation() { EAnnotation hidden = EcoreFactory.eINSTANCE.createEAnnotation(); hidden.setSource("hidden"); return hidden; }
Example 12
Source File: Migration.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
@Deprecated protected EAnnotation createNoLazyLoadAnnotation() { EAnnotation hidden = EcoreFactory.eINSTANCE.createEAnnotation(); hidden.setSource("nolazyload"); return hidden; }
Example 13
Source File: Migration.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
protected EAnnotation createUniqueAnnotation() { EAnnotation unique = EcoreFactory.eINSTANCE.createEAnnotation(); unique.setSource("unique"); return unique; }
Example 14
Source File: Express2EMF.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
private EAnnotation createWrappedAnnotation() { EAnnotation wrappedAnnotation = eFactory.createEAnnotation(); wrappedAnnotation.setSource("wrapped"); return wrappedAnnotation; }
Example 15
Source File: Express2EMF.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
private EAnnotation createHiddenAnnotation() { EAnnotation hiddenAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); hiddenAnnotation.setSource("hidden"); return hiddenAnnotation; }
Example 16
Source File: Express2EMF.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
private EAnnotation createAsStringAnnotation() { EAnnotation asStringAnnotation = eFactory.createEAnnotation(); asStringAnnotation.setSource("asstring"); return asStringAnnotation; }
Example 17
Source File: Express2EMF.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
private EAnnotation createInverseAnnotation() { EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); eAnnotation.setSource("inverse"); return eAnnotation; }
Example 18
Source File: Express2EMF.java From BIMserver with GNU Affero General Public License v3.0 | 4 votes |
private EAnnotation createTwoDimensionalArrayAnnotation() { EAnnotation asStringAnnotation = eFactory.createEAnnotation(); asStringAnnotation.setSource("twodimensionalarray"); return asStringAnnotation; }