本文整理汇总了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;
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}