Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IOpenable


          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;
        }
View Full Code Here


    if(editor == null) {
      logError("editor is set to null");
      return;
    }
 
    IOpenable openable = getJavaInput(editor);
    if (openable == null) {
      throw new RuntimeException("Editor not showing a classfile");
    }
    // reset the fields
    fOpenable = openable;
View Full Code Here

    }

    @SuppressWarnings("restriction")
    private static char[] getContent(IType source) throws JavaModelException {
        char[] charContent = null;
        IOpenable op = source.getOpenable();
        if (op instanceof CompilationUnit) {
            charContent = ((CompilationUnit) (op)).getContents();
        }
        if (charContent == null) {
            String content = source.getSource();
View Full Code Here

      IFile file = project.getFile(names[i]);
      if (file == null){
        System.err.println("Could not open file: " + names[i]);
        return null;
      }
      IOpenable input = (IOpenable)JavaCore.create(file);
      inputs[i] = input;       
    }
    return inputs; 
  }
View Full Code Here

        }
      }
     
      String filesArg = System.getProperty("file");
      String[] files;
      IOpenable input[] = null;
      if (filesArg != null){
        if (filesArg.equals("all")){
          input = new IOpenable[1];
          input[0] = (IOpenable)JavaCore.create(getFolder(path));
        } else {
View Full Code Here

      IFile file = getFile(names[i]);
      if (file == null){
        System.err.println("Could not open file: " + names[i]);
        return null;
      }
      IOpenable input = (IOpenable)JavaCore.create(file);
      inputs[i] = input;       
    }
    return inputs; 
  }
View Full Code Here

              else {
                apiModel = _globalApiModel;
              }
            }
            else {
              IOpenable typeContainer = elementType.getOpenable();
              if (typeContainer instanceof IClassFile) {
                IClassFile classFile = (IClassFile) typeContainer;
                IJavaElement parent = classFile.getParent();
                if (parent instanceof IPackageFragment) {
                  IPackageFragment parentPackage = (IPackageFragment) parent;
View Full Code Here

            if (isCancelRequested()) {
                return Status.CANCEL_STATUS;
            }
      ASTParser parser= ASTParser.newParser(AST.JLS3);
      parser.setResolveBindings(isResolveBindings());
      IOpenable openable = editorContent.getOpenable();
      if (openable instanceof ICompilationUnit) {
        parser.setSource((ICompilationUnit) openable);
      } else {
        parser.setSource((IClassFile) openable);
      }
View Full Code Here

          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;
        }
View Full Code Here

    this.types.add(parser);
  }

  public void consumeSecondaryType(char[] simpleTypeName) {
    if (this.element == null) return;
    IOpenable openable = this.element.getOpenable();
    if (!(openable instanceof ICompilationUnit)) return;
    this.element = ((ICompilationUnit) openable).getType(new String(simpleTypeName));
  }
View Full Code Here

TOP

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

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.