Package net.sourceforge.coffea.uml2.model.impl

Examples of net.sourceforge.coffea.uml2.model.impl.InterfaceService


      element = element.getParent();
    }
    // Once we have a package to process
    if(element != null) {
      // We will be able to build a model
      ModelServiceBuilder builder =
        new ModelServiceBuilder(lastSourceViewId);
      // We can start building the model using a sub-progress monitor
      model =
        builder.buildModelService(
            element,
            new SubProgressMonitor(monitor, 7)
        );
      // We get the package location to have the absolute URL
      IPath res = element.getResource().getLocation();
      String path = res.toOSString();
      // We save documents from the processed elements to the package
      // URL
      builder.save(
          path,
          builder.getCoffeeName(),
          new SubProgressMonitor(monitor, 3)
      );
      lastSourceWorkbenchWindow = null;
    }
  }
View Full Code Here


          target =
            new File(
                proj.getLocation().toOSString()
            );
        }
        ModelServiceBuilder worker =
          new ModelServiceBuilder(sourceViewId);
        worker.setCoffeeName(proj.getName());
        IModelService model =
          worker.parseFile(target);
        // Save the reversed model in the file system
        worker.save(
            target.getPath(),
            worker.getCoffeeName()
        );
        workbenchWindow = null;
        return model;
      }
    }
View Full Code Here

            sourceViewId = viewPart.getId();
          }
        }
      }
    }
    serviceBuilder = new ModelServiceBuilder(sourceViewId);
    Composite containerComposite = new Composite(parentComposite, SWT.NONE);
    containerComposite.setLayout(new FillLayout());
    Canvas canvas = new Canvas(containerComposite, SWT.NULL);
    figureSystem = new LightweightSystem(canvas);
    getSite().getPage().addSelectionListener(this);
View Full Code Here

                        c
                    );
                }
                else {
                  service =
                    new ClassService(
                        t,
                        group,
                        c
                    );
                }
View Full Code Here

    // 3°) Third step, we can process the type declaration
    if(t.isInterface()) {
      result = new InterfaceService(t, group, rewriter, u);
    }
    else {
      result = new ClassService(t, group, rewriter, u);
    }
    return result;
  }
View Full Code Here

      for (int i=0 ; i<fields.length ; i++) {
        // We add a tool to the list
        addPropertyService(new PropertyService(fields[i], this));
        // And a dependency
        dependenciesServices.add(
            new CompositionService(fields[i], this)
        );
      }
      // If this class has a super class,
      if(syntaxTreeNode.getSuperclassType()!=null) {
        // We resolve this super class
        ITypeBinding binding =
          syntaxTreeNode.getSuperclassType().resolveBinding();
        // And try to get its name
        if(binding!=null) {
          superClassName = binding.getQualifiedName();
          int smtIdx = superClassName.indexOf('<');
          if(smtIdx>=0) {
            superClassName =
              superClassName.substring(0, smtIdx);
          }
        }
      }
    }
    else if(javaElement!=null) {
      // We get all the fields
      try {
        IField[] fields = javaElement.getFields();
        // For each field of the class,
        for (int i=0 ; i<fields.length ; i++) {
          // We add a tool to the list
          addPropertyService(
              new PropertyService(fields[i], this)
          );
          // And a dependency
          dependenciesServices.add(
              new CompositionService(fields[i], this)
          );
        }
        // If this class has a super class,
        if(javaElement.getSuperclassName()!=null) {
          // The we note its name
View Full Code Here

              }
              // Second step, we can process the type
              try {
                if(t.isInterface()) {
                  service =
                    new InterfaceService(
                        t,
                        group,
                        c
                    );
                }
View Full Code Here

    ImportDeclaration id = ast.newImportDeclaration();
    id.setName(ast.newName(new String[] {"java", "util", "Set"}));
    ASTRewrite rewriter = ASTRewrite.create(ast);
    // 3°) Third step, we can process the type declaration
    if(t.isInterface()) {
      result = new InterfaceService(t, group, rewriter, u);
    }
    else {
      result = new ClassService(t, group, rewriter, u);
    }
    return result;
View Full Code Here

    init();
    if(target!=null) {
      if(getCoffeeName()==null) {
        this.setCoffeeName(target.getName());
      }
      model = new ModelService(this);
      parse(target);
    }
    return model;
 
View Full Code Here

      return processedModel;
    }
  }

  public IModelService buildModelService(IJavaProject p) {
    model = new ModelService(this);
    model.setJavaProject(p);
    return model;
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.coffea.uml2.model.impl.InterfaceService

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.