Search in sources :

Example 6 with RepresentationDescription

use of org.eclipse.sirius.viewpoint.description.RepresentationDescription in project Palladio-Editors-Sirius by PalladioSimulator.

the class Activator method start.

/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
public void start(BundleContext bundleContext) throws Exception {
    Activator.context = bundleContext;
    Activator.plugin = this;
    Set<Viewpoint> viewpoints = ViewpointRegistry.getInstance().getViewpoints();
    // Set viewpoint constants
    for (final Viewpoint v : viewpoints) {
        if (v.getName().equals(VIEWPOINT_NAME)) {
            this.viewpoint = v;
            break;
        }
    }
    // Set diagram description constants
    for (final RepresentationDescription representationDescription : this.viewpoint.getOwnedRepresentations()) {
        if (representationDescription.getName().equals(REPRESENTATION_NAME)) {
            this.representationDescription = representationDescription;
            break;
        }
    }
}
Also used : RepresentationDescription(org.eclipse.sirius.viewpoint.description.RepresentationDescription) Viewpoint(org.eclipse.sirius.viewpoint.description.Viewpoint)

Example 7 with RepresentationDescription

use of org.eclipse.sirius.viewpoint.description.RepresentationDescription in project Palladio-Editors-Sirius by PalladioSimulator.

the class Activator method start.

/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.
	 * BundleContext)
	 */
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    viewpoints = new HashSet<Viewpoint>();
    viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/seff.odesign"));
    // Set viewpoint constants
    for (final Viewpoint v : viewpoints) {
        if (v.getName().equals(VIEWPOINT_NAME)) {
            this.viewpoint = v;
            break;
        }
    }
    // Set diagram description constants
    for (final RepresentationDescription representationDescription : this.viewpoint.getOwnedRepresentations()) {
        if (representationDescription.getName().equals(REPRESENTATION_NAME)) {
            this.representationDescription = representationDescription;
            break;
        }
    }
}
Also used : RepresentationDescription(org.eclipse.sirius.viewpoint.description.RepresentationDescription) Viewpoint(org.eclipse.sirius.viewpoint.description.Viewpoint)

Example 8 with RepresentationDescription

use of org.eclipse.sirius.viewpoint.description.RepresentationDescription in project Palladio-Editors-Sirius by PalladioSimulator.

the class Activator method start.

/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
public void start(BundleContext bundleContext) throws Exception {
    Activator.context = bundleContext;
    Activator.plugin = this;
    Set<Viewpoint> viewpoints = ViewpointRegistry.getInstance().getViewpoints();
    // Set viewpoint constants
    for (final Viewpoint v : viewpoints) {
        if (v.getName().equals(VIEWPOINT_NAME)) {
            this.viewpoint = v;
            break;
        }
    }
    // Set diagram description constants
    for (final RepresentationDescription representationDescription : this.viewpoint.getOwnedRepresentations()) {
        if (representationDescription.getName().equals(REPRESENTATION_NAME)) {
            this.representationDescription = representationDescription;
            break;
        }
    }
}
Also used : RepresentationDescription(org.eclipse.sirius.viewpoint.description.RepresentationDescription) Viewpoint(org.eclipse.sirius.viewpoint.description.Viewpoint)

Aggregations

RepresentationDescription (org.eclipse.sirius.viewpoint.description.RepresentationDescription)8 Viewpoint (org.eclipse.sirius.viewpoint.description.Viewpoint)8 Session (org.eclipse.sirius.business.api.session.Session)2 DRepresentation (org.eclipse.sirius.viewpoint.DRepresentation)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 URI (org.eclipse.emf.common.util.URI)1 EObject (org.eclipse.emf.ecore.EObject)1