Examples of ICodeAssist


Examples of org.eclipse.dltk.core.ICodeAssist

     * offset is behind the word.
     */
    if (hoverRegion.getLength() == 0)
      return null;
    IModelElement[] elements = null;
    ICodeAssist resolve = getCodeAssist();
    if (resolve != null) {
      try {
        elements = resolve.codeSelect(hoverRegion.getOffset(),
            hoverRegion.getLength());

        if ((elements == null || elements.length == 0)
            && resolve instanceof ISourceModule) {
          elements = PHPModelUtils.getTypeInString(
View Full Code Here

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
Copyright © 2018 www.massapi.com. 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.