List of usage examples for org.eclipse.jdt.core.dom TypeDeclaration INTERFACE_PROPERTY
SimplePropertyDescriptor INTERFACE_PROPERTY
To view the source code for org.eclipse.jdt.core.dom TypeDeclaration INTERFACE_PROPERTY.
Click Source Link
From source file:de.ovgu.cide.language.jdt.SimplePrintVisitor.java
License:Open Source License
public boolean visit(IASTNode node) { if (node instanceof ASTStringNode) { printToken(((ASTStringNode) node).getValue()); return false; }//from www . ja v a 2 s.c o m if (node instanceof ASTTextNode) { printToken(((ASTTextNode) node).getValue()); return false; } if (node instanceof UnifiedASTNode) { UnifiedASTNode unode = (UnifiedASTNode) node; if (unode.getEclipseASTNodeClass().equals("AnnotationTypeDeclaration")) { accept(node, AnnotationTypeDeclaration.JAVADOC_PROPERTY.getId()); } if (unode.getEclipseASTNodeClass().equals(CompilationUnit.class.getSimpleName())) { accept(unode, CompilationUnit.PACKAGE_PROPERTY.getId()); accept(unode, CompilationUnit.IMPORTS_PROPERTY.getId()); accept(unode, CompilationUnit.TYPES_PROPERTY.getId()); } if (unode.getEclipseASTNodeClass().equals(TypeDeclaration.class.getSimpleName())) { accept(node, TypeDeclaration.JAVADOC_PROPERTY.getId()); accept(node, TypeDeclaration.MODIFIERS2_PROPERTY.getId()); accept(node, TypeDeclaration.INTERFACE_PROPERTY.getId()); accept(node, TypeDeclaration.NAME_PROPERTY.getId()); accept(node, TypeDeclaration.TYPE_PARAMETERS_PROPERTY.getId(), "<", ",", ">", true); // this.buffer.append(" ");//$NON-NLS-1$ accept(node, TypeDeclaration.SUPERCLASS_TYPE_PROPERTY.getId(), "extends", "", "", false); accept(node, TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY.getId(), "implements", ",", "", false); printToken("{"); hintNewLine(); hintIncIndent(); accept(node, TypeDeclaration.BODY_DECLARATIONS_PROPERTY.getId()); hintDecIndent(); printToken("}"); hintNewLine(); } printToken(unode.getEclipseASTNodeClass()); } return false; }
From source file:org.moe.natjgen.ClassEditor.java
License:Apache License
private void setInterface(boolean isInterface) throws GeneratorException { editLock();// www.j av a2 s . com Boolean property = (Boolean) getRewrite().get(classDecl, TypeDeclaration.INTERFACE_PROPERTY); if (property == null || property.booleanValue() != isInterface) { getRewrite().set(classDecl, TypeDeclaration.INTERFACE_PROPERTY, new Boolean(isInterface), getEditGroup()); } }