Package net.sourceforge.coffea.uml2

Examples of net.sourceforge.coffea.uml2.Resources


    pckH  = runnable.getResult();
    return pckH;
  }
 
  public IPackageService createNestedPackage(String simpleName) {
    IPackageService pckH = null;
    Package newPackage =
      getUMLElement().createNestedPackage(simpleName);
    NestedPackageCreation runnable =
      new NestedPackageCreation(newPackage, this);
    CoffeaUML2Plugin.getInstance().execute(runnable);
View Full Code Here


          qualifiedName = getFullName() + '.' + simpleName;
        }
        else {
          qualifiedName = simpleName;
        }
        IPackageService packH = resolvePackageService(qualifiedName);
        if (packH != null) {
          IPackageFragment jEl = packH.getJavaElement();
          if (jEl != null) {
            try {
              jEl.delete(
                  true,
                  monitor
View Full Code Here

      else if(defaultSimpleName!=null) {
        name = getSimpleName();
      }
      if(name!=null) {
        if(parent instanceof IPackageService) {
          IPackageService pk = (IPackageService)parent;
          umlModelElement =
            pk.getUMLElement().createOwnedClass(
                name,
                isAbstract()
            );
        }
        else if(parent instanceof IClassService<?, ?>) {
          IClassService<?, ?> pk = (IClassService<?, ?>)parent;
          umlModelElement =
            UMLFactory.eINSTANCE.createClass();
          int indDollar = -1;
          if((indDollar = name.indexOf('$'))>=0) {
            name = name.substring(indDollar+1);
          }
          umlModelElement.setName(name);
          pk.getUMLElement().getNestedClassifiers().add(
              umlModelElement
          );
        }
        else if(parent instanceof IModelService) {
          IModelService md = (IModelService)parent;
View Full Code Here

    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

TOP

Related Classes of net.sourceforge.coffea.uml2.Resources

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.