Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.ICodeAssist


   */
  protected IJavaElement getElement(
      IJavaProject javaProject, String filename, int offset, int length)
    throws Exception
  {
    ICodeAssist code = null;
    try{
      code = JavaUtils.getCompilationUnit(javaProject, filename);
    }catch(IllegalArgumentException iae){
      // source not found, try location the class file.
      code = JavaUtils.findClassFile(javaProject, filename);
    }

    if (code != null){
      IJavaElement[] elements = code.codeSelect(offset, length);
      if(elements != null && elements.length > 0){
        return elements[0];
      }
    }
    return null;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.ICodeAssist

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.