List of usage examples for org.eclipse.jdt.core.dom VariableDeclarationFragment EXTRA_DIMENSIONS_PROPERTY
SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY
To view the source code for org.eclipse.jdt.core.dom VariableDeclarationFragment EXTRA_DIMENSIONS_PROPERTY.
Click Source Link
From source file:org.eclipse.emf.codegen.merge.java.facade.ast.ASTJField.java
License:Open Source License
/** * Sets the type of {@link FieldDeclaration}. * <p>/*from w ww.j a v a2 s . c om*/ * If there is only one {@link VariableDeclarationFragment} in this declaration, * only the type of the FieldDeclaration is changed. * <p> * If there are multiple {@link VariableDeclarationFragment}s in this declaration, * variable declaration fragment of this ASTJField is moved to a new * {@link FieldDeclaration}, and the type of new declaration is set. * <p> * Note that if field declaration has been split, * <code>getType()</code>, <code>getContents()</code>, <code>getComment()</code>, * <code>getInitializer()</code> will not return * the original content. * * @see org.eclipse.emf.codegen.merge.java.facade.JField#setType(String) */ @SuppressWarnings("deprecation") public void setType(String type) { // if there are multiple variables in declaration, // separate this variable fragment into a separate declaration performSplit(); this.type = type; setNodeProperty(variableDeclarationFragment, 0, VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY); setTrackedNodeProperty(getASTNode(), type, FieldDeclaration.TYPE_PROPERTY, ASTNode.SIMPLE_TYPE); }