Examples of ImportDeclaration


Examples of org.eclipse.jdt.core.dom.ImportDeclaration

      if (importDeclaration.getName().toString().equals(qualifiedName)) {
        return;
      }
    }
    // add new ImportDeclaration
    ImportDeclaration importDeclaration = ast.newImportDeclaration();
    importDeclaration.setName(ast.newName(qualifiedName));
    imports.add(importDeclaration);
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ImportDeclaration

      }
    }
    else group = model;
    // 2°) Second step, we build a rewriter from the compilation unit
    AST ast = u.getAST();
    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);
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ImportDeclaration

        assert javaElementName != null;
        return createImportDeclaration(ast, importClass.getName() + "." + javaElementName, true);
    }

    private ImportDeclaration createImportDeclaration(AST ast, String name, boolean isStatic) {
        ImportDeclaration importDeclaration = ast.newImportDeclaration();
        importDeclaration.setName(ast.newName(name));
        importDeclaration.setStatic(isStatic);
        return importDeclaration;
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportDeclaration

        LOGGER.debug("Load single import \"{}\"", clazz);
        List<ConfigItem<ImportDeclaration>> ret = new ArrayList<ConfigItem<ImportDeclaration>>();
        List<String> imports = readStorageFile();

        if (imports.contains(clazz)) {
            ImportDeclaration importDec = new ImportDeclaration(clazz);
            ImportConfiguration cnf = new ImportConfiguration(importDec.toMetadata(), importDec);
            ret.add(cnf);
        }
        return ret;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.