• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java GradleConstants类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



GradleConstants类属于org.jetbrains.plugins.gradle.util包,在下文中一共展示了GradleConstants类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: refreshDependencies

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
protected void refreshDependencies(ExternalProjectRefreshCallback cbk, @Nullable Collection<DataNode<LibraryDependencyData>> libraryDependencies) {
    if (libraryDependencies != null) {
        // Change the dependencies only if there are new dependencies
        this.libraryDependencies = libraryDependencies;
        cbk.onSuccess(null);
        return;
    }
    if (this.libraryDependencies != null) {
        cbk.onSuccess(null);
        return;
    }
    ExternalSystemProcessingManager processingManager = ServiceManager.getService(ExternalSystemProcessingManager.class);
    if (processingManager != null && processingManager.findTask(ExternalSystemTaskType.RESOLVE_PROJECT, GradleConstants.SYSTEM_ID, getProjectBasePath(project)) != null) {
        // Another scan in progress
        return;
    }
    ExternalSystemUtil.refreshProject(project, GradleConstants.SYSTEM_ID, getProjectBasePath(project), cbk, false, ProgressExecutionMode.IN_BACKGROUND_ASYNC);
}
 
开发者ID:JFrogDev,项目名称:jfrog-idea-plugin,代码行数:20,代码来源:GradleScanManager.java


示例2: importData

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
/**
 * This function is called after change in the build.gradle file or refresh gradle dependencies call.
 * @param toImport the project dependencies
 * @param projectData the project data
 * @param project the current project
 * @param modelsProvider contains the project modules
 */
@Override
public void importData(@NotNull Collection<DataNode<LibraryDependencyData>> toImport,
                       @Nullable ProjectData projectData,
                       @NotNull Project project,
                       @NotNull IdeModifiableModelsProvider modelsProvider) {
    if (projectData == null || !projectData.getOwner().equals(GradleConstants.SYSTEM_ID)) {
        return;
    }

    ScanManager scanManager = ScanManagerFactory.getScanManager(project);
    if (scanManager == null) {
        ScanManagerFactory scanManagerFactory = ServiceManager.getService(project, ScanManagerFactory.class);
        scanManagerFactory.initScanManager(project);
        scanManager = ScanManagerFactory.getScanManager(project);
        if (scanManager == null) {
            return;
        }
        MessageBus messageBus = ApplicationManager.getApplication().getMessageBus();
        messageBus.syncPublisher(Events.ON_IDEA_FRAMEWORK_CHANGE).update();
    }
    if (GlobalSettings.getInstance().isCredentialsSet()) {
        scanManager.asyncScanAndUpdateResults(true, toImport);
    }
}
 
开发者ID:JFrogDev,项目名称:jfrog-idea-plugin,代码行数:32,代码来源:XrayDependencyDataService.java


示例3: addLocalMavenRepoInitScriptCommandLineOption

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@VisibleForTesting
@Nullable
static File addLocalMavenRepoInitScriptCommandLineOption(@NotNull List<String> args, @NotNull File repoPath) {
  try {
    File file = createTempFile("asLocalRepo", DOT_GRADLE);
    file.deleteOnExit();

    String contents = "allprojects {\n" +
                      "  buildscript {\n" +
                      "    repositories {\n" +
                      "      maven { url '" + GradleImport.escapeGroovyStringLiteral(repoPath.getPath()) + "'}\n" +
                      "    }\n" +
                      "  }\n" +
                      "}\n";
    writeToFile(file, contents);
    addAll(args, GradleConstants.INIT_SCRIPT_CMD_OPTION, file.getAbsolutePath());

    return file;
  }
  catch (IOException e) {
    LOG.warn("Failed to set up 'local repo' Gradle init script", e);
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:GradleUtil.java


示例4: testCustomizeModule

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
public void testCustomizeModule() {
  File rootDir = androidProject.getRootDir();
  IdeaAndroidProject ideaAndroidProject = new IdeaAndroidProject(GradleConstants.SYSTEM_ID, myModule.getName(), rootDir, androidProject,
                                                                 "debug", AndroidProject.ARTIFACT_ANDROID_TEST);
  String compilerOutputPath = "";
  final IdeModifiableModelsProviderImpl modelsProvider = new IdeModifiableModelsProviderImpl(myProject);
  try {
    customizer.customizeModule(myProject, myModule, modelsProvider, ideaAndroidProject);
    CompilerModuleExtension compilerSettings = modelsProvider.getModifiableRootModel(myModule).getModuleExtension(CompilerModuleExtension.class);
    compilerOutputPath = compilerSettings.getCompilerOutputUrl();
    modelsProvider.commit();
  }
  catch (Throwable t) {
    modelsProvider.dispose();
    ExceptionUtil.rethrowAllAsUnchecked(t);
  }

  File classesFolder = ideaAndroidProject.getSelectedVariant().getMainArtifact().getClassesFolder();
  String path = FileUtil.toSystemIndependentName(classesFolder.getPath());
  String expected = VfsUtilCore.pathToUrl(ExternalSystemApiUtil.toCanonicalPath(path));
  assertEquals(expected, compilerOutputPath);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CompilerOutputModuleCustomizerTest.java


示例5: setUp

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
  super.setUp();

  String basePath = myProject.getBasePath();
  assertNotNull(basePath);
  File baseDir = new File(basePath);
  myAndroidProject = createBasicProject(baseDir, myProject.getName());

  Collection<Variant> variants = myAndroidProject.getVariants();
  Variant selectedVariant = getFirstItem(variants);
  assertNotNull(selectedVariant);
  myIdeaAndroidProject = new IdeaAndroidProject(GradleConstants.SYSTEM_ID, myAndroidProject.getName(), baseDir, myAndroidProject,
                                                selectedVariant.getName(), ARTIFACT_ANDROID_TEST);

  addContentEntry();
  myCustomizer = new ContentRootModuleCustomizer();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ContentRootModuleCustomizerTest.java


示例6: testCustomizeModule

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
public void testCustomizeModule() {
  File rootDir = myAndroidProject.getRootDir();
  VariantStub selectedVariant = myAndroidProject.getFirstVariant();
  assertNotNull(selectedVariant);
  String selectedVariantName = selectedVariant.getName();
  IdeaAndroidProject project = new IdeaAndroidProject(GradleConstants.SYSTEM_ID, myAndroidProject.getName(), rootDir, myAndroidProject,
                                                      selectedVariantName, AndroidProject.ARTIFACT_ANDROID_TEST);
  final IdeModifiableModelsProviderImpl modelsProvider = new IdeModifiableModelsProviderImpl(myProject);
  try {
    myCustomizer.customizeModule(myProject, myModule, modelsProvider, project);
    modelsProvider.commit();
  }
  catch (Throwable t) {
    modelsProvider.dispose();
    ExceptionUtil.rethrowAllAsUnchecked(t);
  }

  // Verify that AndroidFacet was added and configured.
  AndroidFacet facet = AndroidFacet.getInstance(myModule);
  assertNotNull(facet);
  assertSame(project, facet.getIdeaAndroidProject());

  JpsAndroidModuleProperties facetState = facet.getProperties();
  assertFalse(facetState.ALLOW_USER_CONFIGURATION);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:AndroidFacetModuleCustomizerTest.java


示例7: testGetCustomizers

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
public void testGetCustomizers() {
  BuildVariantModuleCustomizer<?> customizer1 = createCustomizer(GradleConstants.SYSTEM_ID, IdeaAndroidProjectStub.class);
  BuildVariantModuleCustomizer<?> customizer2 = createCustomizer(ProjectSystemId.IDE, IdeaAndroidProject.class);
  BuildVariantModuleCustomizer<?> customizer3 = createCustomizer(GradleConstants.SYSTEM_ID, IdeaJavaProject.class);
  BuildVariantModuleCustomizer<?> customizer4 = createCustomizer(ProjectSystemId.IDE, IdeaJavaProject.class);

  replay(customizer1, customizer2, customizer3, customizer4);

  List<BuildVariantModuleCustomizer<IdeaAndroidProject>> customizers =
    BuildVariantUpdater.getCustomizers(GradleConstants.SYSTEM_ID, customizer1, customizer2, customizer3, customizer4);

  verify(customizer1, customizer2, customizer3, customizer4);

  // The list should include only the customizers that:
  // 1. Have a matching ProjectSystemId, or have ProjectSystemId.IDE as their ProjectSystemId
  // 2. Have IdeaAndroidProject (or subclass) as the supported model type
  assertThat(customizers).containsOnly(customizer1, customizer2);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:BuildVariantUpdaterTest.java


示例8: addArchiveLibraries

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
private void addArchiveLibraries() {
  // Add in some Android projects too
  myFacet.getProperties().ALLOW_USER_CONFIGURATION = false; // make it a Gradle project
  AndroidProjectStub androidProject = TestProjects.createFlavorsProject();
  VariantStub variant = androidProject.getFirstVariant();
  assertNotNull(variant);
  File rootDir = androidProject.getRootDir();
  IdeaAndroidProject ideaAndroidProject = new IdeaAndroidProject(GradleConstants.SYSTEM_ID, androidProject.getName(), rootDir,
                                                                 androidProject, variant.getName(), AndroidProject.ARTIFACT_ANDROID_TEST);
  myFacet.setIdeaAndroidProject(ideaAndroidProject);

  File bundle = new File(rootDir, "bundle.aar");
  File libJar = new File(rootDir, "bundle_aar" + File.separatorChar + "library.jar");
  AndroidLibraryStub library = new AndroidLibraryStub(bundle, libJar);
  variant.getMainArtifact().getDependencies().addLibrary(library);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ProjectResourceRepositoryTest.java


示例9: enhanceRemoteProcessing

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
public void enhanceRemoteProcessing(@NotNull SimpleJavaParameters parameters) throws ExecutionException {
  final Set<String> additionalEntries = ContainerUtilRt.newHashSet();
  for (GradleProjectResolverExtension extension : RESOLVER_EXTENSIONS.getValue()) {
    ContainerUtilRt.addIfNotNull(additionalEntries, PathUtil.getJarPathForClass(extension.getClass()));
    for (Class aClass : extension.getExtraProjectModelClasses()) {
      ContainerUtilRt.addIfNotNull(additionalEntries, PathUtil.getJarPathForClass(aClass));
    }
    extension.enhanceRemoteProcessing(parameters);
  }

  final PathsList classPath = parameters.getClassPath();
  for (String entry : additionalEntries) {
    classPath.add(entry);
  }

  parameters.getVMParametersList().addProperty(
    ExternalSystemConstants.EXTERNAL_SYSTEM_ID_KEY, GradleConstants.SYSTEM_ID.getId());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:GradleManager.java


示例10: populateModuleExtraModels

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
public void populateModuleExtraModels(@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) {
  final List<War> warModels;
  final WebConfiguration webConfiguration = resolverCtx.getExtraProject(gradleModule, WebConfiguration.class);
  if (webConfiguration != null) {
    warModels = ContainerUtil.map(webConfiguration.getWarModels(), new Function<WebConfiguration.WarModel, War>() {
        @Override
        public War fun(WebConfiguration.WarModel model) {
          War war = new War(model.getWarName(), model.getWebAppDirName(), model.getWebAppDir());
          war.setWebXml(model.getWebXml());
          war.setWebResources(map(model.getWebResources()));
          war.setClasspath(model.getClasspath());
          war.setManifestContent(model.getManifestContent());
          return war;
        }
      });
    ideModule.createChild(WebConfigurationModelData.KEY, new WebConfigurationModelData(GradleConstants.SYSTEM_ID, warModels));
  }
  nextResolver.populateModuleExtraModels(gradleModule, ideModule);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JavaEEGradleProjectResolverExtension.java


示例11: isConfigurationFromContext

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
public boolean isConfigurationFromContext(ExternalSystemRunConfiguration configuration, ConfigurationContext context) {
  if (configuration == null) return false;
  if (!GradleConstants.SYSTEM_ID.equals(configuration.getSettings().getExternalSystemId())) return false;

  final PsiPackage psiPackage = JavaRuntimeConfigurationProducerBase.checkPackage(context.getPsiLocation());
  if (psiPackage == null) return false;

  if (context.getModule() == null) return false;

  if (!StringUtil.equals(
    context.getModule().getOptionValue(ExternalSystemConstants.LINKED_PROJECT_PATH_KEY),
    configuration.getSettings().getExternalProjectPath())) {
    return false;
  }
  if (!configuration.getSettings().getTaskNames().containsAll(TASKS_TO_RUN)) return false;

  final String scriptParameters = configuration.getSettings().getScriptParameters() + ' ';
  return psiPackage.getQualifiedName().isEmpty()
         ? scriptParameters.contains("--tests * ")
         : scriptParameters.contains(String.format("--tests %s.* ", psiPackage.getQualifiedName()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:AllInPackageGradleConfigurationProducer.java


示例12: applyTestMethodConfiguration

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
private static boolean applyTestMethodConfiguration(@NotNull ExternalSystemRunConfiguration configuration,
                                                    @NotNull ConfigurationContext context,
                                                    @NotNull PsiMethod psiMethod,
                                                    @NotNull PsiClass... containingClasses) {
  if (!StringUtil.equals(
    context.getModule().getOptionValue(ExternalSystemConstants.EXTERNAL_SYSTEM_ID_KEY),
    GradleConstants.SYSTEM_ID.toString())) {
    return false;
  }

  configuration.getSettings().setExternalProjectPath(context.getModule().getOptionValue(ExternalSystemConstants.LINKED_PROJECT_PATH_KEY));
  configuration.getSettings().setTaskNames(TASKS_TO_RUN);

  StringBuilder buf = new StringBuilder();
  for (PsiClass aClass : containingClasses) {
    buf.append(creatTestFilter(aClass, psiMethod));
  }

  configuration.getSettings().setScriptParameters(buf.toString().trim());
  configuration.setName(psiMethod.getName());
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:TestMethodGradleConfigurationProducer.java


示例13: setupGradleBuildFile

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Nullable
private VirtualFile setupGradleBuildFile(@NotNull VirtualFile modelContentRootDir)
  throws ConfigurationException {
  final VirtualFile file = getOrCreateExternalProjectConfigFile(modelContentRootDir.getPath(), GradleConstants.DEFAULT_SCRIPT_NAME);

  if (file != null) {
    final String templateName = getExternalProjectSettings().getDistributionType() == DistributionType.WRAPPED
                                ? TEMPLATE_GRADLE_BUILD_WITH_WRAPPER
                                : DEFAULT_TEMPLATE_GRADLE_BUILD;
    Map<String, String> attributes = ContainerUtil.newHashMap();
    if (myProjectId != null) {
      attributes.put(TEMPLATE_ATTRIBUTE_MODULE_VERSION, myProjectId.getVersion());
      attributes.put(TEMPLATE_ATTRIBUTE_MODULE_GROUP, myProjectId.getGroupId());
      attributes.put(TEMPLATE_ATTRIBUTE_GRADLE_VERSION, GradleVersion.current().getVersion());
    }
    saveFile(file, templateName, attributes);
  }
  return file;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:GradleModuleBuilder.java


示例14: populateModuleExtraModels

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
public void populateModuleExtraModels(@NotNull IdeaModule gradleModule, @NotNull DataNode<ModuleData> ideModule) {
  final BuildScriptClasspathModel buildScriptClasspathModel = resolverCtx.getExtraProject(gradleModule, BuildScriptClasspathModel.class);
  final List<BuildScriptClasspathData.ClasspathEntry> classpathEntries;
  if (buildScriptClasspathModel != null) {
    classpathEntries = ContainerUtil
      .map(buildScriptClasspathModel.getClasspath(), new Function<ClasspathEntryModel, BuildScriptClasspathData.ClasspathEntry>() {
        @Override
        public BuildScriptClasspathData.ClasspathEntry fun(ClasspathEntryModel model) {
          return new BuildScriptClasspathData.ClasspathEntry(model.getClasses(), model.getSources(), model.getJavadoc());
        }
      });
  }
  else {
    classpathEntries = ContainerUtil.emptyList();
  }
  BuildScriptClasspathData buildScriptClasspathData = new BuildScriptClasspathData(GradleConstants.SYSTEM_ID, classpathEntries);
  ideModule.createChild(BuildScriptClasspathData.KEY, buildScriptClasspathData);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:BaseGradleProjectResolverExtension.java


示例15: getClosureParameterType

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Nullable
@Override
protected PsiType getClosureParameterType(GrClosableBlock closure, int index) {

  PsiFile file = closure.getContainingFile();
  if (file == null || !FileUtilRt.extensionEquals(file.getName(), GradleConstants.EXTENSION)) return null;

  PsiType psiType = super.getClosureParameterType(closure, index);
  if (psiType instanceof PsiWildcardType) {
    PsiWildcardType wildcardType = (PsiWildcardType)psiType;
    if (wildcardType.isSuper() && wildcardType.getBound() != null &&
        wildcardType.getBound().equalsToText(GradleCommonClassNames.GRADLE_API_SOURCE_SET)) {
      return wildcardType.getBound();
    }
    if (wildcardType.isSuper() && wildcardType.getBound() != null &&
        wildcardType.getBound().equalsToText(GradleCommonClassNames.GRADLE_API_DISTRIBUTION)) {
      return wildcardType.getBound();
    }
  }

  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:GradleClosureAsAnonymousParameterEnhancer.java


示例16: processDynamicElements

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
public void processDynamicElements(@NotNull PsiType qualifierType,
                                   PsiClass aClass,
                                   @NotNull PsiScopeProcessor processor,
                                   @NotNull PsiElement place,
                                   @NotNull ResolveState state) {
  if (!(aClass instanceof GroovyScriptClass)) {
    return;
  }

  PsiFile file = aClass.getContainingFile();
  if (file == null || !file.getName().equals(GradleConstants.SETTINGS_FILE_NAME)) {
    return;
  }

  GroovyPsiManager psiManager = GroovyPsiManager.getInstance(place.getProject());
  GradleResolverUtil.processDeclarations(psiManager, processor, state, place, GradleCommonClassNames.GRADLE_API_INITIALIZATION_SETTINGS);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:GradleSettingsScriptContributor.java


示例17: adjust

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Nullable
@Override
public VirtualFile adjust(@NotNull VirtualFile configPath) {
  if (!configPath.isDirectory()) {
    return configPath;
  }

  VirtualFile result = configPath.findChild(GradleConstants.DEFAULT_SCRIPT_NAME);
  if (result != null) {
    return result;
  }
  
  for (VirtualFile child : configPath.getChildren()) {
    String name = child.getName();
    if (!name.endsWith(GradleConstants.EXTENSION)) {
      continue;
    }
    if (!GradleConstants.SETTINGS_FILE_NAME.equals(name) && !child.isDirectory()) {
      return child;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:GradleConfigLocator.java


示例18: findAll

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@NotNull
@Override
public List<VirtualFile> findAll(@NotNull ExternalProjectSettings externalProjectSettings) {
  List<VirtualFile> list = ContainerUtil.newArrayList();
  for (String path : externalProjectSettings.getModules()) {
    VirtualFile vFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(new File(path));
    if (vFile != null) {
      for (VirtualFile child : vFile.getChildren()) {
        String name = child.getName();
        if (!child.isDirectory() && name.endsWith(GradleConstants.EXTENSION)) {
          list.add(child);
        }
      }
    }
  }
  return list;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GradleConfigLocator.java


示例19: cancelTask

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
@Override
public boolean cancelTask(@NotNull ExternalSystemTaskId id, @NotNull ExternalSystemTaskNotificationListener listener)
  throws ExternalSystemException {

  // extension points are available only in IDE process
  if (ExternalSystemApiUtil.isInProcessMode(GradleConstants.SYSTEM_ID)) {
    for (GradleTaskManagerExtension gradleTaskManagerExtension : GradleTaskManagerExtension.EP_NAME.getExtensions()) {
      if (gradleTaskManagerExtension.cancelTask(id, listener)) return true;
    }
  }

  final CancellationTokenSource cancellationTokenSource = myCancellationMap.get(id);
  if (cancellationTokenSource != null) {
    cancellationTokenSource.cancel();
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GradleTaskManager.java


示例20: updateNotification

import org.jetbrains.plugins.gradle.util.GradleConstants; //导入依赖的package包/类
private static void updateNotification(@NotNull final NotificationData notificationData,
                                       @NotNull final Project project,
                                       @NotNull ExternalSystemException e) {

  for (String fix : e.getQuickFixes()) {
    if (OpenGradleSettingsCallback.ID.equals(fix)) {
      notificationData.setListener(OpenGradleSettingsCallback.ID, new OpenGradleSettingsCallback(project));
    }
    else if (ApplyGradlePluginCallback.ID.equals(fix)) {
      notificationData.setListener(ApplyGradlePluginCallback.ID, new ApplyGradlePluginCallback(notificationData, project));
    }
    else if (GotoSourceNotificationCallback.ID.equals(fix)) {
      notificationData.setListener(GotoSourceNotificationCallback.ID, new GotoSourceNotificationCallback(notificationData, project));
    }
    else if (OpenExternalSystemSettingsCallback.ID.equals(fix)) {
      String linkedProjectPath = e instanceof LocationAwareExternalSystemException ?
                                 ((LocationAwareExternalSystemException)e).getFilePath() : null;
      notificationData.setListener(
        OpenExternalSystemSettingsCallback.ID,
        new OpenExternalSystemSettingsCallback(project, GradleConstants.SYSTEM_ID, linkedProjectPath)
      );
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:GradleNotificationExtension.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Session类代码示例发布时间:2022-05-23
下一篇:
Java ResourcePackListEntryFound类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap