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

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

Introduction

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

Prototype

SimplePropertyDescriptor ON_DEMAND_PROPERTY

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

Click Source Link

Document

The "onDemand" structural property of this node type (type: Boolean ).

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  ww.  j  a va 2 s . c o  m
 * @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);
}