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


Java CancellableRunnable类代码示例

本文整理汇总了Java中com.intellij.openapi.vcs.impl.CancellableRunnable的典型用法代码示例。如果您正苦于以下问题:Java CancellableRunnable类的具体用法?Java CancellableRunnable怎么用?Java CancellableRunnable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CancellableRunnable类属于com.intellij.openapi.vcs.impl包,在下文中一共展示了CancellableRunnable类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testCreateDeployRunnerInvalidSdk

import com.intellij.openapi.vcs.impl.CancellableRunnable; //导入依赖的package包/类
@Test
public void testCreateDeployRunnerInvalidSdk() {
  when(sdkService.validateCloudSdk())
      .thenReturn(ImmutableSet.of(CloudSdkValidationResult.CLOUD_SDK_NOT_FOUND));
  Path path = Paths.get(("/this/path"));
  when(sdkService.getSdkHomePath()).thenReturn(path);

  Optional<CancellableRunnable> runner =
      helper.createDeployRunner(
          loggingHandler,
          createMockDeployableDeploymentSource(),
          deploymentConfiguration,
          callback);

  assertFalse(runner.isPresent());
  verify(callback, times(1))
      .errorOccurred("No Cloud SDK was found in the specified directory. " + path.toString());
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:19,代码来源:CloudSdkAppEngineHelperTest.java

示例2: testCreateFlexDeployRunner_noPersistedModule

import com.intellij.openapi.vcs.impl.CancellableRunnable; //导入依赖的package包/类
@Test
public void testCreateFlexDeployRunner_noPersistedModule() {
  when(deploymentConfiguration.getModuleName()).thenReturn(null);

  DeploymentSource flexSource = createMockDeployableDeploymentSource();
  when(((AppEngineDeployable) flexSource).getEnvironment())
      .thenReturn(AppEngineEnvironment.APP_ENGINE_FLEX);
  File mockSourceFile = mock(File.class);
  when(mockSourceFile.exists()).thenReturn(true);
  when(flexSource.getFile()).thenReturn(mockSourceFile);

  Optional<CancellableRunnable> runner =
      helper.createDeployRunner(loggingHandler, flexSource, deploymentConfiguration, callback);

  assertFalse(runner.isPresent());
  verify(callback, times(1)).errorOccurred("No app.yaml specified for flexible deployment.");
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:18,代码来源:CloudSdkAppEngineHelperTest.java

示例3: disconnect

import com.intellij.openapi.vcs.impl.CancellableRunnable; //导入依赖的package包/类
@Override
public void disconnect() {
  synchronized (createdDeployments) {
    // Kills any executing deployment actions.
    createdDeployments.values().forEach(CancellableRunnable::cancel);
    createdDeployments
        .keys()
        .forEach(
            project ->
                ProjectManager.getInstance()
                    .removeProjectManagerListener(project, projectClosingListener));
    createdDeployments.clear();
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:15,代码来源:AppEngineRuntimeInstance.java

示例4: testCreateDeployRunnerInvalidDeploymentSourceType_returnsNull

import com.intellij.openapi.vcs.impl.CancellableRunnable; //导入依赖的package包/类
@Test
public void testCreateDeployRunnerInvalidDeploymentSourceType_returnsNull() {
  Optional<CancellableRunnable> runner =
      helper.createDeployRunner(
          loggingHandler, undeployableDeploymentSource, deploymentConfiguration, callback);

  assertFalse(runner.isPresent());
  verify(callback, times(1)).errorOccurred("Invalid deployment source.");
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:10,代码来源:CloudSdkAppEngineHelperTest.java

示例5: testCreateDeployRunnerInvalidDeploymentSourceFile_returnsNull

import com.intellij.openapi.vcs.impl.CancellableRunnable; //导入依赖的package包/类
@Test
public void testCreateDeployRunnerInvalidDeploymentSourceFile_returnsNull() {
  when(sdkService.validateCloudSdk()).thenReturn(ImmutableSet.of());

  Optional<CancellableRunnable> runner =
      helper.createDeployRunner(
          loggingHandler,
          createMockDeployableDeploymentSource(),
          deploymentConfiguration,
          callback);

  assertFalse(runner.isPresent());
  verify(callback, times(1)).errorOccurred("Deployment source not found: null.");
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:15,代码来源:CloudSdkAppEngineHelperTest.java

示例6: createDeployRunner

import com.intellij.openapi.vcs.impl.CancellableRunnable; //导入依赖的package包/类
/**
 * Creates a {@link Runnable} that will execute the tasks necessary for deployment to an App
 * Engine environment.
 *
 * @param loggingHandler logging messages will be output to this
 * @param source the deployment source to be deployed
 * @param deploymentConfiguration the configuration specifying the deployment
 * @param callback a callback for handling completions of the operation
 * @return an {@link Optional} containing the runnable that will perform the deployment operation
 */
Optional<CancellableRunnable> createDeployRunner(
    LoggingHandler loggingHandler,
    DeploymentSource source,
    AppEngineDeploymentConfiguration deploymentConfiguration,
    DeploymentOperationCallback callback);
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:16,代码来源:AppEngineHelper.java


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