public static CompilationUnit createAST(ICompilationUnit cu, WorkingCopyOwner workingCopyOwner) { CompilationUnit cuNode= getCuNode(workingCopyOwner, cu); cuNode.setProperty(CU_PROPERTY, cu); return cuNode; }
public static CompilationUnit createAST(ICompilationUnit cu, WorkingCopyOwner workingCopyOwner) { CompilationUnit cuNode= getCuNode(workingCopyOwner, cu); cuNode.setProperty(CU_PROPERTY, cu); return cuNode; }
public static CompilationUnit createAST(ICompilationUnit cu, WorkingCopyOwner workingCopyOwner) { CompilationUnit cuNode= getCuNode(workingCopyOwner, cu); cuNode.setProperty(CU_PROPERTY, cu); return cuNode; }
public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) { List types = compilationUnit.types(); boolean contains_malformed_nodes = false; for (Iterator iter = types.iterator(); iter.hasNext();) { AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) iter.next(); typeDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, Integer.valueOf(typeDeclaration.getStartPosition())); contains_malformed_nodes |= Boolean.valueOf(isMalformed(typeDeclaration)); } compilationUnit.setProperty(CONTAINS_MALFORMED_NODES, contains_malformed_nodes); return true; } public boolean visit(AnnotationTypeDeclaration annotationTypeDeclaration) {
public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) { List types = compilationUnit.types(); for (Iterator iter = types.iterator(); iter.hasNext();) { AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) iter.next(); typeDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, new Integer(typeDeclaration.getStartPosition())); compilationUnit.setProperty(CONTAINS_MALFORMED_NODES, Boolean.valueOf(isMalformed(typeDeclaration))); } return true; } public boolean visit(AnnotationTypeDeclaration annotationTypeDeclaration) {
public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) { List types = compilationUnit.types(); for (Iterator iter = types.iterator(); iter.hasNext();) { AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) iter.next(); typeDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, new Integer(typeDeclaration.getStartPosition())); compilationUnit.setProperty(CONTAINS_MALFORMED_NODES, Boolean.valueOf(isMalformed(typeDeclaration))); } return true; } public boolean visit(AnnotationTypeDeclaration annotationTypeDeclaration) {
public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) { List types = compilationUnit.types(); boolean contains_malformed_nodes = false; for (Iterator iter = types.iterator(); iter.hasNext();) { AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) iter.next(); typeDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, Integer.valueOf(typeDeclaration.getStartPosition())); contains_malformed_nodes |= Boolean.valueOf(isMalformed(typeDeclaration)); } compilationUnit.setProperty(CONTAINS_MALFORMED_NODES, contains_malformed_nodes); return true; } public boolean visit(AnnotationTypeDeclaration annotationTypeDeclaration) {
public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) { List types = compilationUnit.types(); for (Iterator iter = types.iterator(); iter.hasNext();) { AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) iter.next(); typeDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, new Integer(typeDeclaration.getStartPosition())); compilationUnit.setProperty(CONTAINS_MALFORMED_NODES, Boolean.valueOf(isMalformed(typeDeclaration))); } return true; } public boolean visit(AnnotationTypeDeclaration annotationTypeDeclaration) {
@Override public boolean visit(org.eclipse.jdt.core.dom.CompilationUnit compilationUnit) { List types = compilationUnit.types(); boolean contains_malformed_nodes = false; for (Iterator iter = types.iterator(); iter.hasNext();) { AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) iter.next(); typeDeclaration.setProperty(CompilationUnitSorter.RELATIVE_ORDER, Integer.valueOf(typeDeclaration.getStartPosition())); contains_malformed_nodes |= Boolean.valueOf(isMalformed(typeDeclaration)); } compilationUnit.setProperty(CONTAINS_MALFORMED_NODES, contains_malformed_nodes); return true; } @Override
/** * Sets the name of the main type of compilation unit. * * @see FacadeHelper#getMainType(JCompilationUnit) * @see org.eclipse.emf.codegen.merge.java.facade.JNode#setName(java.lang.String) * @see org.eclipse.emf.codegen.merge.java.facade.JNode#getQualifiedName() */ public void setName(String name) { JType type = getFacadeHelper().getMainType(this); if (type != null) { type.setName(name); } else { getASTNode().setProperty(NAME_PROPERTY, name); } }
/** * Sets the name of the main type of compilation unit. * * @see FacadeHelper#getMainType(JCompilationUnit) * @see org.eclipse.emf.codegen.merge.java.facade.JNode#setName(java.lang.String) * @see org.eclipse.emf.codegen.merge.java.facade.JNode#getQualifiedName() */ public void setName(String name) { JType type = getFacadeHelper().getMainType(this); if (type != null) { type.setName(name); } else { getASTNode().setProperty(NAME_PROPERTY, name); } }
astCompilationUnit.setProperty(ASTJCompilationUnit.NAME_PROPERTY, name);
astCompilationUnit.setProperty(ASTJCompilationUnit.NAME_PROPERTY, name);