Package com.intellij.openapi.application

Examples of com.intellij.openapi.application.AccessToken.finish()


        myEditor.getCaretModel().moveToOffset(exprMarker.getStartOffset());
        myEditor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
        exprMarker.dispose();
      }
    } finally {
      accessToken.finish();
    }
  }

  @Override
  protected JComponent getComponent() {
View Full Code Here


        AccessToken l = WriteAction.start();
        try {
          doRefactoring(editor, elements, controlFlow, scope);
        }
        finally {
          l.finish();
        }
      }
    }, DartBundle.message("dart.extract.method"), null);
  }
View Full Code Here

  private static Language getElementLanguage(final CompletionParameters parameters) {
    final AccessToken l = ReadAction.start();
    try {
      return PsiUtilCore.getLanguageAtOffset(parameters.getPosition().getContainingFile(), parameters.getOffset());
    } finally {
      l.finish();
    }
  }
}
View Full Code Here

        catch (Throwable t) {
          LOG.error(t);
          error.set(new CantRunException("Internal error: " + t.getMessage()));
        }
        finally {
          token.finish();
        }
      }
    });

    if (!result.isNull()) {
View Full Code Here

      if (rule != null && document != null) {
        return getLineNumber(aClass, document, currentLine, rule, element);
      }
    }
    finally {
      token.finish();
    }
    return line;
  }

  private static int getLineNumber(PsiClass aClass, Document document, int currentLine, BnfRule rule, PsiElement element) {
View Full Code Here

      String parserClass = ParserGeneratorUtil.getAttribute(rule, KnownAttribute.PARSER_CLASS);
      if (StringUtil.isEmpty(parserClass)) throw new NoDataException();
      return parserClass;
    }
    finally {
      token.finish();
    }
  }

  @NotNull
  private BnfRule getRuleAt(SourcePosition position) throws NoDataException {
View Full Code Here

            AccessToken accessToken = ApplicationManager.getApplication().acquireReadActionLock();
            try {
              return getUpdatedDocumentation(rule, prefix);
            }
            finally {
              accessToken.finish();
            }
          }
        });
      }
      return prefix;
View Full Code Here

        editor.getCaretModel().moveToOffset(addedRule.getTextRange().getEndOffset() - (BnfIntroduceRuleHandler.endsWithSemicolon(addedRule)? 1 : 0));
        editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
      }
    }
    finally {
      token.finish();
    }
  }
}
View Full Code Here

        }
      }
      model.commit();
    }
    finally {
      accessToken.finish();
    }
    assertTrue("GrammarKit src problem", add == (null != facade.findPackage("org.intellij.grammar.psi")));
  }

  private static String getUrl(final String path) throws Exception {
View Full Code Here

        name = "'" + myShouldBeName + "'";
      }
      try {
        module.setName(name);
      } finally {
        token.finish();
      }
    }
  }

  private static class ErlangRenameFileFix implements LocalQuickFix {
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.