Examples of PackageDeclaration


Examples of at.bestsolution.efxclipse.tooling.efxbean.fXBean.PackageDeclaration

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetPackage(PackageDeclaration newPackage, NotificationChain msgs)
  {
    PackageDeclaration oldPackage = package_;
    package_ = newPackage;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FXBeanPackage.FX_BEAN_UNIT__PACKAGE, oldPackage, newPackage);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.PackageDeclaration

  public QualifiedName getFullyQualifiedName(EObject obj) {
    if( obj instanceof ComponentDefinition ) {
      if( obj.eContainer() instanceof Model ) {
        ComponentDefinition compDef = (ComponentDefinition) obj;
        Model model = (Model) obj.eContainer();
        PackageDeclaration packageDec = model.getPackage();
        if( packageDec != null ) {
          return qualifiedNameConverter.toQualifiedName(packageDec.getName()+"."+compDef.getName());
        } else {
          return qualifiedNameConverter.toQualifiedName(compDef.getName());
        }
      }
     
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.PackageDeclaration

        String key = getResourceKey(operatorClass, KEY_SUFFIX_IMPLEMENTATION);
        if (key != null && environment.isResourceGenerated(key)) {
            return;
        }
        ModelFactory f = environment.getFactory();
        PackageDeclaration packageDecl = getPackage(f, operatorClass);
        ImportBuilder imports = getImportBuilder(f, packageDecl);
        OperatorClassGenerator generator = new OperatorImplementationClassGenerator(
                environment,
                f,
                imports,
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.PackageDeclaration

        String key = getResourceKey(operatorClass, KEY_SUFFIX_FACTORY);
        if (key != null && environment.isResourceGenerated(key)) {
            return;
        }
        ModelFactory f = environment.getFactory();
        PackageDeclaration packageDecl = getPackage(f, operatorClass);
        ImportBuilder imports = getImportBuilder(f, packageDecl);
        OperatorClassGenerator generator = new OperatorFactoryClassGenerator(
                environment,
                f,
                imports,
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.PackageDeclaration

        String key = getResourceKey(aClass, KEY_SUFFIX_FACTORY);
        if (key != null && environment.isResourceGenerated(key)) {
            return;
        }
        ModelFactory f = environment.getFactory();
        PackageDeclaration packageDecl = getPackage(f, aClass);
        ImportBuilder imports = getImportBuilder(f, packageDecl);
        FlowFactoryClassGenerator generator = new FlowFactoryClassGenerator(
                environment,
                f,
                imports,
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.PackageDeclaration

     * @return ソースプログラム
     */
    protected CompilationUnit createSource(T model) {

        // パッケージの計算
        PackageDeclaration packageDecl = createPackageDeclaration(model);

        // インポートビルダーの初期化
        imports = new ImportBuilder(f, packageDecl, ImportBuilder.Strategy.TOP_LEVEL);

        // 型宣言の計算
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.PackageDeclaration

    /**
     * 同一パッケージ。
     */
    @Test
    public void current() {
        PackageDeclaration pkg = f.newPackageDeclaration(
            Models.toName(f, "com.example"));
        ImportBuilder importer = new ImportBuilder(f, pkg, Strategy.TOP_LEVEL);
        assertThat(importer.resolve(type("com.example.Test")), is(type("Test")));
        assertImported(importer);
    }
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.PackageDeclaration

    }

    private static String toPath(CompilationUnit unit) {
        assert unit != null;
        StringBuilder buf = new StringBuilder();
        PackageDeclaration packageDeclaration = unit.getPackageDeclaration();
        if (packageDeclaration != null) {
            String pkg = packageDeclaration.getName().toNameString().replace('.', '/');
            buf.append(pkg);
            buf.append('/');
        }
        TypeDeclaration primaryType = findPrimaryType(unit);
        if (primaryType != null) {
View Full Code Here

Examples of com.bacoder.parser.java.api.PackageDeclaration

    super(adapters);
  }

  @Override
  public PackageDeclaration adapt(PackageDeclarationContext context) {
    PackageDeclaration packageDeclaration = createNode(context);

    List<Annotation> annotations =
        transform(context, AnnotationContext.class, new Function<AnnotationContext, Annotation>() {
          @Override
          public Annotation apply(AnnotationContext context) {
            return getAdapter(AnnotationAdapter.class).adapt(context);
          }
        });
    packageDeclaration.setAnnotations(annotations);

    QualifiedNameContext qualifiedNameContext = getChild(context, QualifiedNameContext.class);
    if (qualifiedNameContext != null) {
      packageDeclaration.setQualifiedName(
          getAdapter(QualifiedNameAdapter.class).adapt(qualifiedNameContext));
    }

    return packageDeclaration;
  }
View Full Code Here

Examples of com.github.antlrjavaparser.api.PackageDeclaration

        // NB: this import list is replaced at the end of this method by a
        // sorted version
        compilationUnit.setImports(new ArrayList<ImportDeclaration>());

        if (!cid.getName().isDefaultPackage()) {
            compilationUnit.setPackage(new PackageDeclaration(ASTHelper
                    .createNameExpr(cid.getName().getPackage()
                            .getFullyQualifiedPackageName())));
        }

        // Add the class of interface declaration to the compilation unit
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.