Search in sources :

Example 1 with IArchimatePackage

use of com.archimatetool.model.IArchimatePackage in project archi by archimatetool.

the class ArchimatePackage method init.

/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 *
 * <p>This method is used to initialize {@link IArchimatePackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static IArchimatePackage init() {
    if (isInited)
        return (IArchimatePackage) EPackage.Registry.INSTANCE.getEPackage(IArchimatePackage.eNS_URI);
    // Obtain or create and register package
    Object registeredArchimatePackage = EPackage.Registry.INSTANCE.get(eNS_URI);
    ArchimatePackage theArchimatePackage = registeredArchimatePackage instanceof ArchimatePackage ? (ArchimatePackage) registeredArchimatePackage : new ArchimatePackage();
    isInited = true;
    // Create package meta-data objects
    theArchimatePackage.createPackageContents();
    // Initialize created meta-data
    theArchimatePackage.initializePackageContents();
    // Mark meta-data to indicate it can't be changed
    theArchimatePackage.freeze();
    // Update the registry and return the package
    EPackage.Registry.INSTANCE.put(IArchimatePackage.eNS_URI, theArchimatePackage);
    return theArchimatePackage;
}
Also used : IDiagramModelArchimateObject(com.archimatetool.model.IDiagramModelArchimateObject) IDataObject(com.archimatetool.model.IDataObject) IBorderObject(com.archimatetool.model.IBorderObject) IDiagramModelObject(com.archimatetool.model.IDiagramModelObject) ITechnologyObject(com.archimatetool.model.ITechnologyObject) IArchimateModelObject(com.archimatetool.model.IArchimateModelObject) ILineObject(com.archimatetool.model.ILineObject) IBusinessObject(com.archimatetool.model.IBusinessObject) IArchimatePackage(com.archimatetool.model.IArchimatePackage)

Example 2 with IArchimatePackage

use of com.archimatetool.model.IArchimatePackage in project archi by archimatetool.

the class CanvasPackage method initializePackageContents.

/**
 * Complete the initialization of the package and its meta-model.  This
 * method is guarded to have no affect on any invocation but its first.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void initializePackageContents() {
    if (isInitialized)
        return;
    isInitialized = true;
    // Initialize package
    setName(eNAME);
    setNsPrefix(eNS_PREFIX);
    setNsURI(eNS_URI);
    // Obtain other dependent packages
    IArchimatePackage theArchimatePackage = (IArchimatePackage) EPackage.Registry.INSTANCE.getEPackage(IArchimatePackage.eNS_URI);
    // Create type parameters
    // Set bounds for type parameters
    // Add supertypes to classes
    canvasModelEClass.getESuperTypes().add(theArchimatePackage.getDiagramModel());
    canvasModelEClass.getESuperTypes().add(this.getHintProvider());
    canvasModelEClass.getESuperTypes().add(this.getHelpHintProvider());
    canvasModelStickyEClass.getESuperTypes().add(theArchimatePackage.getIconic());
    canvasModelStickyEClass.getESuperTypes().add(theArchimatePackage.getTextContent());
    canvasModelStickyEClass.getESuperTypes().add(this.getNotesContent());
    canvasModelStickyEClass.getESuperTypes().add(theArchimatePackage.getProperties());
    canvasModelStickyEClass.getESuperTypes().add(theArchimatePackage.getLockable());
    canvasModelStickyEClass.getESuperTypes().add(theArchimatePackage.getBorderObject());
    canvasModelStickyEClass.getESuperTypes().add(theArchimatePackage.getTextPosition());
    canvasModelBlockEClass.getESuperTypes().add(theArchimatePackage.getIconic());
    canvasModelBlockEClass.getESuperTypes().add(theArchimatePackage.getDiagramModelContainer());
    canvasModelBlockEClass.getESuperTypes().add(theArchimatePackage.getProperties());
    canvasModelBlockEClass.getESuperTypes().add(theArchimatePackage.getLockable());
    canvasModelBlockEClass.getESuperTypes().add(theArchimatePackage.getBorderObject());
    canvasModelBlockEClass.getESuperTypes().add(this.getHelpHintProvider());
    canvasModelBlockEClass.getESuperTypes().add(this.getHintProvider());
    canvasModelBlockEClass.getESuperTypes().add(theArchimatePackage.getTextContent());
    canvasModelBlockEClass.getESuperTypes().add(theArchimatePackage.getTextPosition());
    canvasModelImageEClass.getESuperTypes().add(theArchimatePackage.getDiagramModelImage());
    canvasModelImageEClass.getESuperTypes().add(theArchimatePackage.getLockable());
    canvasModelConnectionEClass.getESuperTypes().add(theArchimatePackage.getDiagramModelConnection());
    canvasModelConnectionEClass.getESuperTypes().add(theArchimatePackage.getLockable());
    // Initialize classes and features; add operations and parameters
    // $NON-NLS-1$
    initEClass(hintProviderEClass, IHintProvider.class, "HintProvider", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    // $NON-NLS-1$ //$NON-NLS-2$
    initEAttribute(getHintProvider_HintTitle(), ecorePackage.getEString(), "hintTitle", "", 0, 1, IHintProvider.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    // $NON-NLS-1$ //$NON-NLS-2$
    initEAttribute(getHintProvider_HintContent(), ecorePackage.getEString(), "hintContent", "", 0, 1, IHintProvider.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    // $NON-NLS-1$
    initEClass(helpHintProviderEClass, IHelpHintProvider.class, "HelpHintProvider", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
    // $NON-NLS-1$
    initEClass(notesContentEClass, INotesContent.class, "NotesContent", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    // $NON-NLS-1$ //$NON-NLS-2$
    initEAttribute(getNotesContent_Notes(), ecorePackage.getEString(), "notes", "", 0, 1, INotesContent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    // $NON-NLS-1$
    initEClass(canvasModelEClass, ICanvasModel.class, "CanvasModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    // $NON-NLS-1$
    initEClass(canvasModelStickyEClass, ICanvasModelSticky.class, "CanvasModelSticky", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    // $NON-NLS-1$
    initEClass(canvasModelBlockEClass, ICanvasModelBlock.class, "CanvasModelBlock", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    // $NON-NLS-1$
    initEClass(canvasModelImageEClass, ICanvasModelImage.class, "CanvasModelImage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    // $NON-NLS-1$
    initEClass(canvasModelConnectionEClass, ICanvasModelConnection.class, "CanvasModelConnection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    // Create resource
    createResource(eNS_URI);
    // Create annotations
    // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
    createExtendedMetaDataAnnotations();
}
Also used : IArchimatePackage(com.archimatetool.model.IArchimatePackage)

Aggregations

IArchimatePackage (com.archimatetool.model.IArchimatePackage)2 IArchimateModelObject (com.archimatetool.model.IArchimateModelObject)1 IBorderObject (com.archimatetool.model.IBorderObject)1 IBusinessObject (com.archimatetool.model.IBusinessObject)1 IDataObject (com.archimatetool.model.IDataObject)1 IDiagramModelArchimateObject (com.archimatetool.model.IDiagramModelArchimateObject)1 IDiagramModelObject (com.archimatetool.model.IDiagramModelObject)1 ILineObject (com.archimatetool.model.ILineObject)1 ITechnologyObject (com.archimatetool.model.ITechnologyObject)1