Example usage for org.eclipse.jdt.core.dom ImportDeclaration NAME_PROPERTY

List of usage examples for org.eclipse.jdt.core.dom ImportDeclaration NAME_PROPERTY

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom ImportDeclaration NAME_PROPERTY.

Prototype

ChildPropertyDescriptor NAME_PROPERTY

To view the source code for org.eclipse.jdt.core.dom ImportDeclaration NAME_PROPERTY.

Click Source Link

Document

The "name" structural property of this node type (child type: Name ).

Usage

From source file:org.eclipse.emf.codegen.merge.java.facade.ast.ASTJImport.java

License:Open Source License

/**
 * Sets the name of the import to the given name and sets "on demand" property to false.
 * //from   w  w  w.  j  a va  2  s . c  om
 * @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) {
    this.name = name;
    setNodeProperty(getASTNode(), name, ImportDeclaration.NAME_PROPERTY, ASTNode.SIMPLE_NAME);
    // name already contains ".*" - unset on demand property
    setNodeProperty(getASTNode(), false, ImportDeclaration.ON_DEMAND_PROPERTY);
}