Package net.sourceforge.coffea.uml2.model

Examples of net.sourceforge.coffea.uml2.model.IModelHandling


    completeConstruction(p);
  }

  public void retrieveContainerFromHierarchy() {
    IModelService m = getModelService();
    IPackagesGroupService parent = null;
    String parentName = getFullName();
    int indexFirstPoint = -1;
    while (parent == null) {
      indexFirstPoint = parentName.lastIndexOf('.');
      if (indexFirstPoint >= 0) {
View Full Code Here


          for(int i=0 ; i<types.size() ; i++) {
            t = types.get(i);
            if(t!=null) {
              // In a first step, we are going to process
              // the class container
              ITypesContainerService group = null;
              // If the parent is the compilation unit,
              if(
                  (t.getParent()==c)
                  &&(t.getPackageFragment()!=null)
              ) {
View Full Code Here

      CompilationUnit u
  ) {
    ITypeService<?, ?> result = null;
    // 1°) In a first step, we are going to process the package
    // declaration
    ITypesContainerService group;
    if(u.getPackage()!=null) {
      group =
        model.resolvePackageService(
            u.getPackage().getName().getFullyQualifiedName()
        );
View Full Code Here

  protected void completeConstruction(
      ASTRewrite r,
      IOwnerService p
  ) {
    if(p instanceof ITypesContainerService) {
      ITypesContainerService cont =
        (ITypesContainerService)p;
      cont.addTypeService(this);
    }
    this.rewriter = r;
    superInterfacesNames = new ArrayList<String>();
    List<?> interfaces = null;
    this.operationsServices = new ArrayList<IMethodService>();
View Full Code Here

              new PerformRefactoringOperation(
                  r,
                  CheckConditionsOperation.FINAL_CONDITIONS
              );
            op.run(monitor);
            ITypesContainerService contH = getContainerService();
            if(contH!=null) {
              String newFullName = contH.getFullName();
              newFullName += '.' + newName;
              IType tp = null;
              if(processedUnit!=null) {
                tp =
                  processedUnit.getJavaProject().findType(
                      newFullName
                  );
              }
              else {
                tp =
                  javaElement.getJavaProject().findType(
                      newFullName
                  );
              }
              if(tp!=null) {
                ICompilationUnit newUnit =
                  tp.getCompilationUnit();
                if(newUnit!=null) {
                  ITypeService<?, ?> tpH =
                    getModelService().getServiceBuilder()
                    .processTypeService(
                        newUnit,
                        new NullProgressMonitor()
                    );
                  if(tpH!=null) {
                    contH.addTypeService(tpH);
                    contH.getTypesServices().remove(this);
                  }
                }
              }
            }
          } catch (CoreException e) {
View Full Code Here

      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    */
    CreateModelRunnable runnable = new CreateModelRunnable(uri, this);
    CoffeaUML2Plugin.getInstance().execute(runnable);
  }
View Full Code Here

  public void createModelFile(String uri, IProgressMonitor monitor) {
    if(monitor==null) {
      monitor = new NullProgressMonitor();
    }
    CreateModelRunnable runnable =  new CreateModelRunnable(uri, this);
    try {
      runnable.run(monitor);
    } catch (InvocationTargetException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
View Full Code Here

      }
      if (objective != null) {
        String simpleName = ClassService
        .simpleNameExtraction(objective);
        IModelService model = getModelService();
        IJavaElementServiceBuilding builder = null;
        if (model != null) {
          builder = model.getServiceBuilder();
        }
        if ((simpleName != null) && (simpleName.length() > 0)
            && (builder != null)) {
          try {
            String fileName =
              simpleName
              +
              Resources.getCodeConstant(
                  "constants.javaSourceFileExtension"
              );
            String content = new String();
            String fullName = getFullName();
            if(
                (fullName!=null)
                &&(
                    !fullName.equals(
                        IModelService
                        .defaultPackageFileName
                    )
                )
            ) {
              content +=
                Resources.getCodeConstant(
                    "constants.package"
                )
                + ' '
                + getFullName()
                +
                Resources.getCodeConstant(
                    "constants.endStatement"
                )
                +
                Resources.getCodeConstant(
                    "constants.newLine"
                );
            }
            content += '\n' + "public class " + simpleName + '{';
            content += '\n' + "}";
            ICompilationUnit unit =
              javaElement.createCompilationUnit(
                  fileName,
                  content,
                  true,
                  monitor
              );
            ITypeService<?, ?> tp =
              builder.processTypeService(unit, monitor);
            if (tp instanceof IClassService<?, ?>) {
              result = (IClassService<?, ?>) tp;
              addTypeService(result);
            }
          } catch (JavaModelException e) {
View Full Code Here

    }
    return umlModelElement;
  }

  public IModelServiceBuilding getServiceBuilder() {
    IModelServiceBuilding r = null;
    IModelService m = getModelService();
    if(m!=null) {
      r = m.getServiceBuilder();
    }
    return r;
View Full Code Here

      }
      if(objective!=null) {
        String simpleName =
          ClassService.simpleNameExtraction(objective);
        IModelService model = getModelService();
        IModelServiceBuilding builder = null;
        if(model!=null) {
          builder = model.getServiceBuilder();
        }
        if(
            (simpleName!=null)
View Full Code Here

TOP

Related Classes of net.sourceforge.coffea.uml2.model.IModelHandling

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.