Example usage for org.eclipse.jdt.core.dom EnumConstantDeclaration ARGUMENTS_PROPERTY

List of usage examples for org.eclipse.jdt.core.dom EnumConstantDeclaration ARGUMENTS_PROPERTY

Introduction

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

Prototype

ChildListPropertyDescriptor ARGUMENTS_PROPERTY

To view the source code for org.eclipse.jdt.core.dom EnumConstantDeclaration ARGUMENTS_PROPERTY.

Click Source Link

Document

The "arguments" structural property of this node type (element type: Expression ).

Usage

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

License:Open Source License

public void setArguments(String[] arguments) {
    this.arguments = arguments;
    setListNodeProperty(getASTNode(), arguments, EnumConstantDeclaration.ARGUMENTS_PROPERTY,
            ASTNode.SIMPLE_NAME);//from   w  ww .  j av  a  2s  .  c  o  m
}

From source file:org.flowerplatform.codesync.code.java.type_provider.JavaTypeProvider.java

License:Open Source License

@Override
public String getType(Object object) {
    IFileAccessController fileAccessController = CorePlugin.getInstance().getFileAccessController();
    if (fileAccessController.isFile(object)) {
        if (fileAccessController.isDirectory(object)) {
            return CodeSyncCodeConstants.FOLDER;
        } else {/*from  w  w w .ja va 2s .  c o m*/
            return CodeSyncCodeConstants.FILE;
        }
    } else if (object instanceof TypeDeclaration) {
        if (((TypeDeclaration) object).isInterface()) {
            return INTERFACE;
        } else {
            return CLASS;
        }
    } else if (object instanceof Annotation) {
        return ANNOTATION;
    } else if (object instanceof Expression || object instanceof Type) {
        ASTNode node = (ASTNode) object;
        StructuralPropertyDescriptor descriptor = node.getLocationInParent();
        if (descriptor.equals(TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY)
                || descriptor.equals(EnumDeclaration.SUPER_INTERFACE_TYPES_PROPERTY)) {
            return SUPER_INTERFACE;
        } else if (descriptor.equals(EnumConstantDeclaration.ARGUMENTS_PROPERTY)) {
            return ENUM_CONSTANT_ARGUMENT;
        }
        return null;
    } else {
        return directMap.get(object.getClass());
    }
}