Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IMember


     * @param config Launch configuration
     */
    protected void initializeMainTypeAndName(IJavaElement javaElement, ILaunchConfigurationWorkingCopy config) {
        String name = null;
        if (javaElement instanceof IMember) {
            IMember member = (IMember) javaElement;
            if (member.isBinary()) {
                javaElement = member.getClassFile();
            } else {
                javaElement = member.getCompilationUnit();
            }
        }
        if (javaElement instanceof ICompilationUnit || javaElement instanceof IClassFile) {
            try {
                IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { javaElement}, false);
View Full Code Here


            if (offset > -1 && length > 0) {
                setHighlightRange(offset, length, moveCursor);
            }

            if ((reference instanceof IMember) && !isDecompiled()) {
                IMember member = (IMember) reference;
                range = member.getNameRange();
                if (range != null) {
                    offset = range.getOffset();
                    length = range.getLength();
                }
            }
View Full Code Here

      IJavaElement javaElement = Adaptables.adapt(each, IJavaElement.class);
      if (javaElement == null) continue;
      // we can't handle binaries as their project usually contains no sources and is not
      // visible in the navigation
      if (javaElement instanceof IMember){
          IMember member = (IMember) javaElement;
          if (member.isBinary()) return;
      }
     
      if (javaProject == null) {
        javaProject = javaElement.getJavaProject();
      }
View Full Code Here

      String eventTypeSig = Signature.createTypeSignature(pname, false);
     
      IFileEditorInput file = (IFileEditorInput) editor.getEditorInput();
      ICompilationUnit unit = JavaCore.createCompilationUnitFrom(file.getFile());
      IType meType = unit.getType(className);
      IMember member = meType.getMethod(methodDesc.getName(),new String[] {eventTypeSig });
      JavaUI.revealInEditor(editor, (IJavaElement) member);
    }   
  }
View Full Code Here

      dot = name.lastIndexOf('.');
      if (dot != -1)
        name = name.substring(0, dot);
      IType type = unit.getType(name);
     
      IMember member = type.getMethod(methodName,
          new String[] { eventTypeSig });
      JavaUI.revealInEditor(editor, (IJavaElement) member);
    }
  }
View Full Code Here

      if (dot != -1)
        pname = pname.substring(dot + 1);
     
      String eventTypeSig = Signature.createTypeSignature(pname, false);
      IType meType = listenerUnit.getType(className);
      IMember member = meType.getMethod(methodDesc.getName(),new String[] {eventTypeSig });
      try {
        JavaUI.openInEditor((IJavaElement) member);
      } catch (Exception e) {
         ParserPlugin.getLogger().error(e);
      }
View Full Code Here

            dot = param.lastIndexOf('.');
            if (dot != -1)
              param = param.substring(dot + 1);
            String sig = Signature
                .createTypeSignature(param, false);
            IMember member = anonymous.getMethod(mName,
                new String[] { sig });
            JavaUI.revealInEditor(editor, (IJavaElement) member);
          }
        }
      }
View Full Code Here

      dot = name.lastIndexOf('.');
      if (dot != -1)
        name = name.substring(0, dot);
      IType type = unit.getType(name);
      IType meType = type.getType(className);     
      IMember member = meType.getMethod(methodDesc.getName(),new String[] {eventTypeSig });
      JavaUI.revealInEditor(editor, (IJavaElement) member);
    }   
  }
View Full Code Here

      String name = file.getName();
      dot = name.lastIndexOf('.');
      if (dot != -1)
        name = name.substring(0, dot);
      IType type = unit.getType(name);
      IMember member = type.getMethod(methodDesc.getName(),
          new String[] { eventTypeSig });
      JavaUI.revealInEditor(editor, (IJavaElement) member);
    }
  }
View Full Code Here

        TypeBinding args[] = overridden.parameters;
        String names[] = new String[args.length];
        for (int i = 0; i < args.length; i++) {
          names[i] = Signature.createTypeSignature(args[i].sourceName(), false);
        }
        IMember member = (IMember) requestor1.findMethodFromBinding(overridden, names, overridden.declaringClass);
        if (member == null)
          return InheritDocVisitor.CONTINUE;
        if (member.getAttachedJavadoc(null) != null ) { 
          // for binary methods with attached javadoc and no source attached
          return overridden;
        }
        IOpenable openable = member.getOpenable();
        if (openable == null)
          return InheritDocVisitor.CONTINUE;
        IBuffer buf= openable.getBuffer();
        if (buf == null) {
          // no source attachment found. This method maybe the one. Stop.
          return InheritDocVisitor.STOP_BRANCH;
        }

        ISourceRange javadocRange= member.getJavadocRange();
        if (javadocRange == null)
          return InheritDocVisitor.CONTINUE;  // this method doesn't have javadoc, continue to look.
        String rawJavadoc= buf.getText(javadocRange.getOffset(), javadocRange.getLength());
        if (rawJavadoc != null) {
          return overridden;
View Full Code Here

TOP

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

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.