Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Model


   
    // create the decorator for the UML model
    List<EObject> contents = modelResource.getContents();
    for (EObject obj : contents) {
      if (obj instanceof Model) {
        Model model = (Model)obj;
        try {
          modelDec = (ModelDecorator) decFactory.getDecorator(model);
          break;
        } catch (ClassNotFoundException e) {
          throw new TranslationException(this, "Initialization failed", e);
View Full Code Here


   
    // create the decorator for the UML model
    List<EObject> contents = loadResource().getContents();
    for (EObject obj : contents) {
      if (obj instanceof Model) {
        Model model = (Model)obj;
        try {
          return (ModelDecorator) decFactory.getDecorator(model);
        } catch (ClassNotFoundException e) {
          throw new ResourceException("Unable to load first model", e);
        } catch (InvalidContextException e) {
View Full Code Here

  /**
   * Gets the device used to deploy the artifact that implements this action.
   * @return the device if found, otherwise null.
   */
  public Device getDeploymentDevice() {
    Model model = artifact.getModel();
    try {
      ModelDecorator modelDec = (ModelDecorator) getFactory().getDecorator(model);
      for (Device device : modelDec.getAllExecutionHosts()) {
        DeviceDecorator deviceDec = (DeviceDecorator) getFactory().getDecorator(device);
        if (deviceDec.getAllDeployedArtifacts().contains(artifact)) return device;
View Full Code Here

public class ClassicalBUtils {
  public static Model openUMLModel(IFile file) {
    ResourceSet resourceSet = new ResourceSetImpl();
    URI uri = URI.createURI(file.getFullPath().toString());
    Resource resource = resourceSet.getResource(uri, true);
    Model model = (Model) resource.getContents().get(0);
   
    return model;
  }
View Full Code Here

    } else {
      MessageDialog.openWarning(shell, "Transformation can't be called on: ", object.getClass().getName());
      return null;
    }
   
    Model model = IOUtil.openUMLModel(file);
   
    HtmlGenerator generator = new HtmlGenerator();
    try {
      IOUtil.writeProjectFile(file.getProject(), file.getProjectRelativePath().removeLastSegments(1), "report.html", generator.generate(model).toString());
    } catch (CoreException e) {
View Full Code Here

    IProject project = root.getProject(page.getProjectName());
    IProgressMonitor monitor = new NullProgressMonitor();
    shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();

    // Perform model check
    Model model = ClassicalBUtils.openUMLModel(model_file);

    if (page.performModelCheck()) {
      IStatus status = ClassicalBUtils.validateModel(model);

      if (!status.isOK()) {
View Full Code Here

    IProject project = root.getProject(page.getProjectName());
    IProgressMonitor monitor = new NullProgressMonitor();
    shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();

    // Perform model check
    Model model = Util.openUMLModel(model_file);

    if (page.performModelCheck()) {
      IStatus status = Util.validateModel(model);

      if (!status.isOK()) {
View Full Code Here

    }
   
    EcoreUtil.resolveAll(resourceSet);
    EcoreUtil.resolveAll(resource);
   
    Model model = (Model) resource.getContents().get(0);
    return model;
  }
View Full Code Here

      parentProfile = Activator.getSysMLProfile();
    } else if (profileQualifiedName.startsWith("Standard")) {
      parentProfile = Activator.getStandardProfile();
    }

    Package profilePackage = parentProfile;

    final String[] profiles = profileQualifiedName.split(":{2}");
    // search the profile in the package hierarchy
    for (int index = 1; index < profiles.length - 1; index++) {
      profilePackage = profilePackage.getNestedPackage(profiles[index]);
    }

    Profile profile = (Profile)profilePackage;

    if (profileQualifiedName.startsWith("SysML")) {
      profile = (Profile)profilePackage.getNestedPackage(profiles[profiles.length - 1]);
    }

    if (profile == null) {
      final String message = "Can't apply the profile " + profileQualifiedName + " on "
          + p.getQualifiedName();
View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_Property(Property newBase_Property) {
    Property oldBase_Property = base_Property;
    base_Property = newBase_Property;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.