Example usage for org.eclipse.jdt.core.dom SuperConstructorInvocation getLength

List of usage examples for org.eclipse.jdt.core.dom SuperConstructorInvocation getLength

Introduction

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

Prototype

public final int getLength() 

Source Link

Document

Returns the length in characters of the original source file indicating where the source fragment corresponding to this node ends.

Usage

From source file:br.uff.ic.gems.resources.ast.Visitor.java

@Override
public boolean visit(SuperConstructorInvocation node) {
    int beginLine = cu.getLineNumber(node.getStartPosition());
    int endLine = cu.getLineNumber(node.getStartPosition() + node.getLength());
    int beginColumn = cu.getColumnNumber(node.getStartPosition());
    int endColumn = cu.getColumnNumber(node.getStartPosition() + node.getLength());

    languageConstructs.add(/*  www  .java  2s  .  c  o m*/
            new LanguageConstruct(node.getClass().getSimpleName(), beginLine, endLine, beginColumn, endColumn));

    return true;
}

From source file:org.bundlemaker.core.ui.editor.sourceviewer.referencedetail.JdtAstVisitor.java

License:Open Source License

@Override
public boolean visit(SuperConstructorInvocation node) {

    // TODO: Zusammenlegen mit ConstructorInvocation

    IMethodBinding methodBinding = node.resolveConstructorBinding();

    // resolve type arguments
    ITypeBinding[] parameterTypes = methodBinding.getParameterTypes();
    for (ITypeBinding typeBinding : parameterTypes) {
        resolveTypeBinding(typeBinding, node.getStartPosition(), node.getLength());
    }//from  w  w  w . j a v  a 2  s .  c  o  m

    // List<Expression> typeArguments = node.arguments();
    // for (Expression expression : typeArguments) {
    // resolveTypeBinding(expression.resolveTypeBinding(), node
    // .getStartPosition(), node.getLength());
    // }

    // visit the child nodes
    return true;

}