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


Java ExtensionPoints类代码示例

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


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

示例1: createJavaParameters

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Override
protected JavaParameters createJavaParameters() throws ExecutionException {
  final JavaParameters javaParameters = new JavaParameters();
  javaParameters.setUseClasspathJar(true);
  final Module module = getConfiguration().getConfigurationModule().getModule();

  Project project = getConfiguration().getProject();
  Sdk jdk = module == null ? ProjectRootManager.getInstance(project).getProjectSdk() : ModuleRootManager.getInstance(module).getSdk();
  javaParameters.setJdk(jdk);
  
  final String parameters = getConfiguration().getProgramParameters();
  getConfiguration().setProgramParameters(null);
  try {
    JavaParametersUtil.configureConfiguration(javaParameters, getConfiguration());
  }
  finally {
    getConfiguration().setProgramParameters(parameters);
  }
  javaParameters.getClassPath().addFirst(JavaSdkUtil.getIdeaRtJarPath());
  configureClasspath(javaParameters);

  final Object[] patchers = Extensions.getExtensions(ExtensionPoints.JUNIT_PATCHER);
  for (Object patcher : patchers) {
    ((JUnitPatcher)patcher).patchJavaParameters(module, javaParameters);
  }

  // Append coverage parameters if appropriate
  for (RunConfigurationExtension ext : Extensions.getExtensions(RunConfigurationExtension.EP_NAME)) {
    ext.updateJavaParameters(getConfiguration(), javaParameters, getRunnerSettings());
  }

  if (!StringUtil.isEmptyOrSpaces(parameters)) {
    javaParameters.getProgramParametersList().addAll(getNamedParams(parameters));
  }

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

示例2: getStarter

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@NotNull
public ApplicationStarter getStarter() {
  if (myArgs.length > 0) {
    PluginManagerCore.getPlugins();

    ExtensionPoint<ApplicationStarter> point = Extensions.getRootArea().getExtensionPoint(ExtensionPoints.APPLICATION_STARTER);
    ApplicationStarter[] starters = point.getExtensions();
    String key = myArgs[0];
    for (ApplicationStarter o : starters) {
      if (Comparing.equal(o.getCommandName(), key)) return o;
    }
  }

  return new IdeStarter();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:IdeaApplication.java

示例3: getSubmitter

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Nullable
public static ErrorReportSubmitter getSubmitter(final Throwable throwable) {
  if (throwable instanceof MessagePool.TooManyErrorsException || throwable instanceof AbstractMethodError) {
    return null;
  }
  final PluginId pluginId = findPluginId(throwable);
  final ErrorReportSubmitter[] reporters;
  try {
    reporters = Extensions.getExtensions(ExtensionPoints.ERROR_HANDLER_EP);
  }
  catch (Throwable t) {
    return null;
  }
  IdeaPluginDescriptor plugin = PluginManager.getPlugin(pluginId);
  if (plugin == null) {
    return getCorePluginSubmitter(reporters);
  }
  for (ErrorReportSubmitter reporter : reporters) {
    final PluginDescriptor descriptor = reporter.getPluginDescriptor();
    if (descriptor != null && Comparing.equal(pluginId, descriptor.getPluginId())) {
      return reporter;
    }
  }
  if (PluginManagerMain.isDevelopedByJetBrains(plugin)) {
    return getCorePluginSubmitter(reporters);
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:IdeErrorsDialog.java

示例4: enabledGoogleFeedbackErrorReporting

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Override
public void enabledGoogleFeedbackErrorReporting(@NotNull String pluginId) {
  GoogleFeedbackErrorReporter errorReporter = new GoogleFeedbackErrorReporter();
  IdeaPluginDescriptor plugin = PluginManager.getPlugin(PluginId.getId(pluginId));
  if (plugin == null) {
    throw new IllegalArgumentException(pluginId + " is not a valid plugin ID.");
  }
  errorReporter.setPluginDescriptor(plugin);
  Extensions.getRootArea()
      .getExtensionPoint(ExtensionPoints.ERROR_HANDLER_EP)
      .registerExtension(errorReporter);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:13,代码来源:DefaultPluginConfigurationService.java

示例5: tearDown

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Override
protected void tearDown() throws Exception {
  ExtensionPoint<EntryPoint> point = Extensions.getRootArea().getExtensionPoint(ExtensionPoints.DEAD_CODE_TOOL);
  point.unregisterExtension(myUnusedCodeExtension);
  myUnusedCodeExtension = null;
  ext_src = null;
  super.tearDown();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:InspectionTestCase.java

示例6: getStarter

import com.intellij.ExtensionPoints; //导入依赖的package包/类
protected ApplicationStarter getStarter() {
  if (myArgs.length > 0) {
    PluginManagerCore.getPlugins();

    ExtensionPoint<ApplicationStarter> point = Extensions.getRootArea().getExtensionPoint(ExtensionPoints.APPLICATION_STARTER);
    ApplicationStarter[] starters = point.getExtensions();
    String key = myArgs[0];
    for (ApplicationStarter o : starters) {
      if (Comparing.equal(o.getCommandName(), key)) return o;
    }
  }

  return new IdeStarter();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:IdeaApplication.java

示例7: getSubmitter

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Nullable
public static ErrorReportSubmitter getSubmitter(final Throwable throwable) {
  if (throwable instanceof MessagePool.TooManyErrorsException || throwable instanceof AbstractMethodError) {
    return null;
  }
  final PluginId pluginId = findPluginId(throwable);
  final ErrorReportSubmitter[] reporters;
  try {
    reporters = Extensions.getExtensions(ExtensionPoints.ERROR_HANDLER_EP);
  }
  catch (Throwable t) {
    return null;
  }
  ErrorReportSubmitter submitter = null;
  for (ErrorReportSubmitter reporter : reporters) {
    /** Android Studio: Always use the android error reporter */
    String canonicalName = reporter.getClass().getCanonicalName();
    if (canonicalName != null && canonicalName.contains("android")) {
      return reporter;
    }
    final PluginDescriptor descriptor = reporter.getPluginDescriptor();
    if (pluginId == null && (descriptor == null || PluginId.getId("com.intellij") == descriptor.getPluginId())
        || descriptor != null && Comparing.equal(pluginId, descriptor.getPluginId())) {
      submitter = reporter;
    }
  }
  return submitter;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:IdeErrorsDialog.java

示例8: getJavaParameters

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Override
public JavaParameters getJavaParameters() throws ExecutionException {
  if (myJavaParameters == null) {
    myJavaParameters = new JavaParameters();
    initialize();
    final Module module = myConfiguration.getConfigurationModule().getModule();
    final Object[] patchers = Extensions.getExtensions(ExtensionPoints.JUNIT_PATCHER);
    for (Object patcher : patchers) {
      ((JUnitPatcher)patcher).patchJavaParameters(module, myJavaParameters);
    }
  }
  return myJavaParameters;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:TestObject.java

示例9: checkFile

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Override
@Nullable
public ProblemDescriptor[] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly) {
  ExtensionPoint<FileCheckingInspection> point = Extensions.getRootArea().getExtensionPoint(ExtensionPoints.I18N_INSPECTION_TOOL);
  final FileCheckingInspection[] fileCheckingInspections = point.getExtensions();
  for(FileCheckingInspection obj: fileCheckingInspections) {
    ProblemDescriptor[] descriptors = obj.checkFile(file, manager, isOnTheFly);
    if (descriptors != null) {
      return descriptors;
    }
  }

  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:I18nInspection.java

示例10: checkFile

import com.intellij.ExtensionPoints; //导入依赖的package包/类
@Override
@Nullable
public ProblemDescriptor[] checkFile(@NotNull final PsiFile file, @NotNull final InspectionManager manager, boolean isOnTheFly) {
  ExtensionPoint<FileCheckingInspection> point = Extensions.getRootArea().getExtensionPoint(ExtensionPoints.INVALID_PROPERTY_KEY_INSPECTION_TOOL);
  final FileCheckingInspection[] fileCheckingInspections = point.getExtensions();
  for (FileCheckingInspection obj : fileCheckingInspections) {
    ProblemDescriptor[] descriptors = obj.checkFile(file, manager, isOnTheFly);
    if (descriptors != null) {
      return descriptors;
    }
  }

  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:InvalidPropertyKeyInspection.java


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