Package com.intellij.util.concurrency

Examples of com.intellij.util.concurrency.Semaphore.down()


    final String evalText = xExpression == null ? null : xExpression.getExpression();
    if (topFrame == null || StringUtil.isEmptyOrSpaces(evalText)) return null;

    final Ref<String> evalResult = new Ref<String>();
    final Semaphore semaphore = new Semaphore();
    semaphore.down();

    try {
      myDebugProcess.getVmConnection().evaluateOnCallFrame(isolate, topFrame, evalText, new VmCallback<VmValue>() {
        public void handleResult(final VmResult<VmValue> result) {
          final VmValue vmValue = result.getResult();
View Full Code Here


    ApplicationManager.getApplication().invokeAndWait(new Runnable() {
      public void run() {

        //Save all opened documents
        FileDocumentManager.getInstance().saveAllDocuments();
        targetDone.down();

        new Task.Backgroundable(project, "Init PhoneGap/Cordova platform", true) {

          public boolean shouldStartInBackground() {
            return true;
View Full Code Here

  }

  public static void invokeAndWait(boolean timed, final Runnable runnable) {
    if (timed) {
      final Semaphore semaphore = new Semaphore();
      semaphore.down();
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          runnable.run();
          semaphore.up();
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.