当前位置: 首页>>代码示例>>Java>>正文


Java ModalityState.defaultModalityState方法代码示例

本文整理汇总了Java中com.intellij.openapi.application.ModalityState.defaultModalityState方法的典型用法代码示例。如果您正苦于以下问题:Java ModalityState.defaultModalityState方法的具体用法?Java ModalityState.defaultModalityState怎么用?Java ModalityState.defaultModalityState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.application.ModalityState的用法示例。


在下文中一共展示了ModalityState.defaultModalityState方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateDirectories

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
@NotNull
public UpdateSession updateDirectories(@NotNull FilePath[] contentRoots, final UpdatedFiles updatedFiles, ProgressIndicator progressIndicator,
                                       @NotNull final Ref<SequentialUpdatesContext> contextRef) {
  CvsConfiguration cvsConfiguration = CvsConfiguration.getInstance(myProject);
  if (!myLastUpdateWasConfigured) {
    cvsConfiguration.CLEAN_COPY = false;
    cvsConfiguration.RESET_STICKY = false;
  }
  myLastUpdateWasConfigured = false;

  try {
    final UpdateSettingsOnCvsConfiguration updateSettings = createSettingsAndUpdateContext(cvsConfiguration, contextRef);
    final UpdateHandler handler = CommandCvsHandler.createUpdateHandler(contentRoots, updateSettings, myProject, updatedFiles);
    handler.addCvsListener(new UpdatedFilesProcessor(updatedFiles));
    CvsOperationExecutor cvsOperationExecutor = new CvsOperationExecutor(true, myProject, ModalityState.defaultModalityState());
    cvsOperationExecutor.setShowErrors(false);
    cvsOperationExecutor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
    final CvsResult result = cvsOperationExecutor.getResult();
    return createUpdateSessionAdapter(updatedFiles, result);
  }
  finally {
    cvsConfiguration.CLEAN_COPY = false;
    cvsConfiguration.RESET_STICKY = false;                    
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:CvsUpdateEnvironment.java

示例2: allowStartingDumbModeInside

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
@Override
public void allowStartingDumbModeInside(@NotNull DumbModePermission permission, @NotNull Runnable runnable) {
  ModalityState modality = ModalityState.defaultModalityState();
  DumbModePermission prev = myPermissions.put(modality, permission);
  try {
    runnable.run();
  }
  finally {
    if (prev == null) {
      myPermissions.remove(modality);
    } else {
      myPermissions.put(modality, prev);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:DumbPermissionServiceImpl.java

示例3: run

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
public final void run() {
  synchronized (myLock) {
    final CommandGroup commandGroup = getNextCommandGroup();
    if (commandGroup == null || commandGroup.isEmpty()) return;

    final Condition conditionForGroup = commandGroup.getExpireCondition();

    final FinalizableCommand command = commandGroup.takeNextCommand();
    myCommandCount--;

    final Condition expire = command.getExpireCondition() != null ? command.getExpireCondition() : conditionForGroup;

    if (LOG.isDebugEnabled()) {
      LOG.debug("CommandProcessor.run " + command);
    }
    // max. I'm not actually quite sure this should have NON_MODAL modality but it should
    // definitely have some since runnables in command list may (and do) request some PSI activity
    final boolean queueNext = myCommandCount > 0;
    Application application = ApplicationManager.getApplication();
    ModalityState modalityState = Registry.is("ide.perProjectModality") ? ModalityState.defaultModalityState() : ModalityState.NON_MODAL;
    application.getInvokator().invokeLater(command, modalityState, expire == null ? application.getDisposed() : expire).doWhenDone(new Runnable() {
      public void run() {
        if (queueNext) {
          CommandProcessor.this.run();
        }
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:CommandProcessor.java

示例4: getBranchesProvider

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
private static BranchesProvider getBranchesProvider(CvsOperation operation, Project project) throws VcsException {
  LOG.assertTrue(operation instanceof BranchesProvider);
  final CvsOperationExecutor executor =
    new CvsOperationExecutor(true, project, new ModalityContextImpl(ModalityState.defaultModalityState()));
  final CommandCvsHandler handler = new CommandCvsHandler(CvsBundle.message("load.tags.operation.name"), operation, true);
  executor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
  final CvsResult executionResult = executor.getResult();
  if (executionResult.hasErrors()) throw executionResult.composeError();
  return (BranchesProvider)operation;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:TagsHelper.java

示例5: getCurrentModalityState

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
private ModalityState getCurrentModalityState() {
  ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
  ModalityState modalityState = progressIndicator == null
                                ? myDefaultModalityState
                                : progressIndicator.getModalityState();
  if (modalityState == null) modalityState = ModalityState.defaultModalityState();
  return modalityState;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ModalityContextImpl.java

示例6: updateDirectories

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
@NotNull
public UpdateSession updateDirectories(@NotNull FilePath[] contentRoots, final UpdatedFiles updatedFiles,
                                       ProgressIndicator progressIndicator,
                                       @NotNull final Ref<SequentialUpdatesContext> context) {
  final UpdateSettings updateSettings = UpdateSettings.DONT_MAKE_ANY_CHANGES;
  final UpdateHandler handler = CommandCvsHandler.createUpdateHandler(contentRoots,
                                                                      updateSettings, myProject, updatedFiles);
  handler.addCvsListener(new UpdatedFilesProcessor(updatedFiles));
  CvsOperationExecutor cvsOperationExecutor = new CvsOperationExecutor(true, myProject, ModalityState.defaultModalityState());
  cvsOperationExecutor.setShowErrors(false);
  cvsOperationExecutor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
  final CvsResult result = cvsOperationExecutor.getResult();
  return new UpdateSessionAdapter(result.getErrorsAndWarnings(), result.isCanceled());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:CvsStatusEnvironment.java

示例7: getCurrent

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
private static ModalityState getCurrent() {
  if (ApplicationManager.getApplication().isDispatchThread()) {
    return ModalityState.current();
  }
  final ProgressIndicator pi = ProgressManager.getInstance().getProgressIndicator();
  if (pi == null) {
    return ModalityState.defaultModalityState();
  }
  return pi.getModalityState();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SvnAuthenticationManager.java

示例8: getModalityStateForQuestionDialogs

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
public ModalityState getModalityStateForQuestionDialogs() {
  return ModalityState.defaultModalityState();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:IdeUIModifiableModelsProvider.java

示例9: invokeLater

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
@NotNull
static ActionCallback invokeLater(@NotNull Runnable runnable, @NotNull Condition<?> expired) {
  ModalityState modalityState = ModalityState.defaultModalityState();
  return invokeLater(runnable, modalityState, expired);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:LaterInvocator.java

示例10: CvsOperationExecutor

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
public CvsOperationExecutor(Project project) {
  this(true, project, ModalityState.defaultModalityState());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:CvsOperationExecutor.java

示例11: executeQuietOperation

import com.intellij.openapi.application.ModalityState; //导入方法依赖的package包/类
public static CvsOperationExecutor executeQuietOperation(String title, CvsOperation operation, final Project project) {
  CvsOperationExecutor executor = new CvsOperationExecutor(false, project, ModalityState.defaultModalityState());
  executor.setIsQuietOperation(true);
  executor.performActionSync(new CommandCvsHandler(title, operation), CvsOperationExecutorCallback.EMPTY);
  return executor;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:CvsVcs2.java


注:本文中的com.intellij.openapi.application.ModalityState.defaultModalityState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。