Examples of ITypeRoot


Examples of org.eclipse.jdt.core.ITypeRoot

      return;
    }
    logger.debug("Make sure the recommendations view is present...");
    PluginUI.showRecommendationsView();
    logger.debug("Fetch source from active editor");
    ITypeRoot typeRoot = JavaUI.getEditorInputTypeRoot(editor
        .getEditorInput());
    Query query = new Query(typeRoot);
    logger.debug("Sourcecode\r\n" + query.getSource() + "\r\n");
    logger.debug("Query: " + query.getMqlQuery());
    final StandardSearch search = new StandardSearch(editor, "Search for ",
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

      return;
    }
    logger.debug("Make sure the recommendations view is present...");
    PluginUI.showRecommendationsView();
    logger.debug("Fetch source from active editor");
    ITypeRoot typeRoot = JavaUI.getEditorInputTypeRoot(editor
        .getEditorInput());
    Query query = new Query(typeRoot);
    logger.debug("Sourcecode\r\n" + query.getSource() + "\r\n");
    logger.debug("Query: " + query.getMqlQuery());
    final StandardSearch search = new StandardSearch(editor, "Search for ",
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

      return;
    }
    logger.debug("Make sure the recommendations view is present...");
    PluginUI.showRecommendationsView(true);
    logger.debug("Fetch source from active editor");
    ITypeRoot typeRoot = JavaUI.getEditorInputTypeRoot(editor
        .getEditorInput());
    Query query = new Query(typeRoot);
    logger.debug("Sourcecode\r\n" + query.getSource() + "\r\n");
    logger.debug("Query: " + query.getQuery());
    final Search search;
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

    ASTNode root= rootNode.getRoot();
    if (!(root instanceof CompilationUnit)) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }
    CompilationUnit astRoot= (CompilationUnit) root;
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (typeRoot == null || typeRoot.getBuffer() == null) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }

    char[] content= typeRoot.getBuffer().getCharacters();
    LineInformation lineInfo= LineInformation.create(astRoot);
    String lineDelim= typeRoot.findRecommendedLineSeparator();
    Map options= typeRoot.getJavaProject().getOptions(true);

    return internalRewriteAST(content, lineInfo, lineDelim, astRoot.getCommentList(), options, rootNode, (RecoveryScannerData)astRoot.getStatementsRecoveryData());
  }
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

   */
  public static ImportRewrite create(CompilationUnit astRoot, boolean restoreExistingImports) {
    if (astRoot == null) {
      throw new IllegalArgumentException("AST must not be null"); //$NON-NLS-1$
    }
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (!(typeRoot instanceof ICompilationUnit)) {
      throw new IllegalArgumentException("AST must have been constructed from a Java element"); //$NON-NLS-1$
    }
    List existingImport= null;
    if (restoreExistingImports) {
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

    ASTNode root= rootNode.getRoot();
    if (!(root instanceof CompilationUnit)) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }
    CompilationUnit astRoot= (CompilationUnit) root;
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (typeRoot == null || typeRoot.getBuffer() == null) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }

    char[] content= typeRoot.getBuffer().getCharacters();
    LineInformation lineInfo= LineInformation.create(astRoot);
    String lineDelim= typeRoot.findRecommendedLineSeparator();
    Map options= typeRoot.getJavaProject().getOptions(true);

    return internalRewriteAST(content, lineInfo, lineDelim, astRoot.getCommentList(), options, rootNode, (RecoveryScannerData)astRoot.getStatementsRecoveryData());
  }
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

   */
  public static ImportRewrite create(CompilationUnit astRoot, boolean restoreExistingImports) {
    if (astRoot == null) {
      throw new IllegalArgumentException("AST must not be null"); //$NON-NLS-1$
    }
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (!(typeRoot instanceof ICompilationUnit)) {
      throw new IllegalArgumentException("AST must have been constructed from a Java element"); //$NON-NLS-1$
    }
    List existingImport= null;
    if (restoreExistingImports) {
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

    */
    if (o instanceof LambdaExpression) {
      LambdaExpression that = (LambdaExpression) o;
      if (this.sourceStart != that.sourceStart)
        return false;
      ITypeRoot thisTR = this.getTypeRoot();
      ITypeRoot thatTR = that.getTypeRoot();
      return thisTR.getElementName().equals(thatTR.getElementName()) && thisTR.getParent().equals(thatTR.getParent());
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

  private ITypeRoot compUnit;
  private SortedMap<Integer, DebugInfo> cache = new TreeMap<Integer, DebugInfo>();
 
  public void makeCacheValid(ITypeRoot root) {
    if (compUnit == null || !compUnit.equals(root)) {
      final ITypeRoot unit = compUnit = root;
      Job j = new Job("Fusion Debugger") {
       
        @Override
        protected IStatus run(IProgressMonitor monitor) {
          IRunCrystalCommand command = new FusionDebuggingCommand(unit);
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

       
        if (start == oldStart)
          return;
        oldStart = start;
       
        ITypeRoot root = JavaUI.getEditorInputTypeRoot(editor.getEditorInput());

        if (root != null && root.getElementType() == IJavaElement.COMPILATION_UNIT) {
          FusionCache cache = FusionCache.getCache();

          cache.makeCacheValid((ICompilationUnit)root);
          info = cache.getResults((ICompilationUnit)root, oldStart);
          RelationshipView.this.viewer.refresh();
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.