本文整理汇总了Java中com.intellij.execution.configurations.RunnerSettings类的典型用法代码示例。如果您正苦于以下问题:Java RunnerSettings类的具体用法?Java RunnerSettings怎么用?Java RunnerSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RunnerSettings类属于com.intellij.execution.configurations包,在下文中一共展示了RunnerSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ExecutionEnvironment
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
ExecutionEnvironment(@NotNull RunProfile runProfile,
@NotNull Executor executor,
@NotNull ExecutionTarget target,
@NotNull Project project,
@Nullable RunnerSettings runnerSettings,
@Nullable ConfigurationPerRunnerSettings configurationSettings,
@Nullable RunContentDescriptor contentToReuse,
@Nullable RunnerAndConfigurationSettings settings,
@NotNull ProgramRunner<?> runner) {
myExecutor = executor;
myTarget = target;
myRunProfile = runProfile;
myRunnerSettings = runnerSettings;
myConfigurationSettings = configurationSettings;
myProject = project;
setContentToReuse(contentToReuse);
myRunnerAndConfigurationSettings = settings;
myRunner = runner;
}
示例2: updateJavaParameters
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
public void updateJavaParameters(RunConfigurationBase configuration, JavaParameters params, RunnerSettings runnerSettings) {
if (!isApplicableFor(configuration)) {
return;
}
final JavaCoverageEnabledConfiguration coverageConfig = JavaCoverageEnabledConfiguration.getFrom(configuration);
//noinspection ConstantConditions
coverageConfig.setCurrentCoverageSuite(null);
final CoverageRunner coverageRunner = coverageConfig.getCoverageRunner();
if (runnerSettings instanceof CoverageRunnerData && coverageRunner != null) {
final CoverageDataManager coverageDataManager = CoverageDataManager.getInstance(configuration.getProject());
coverageConfig.setCurrentCoverageSuite(coverageDataManager.addCoverageSuite(coverageConfig));
coverageConfig.appendCoverageArgument(configuration, params);
final Sdk jdk = params.getJdk();
if (jdk != null && JavaSdk.getInstance().isOfVersionOrHigher(jdk, JavaSdkVersion.JDK_1_7) && coverageRunner instanceof JavaCoverageRunner && !((JavaCoverageRunner)coverageRunner).isJdk7Compatible()) {
Notifications.Bus.notify(new Notification("Coverage", "Coverage instrumentation is not fully compatible with JDK 7",
coverageRunner.getPresentableName() +
" coverage instrumentation can lead to java.lang.VerifyError errors with JDK 7. If so, please try IDEA coverage runner.",
NotificationType.WARNING));
}
}
}
示例3: attachToProcess
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
@Override
public void attachToProcess(@NotNull final RunConfigurationBase configuration, @NotNull final ProcessHandler handler, @Nullable RunnerSettings runnerSettings) {
super.attachToProcess(configuration, handler, runnerSettings);
if (!(runnerSettings instanceof DynatraceRunnerSettings)) {
return;
}
if (!(handler instanceof OSProcessHandler)) {
return;
}
DynatraceConfigurableStorage executionSettings = DynatraceConfigurableStorage.getOrCreateStorage(configuration);
handler.putCopyableUserData(PROFILE_KEY, executionSettings.getSystemProfile());
OSProcessHandler procHandler = (OSProcessHandler) handler;
handler.addProcessListener(new DynatraceProcessListener(executionSettings.getSystemProfile(), configuration.getProject()));
if(!(configuration instanceof JavaTestConfigurationBase)) {
return;
}
Matcher matcher = TRID_EXTRACTOR.matcher(procHandler.getCommandLine());
if (!matcher.find()) {
return;
}
handler.putCopyableUserData(TRID_KEY, matcher.group(1));
}
开发者ID:Dynatrace,项目名称:Dynatrace-AppMon-IntelliJ-IDEA-Integration-Plugin,代码行数:27,代码来源:DynatraceRunConfigurationExtension.java
示例4: ExecutionEnvironment
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
ExecutionEnvironment(@Nonnull RunProfile runProfile,
@Nonnull Executor executor,
@Nonnull ExecutionTarget target,
@Nonnull Project project,
@Nullable RunnerSettings runnerSettings,
@Nullable ConfigurationPerRunnerSettings configurationSettings,
@Nullable RunContentDescriptor contentToReuse,
@Nullable RunnerAndConfigurationSettings settings,
@Nonnull ProgramRunner<?> runner) {
myExecutor = executor;
myTarget = target;
myRunProfile = runProfile;
myRunnerSettings = runnerSettings;
myConfigurationSettings = configurationSettings;
myProject = project;
setContentToReuse(contentToReuse);
myRunnerAndConfigurationSettings = settings;
myRunner = runner;
}
示例5: startProcess
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
@NotNull
@Override
protected OSProcessHandler startProcess() throws ExecutionException
{
OSProcessHandler handler;
if(SystemInfo.isWindows)
{
handler = super.startProcess();
}
else
{
handler = KillableColoredProcessHandler.create(createCommandLine());
ProcessTerminatedListener.attach(handler);
}
RunnerSettings runnerSettings = getRunnerSettings();
JavaRunConfigurationExtensionManager.getInstance().attachExtensionsToProcess(getConfiguration(), handler, runnerSettings);
return handler;
}
示例6: updateJavaParameters
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
public void updateJavaParameters(RunConfigurationBase configuration, OwnJavaParameters params, RunnerSettings runnerSettings) {
if (!isApplicableFor(configuration)) {
return;
}
final JavaCoverageEnabledConfiguration coverageConfig = JavaCoverageEnabledConfiguration.getFrom(configuration);
//noinspection ConstantConditions
coverageConfig.setCurrentCoverageSuite(null);
final CoverageRunner coverageRunner = coverageConfig.getCoverageRunner();
if (runnerSettings instanceof CoverageRunnerData && coverageRunner != null) {
final CoverageDataManager coverageDataManager = CoverageDataManager.getInstance(configuration.getProject());
coverageConfig.setCurrentCoverageSuite(coverageDataManager.addCoverageSuite(coverageConfig));
coverageConfig.appendCoverageArgument(params);
final Sdk jdk = params.getJdk();
if (jdk != null && JavaSdk.getInstance().isOfVersionOrHigher(jdk, JavaSdkVersion.JDK_1_7) && coverageRunner instanceof JavaCoverageRunner && !((JavaCoverageRunner)coverageRunner).isJdk7Compatible()) {
Notifications.Bus.notify(new Notification("Coverage", "Coverage instrumentation is not fully compatible with JDK 7",
coverageRunner.getPresentableName() +
" coverage instrumentation can lead to java.lang.VerifyError errors with JDK 7. If so, please try IDEA coverage runner.",
NotificationType.WARNING));
}
}
}
示例7: updateJavaParameters
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
@Override
public <T extends RunConfigurationBase> void updateJavaParameters(
final T configuration, final JavaParameters params, final RunnerSettings runnerSettings
) throws ExecutionException {
if (runnerSettings != null || !isApplicableFor(configuration)) {
return;
}
final Project project = configuration.getProject();
final ParametersList vmParameters = params.getVMParametersList();
if (!vmParameters.hasParameter("-ea")) {
vmParameters.add("-ea");
}
if (vmParameters.getParameters().stream().noneMatch(param -> param.startsWith("-Dplatformhome="))) {
final VirtualFile platformRootDirectory = findPlatformRootDirectory(project);
if (platformRootDirectory != null) {
vmParameters.add("-Dplatformhome=" + platformRootDirectory.getPath());
}
}
if (!params.getEnv().containsKey(HYBRIS_DATA_DIR_ENV)) {
final HybrisProjectSettings settings = HybrisProjectSettingsComponent.getInstance(project).getState();
final String hybrisDataDirPath = FileUtil.toCanonicalPath(
project.getBasePath() + '/' + settings.getHybrisDirectory() + '/' + HybrisConstants.HYBRIS_DATA_DIRECTORY);
if (hybrisDataDirPath != null) {
params.addEnv(HYBRIS_DATA_DIR_ENV, hybrisDataDirPath);
}
}
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:32,代码来源:HybrisJUnitExtension.java
示例8: updateJavaParameters
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
@Override
public void updateJavaParameters(RunConfigurationBase configuration, JavaParameters params,
RunnerSettings runnerSettings) {
PathsList classpath = params.getClassPath();
final Optional<String> allureAdaptor = classpath.getPathList().stream()
.filter(e -> e.matches(ALLURE_JAVA_ADAPTORS_REGEX)).findFirst();
final Optional<String> aspectjDependency = classpath.getPathList().stream()
.filter(e -> e.contains(ASPECTJ_DEPENCENCY)).findFirst();
if (allureAdaptor.isPresent() && aspectjDependency.isPresent()) {
//TODO:extract path to adspectj jar
params.getVMParametersList().addParametersString(ASPECTJWEAVER_OPTION_STRING);
}
}
示例9: updateJavaParameters
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
public void updateJavaParameters(RunConfigurationBase configuration, JavaParameters params, RunnerSettings runnerSettings) {
if (runnerSettings != null || !isApplicableFor(configuration)) {
return;
}
StringBuilder argument = new StringBuilder("-javaagent:");
final String agentPath = PathUtil.getJarPathForClass(ProjectData.class);//todo spaces
argument.append(agentPath);
params.getVMParametersList().add(argument.toString());
params.getClassPath().add(agentPath);
params.getVMParametersList().addProperty(ProjectData.TRACE_DIR, getTracesDirectory(configuration));
}
示例10: patchCommandLine
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
public void patchCommandLine(@NotNull final U configuration,
final RunnerSettings runnerSettings,
@NotNull final GeneralCommandLine cmdLine,
@NotNull final String runnerId) throws ExecutionException {
// only for enabled extensions
for (T extension : getEnabledExtensions(configuration, runnerSettings)) {
extension.patchCommandLine(configuration, runnerSettings, cmdLine, runnerId);
}
}
示例11: attachExtensionsToProcess
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
public void attachExtensionsToProcess(@NotNull final U configuration,
@NotNull final ProcessHandler handler,
RunnerSettings runnerSettings) {
// only for enabled extensions
for (T extension : getEnabledExtensions(configuration, runnerSettings)) {
extension.attachToProcess(configuration, handler, runnerSettings);
}
}
示例12: getEnabledExtensions
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
protected List<T> getEnabledExtensions(@NotNull U configuration, @Nullable RunnerSettings runnerSettings) {
List<T> extensions = new SmartList<T>();
for (T extension : Extensions.getExtensions(myExtensionPointName)) {
if (extension.isApplicableFor(configuration) && extension.isEnabledFor(configuration, runnerSettings)) {
extensions.add(extension);
}
}
return extensions;
}
示例13: updateJavaParameters
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
@Override
public void updateJavaParameters(RunConfigurationBase configuration, JavaParameters params, RunnerSettings runnerSettings) {
if (!isApplicableFor(configuration)) {
return;
}
ApplicationConfiguration appConfiguration = (ApplicationConfiguration) configuration;
SnapShooterConfigurationSettings settings = appConfiguration.getUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY);
if (settings == null) {
settings = new SnapShooterConfigurationSettings();
appConfiguration.putUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY, settings);
}
if (appConfiguration.ENABLE_SWING_INSPECTOR) {
settings.setLastPort(NetUtils.tryToFindAvailableSocketPort());
}
if (appConfiguration.ENABLE_SWING_INSPECTOR && settings.getLastPort() != -1) {
params.getProgramParametersList().prepend(appConfiguration.MAIN_CLASS_NAME);
params.getProgramParametersList().prepend(Integer.toString(settings.getLastPort()));
// add +1 because idea_rt.jar will be added as the last entry to the classpath
params.getProgramParametersList().prepend(Integer.toString(params.getClassPath().getPathList().size() + 1));
Set<String> paths = new TreeSet<String>();
paths.add(PathUtil.getJarPathForClass(SnapShooter.class)); // ui-designer-impl
paths.add(PathUtil.getJarPathForClass(BaseComponent.class)); // appcore-api
paths.add(PathUtil.getJarPathForClass(ProjectComponent.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LwComponent.class)); // UIDesignerCore
paths.add(PathUtil.getJarPathForClass(GridConstraints.class)); // forms_rt
paths.add(PathUtil.getJarPathForClass(PaletteGroup.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LafManagerListener.class)); // ui-impl
paths.add(PathUtil.getJarPathForClass(DataProvider.class)); // action-system-openapi
paths.add(PathUtil.getJarPathForClass(XmlStringUtil.class)); // idea
paths.add(PathUtil.getJarPathForClass(Navigatable.class)); // pom
paths.add(PathUtil.getJarPathForClass(AreaInstance.class)); // extensions
paths.add(PathUtil.getJarPathForClass(FormLayout.class)); // jgoodies
paths.addAll(PathManager.getUtilClassPath());
for(String path: paths) {
params.getClassPath().addFirst(path);
}
params.setMainClass("com.intellij.uiDesigner.snapShooter.SnapShooter");
}
}
示例14: attachToProcess
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
public void attachToProcess(@NotNull final RunConfigurationBase configuration, @NotNull final ProcessHandler handler, RunnerSettings runnerSettings) {
SnapShooterConfigurationSettings settings = configuration.getUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY);
if (settings != null) {
final Runnable runnable = settings.getNotifyRunnable();
if (runnable != null) {
settings.setNotifyRunnable(null);
handler.addProcessListener(new ProcessAdapter() {
public void startNotified(final ProcessEvent event) {
runnable.run();
}
});
}
}
}
示例15: isListenerDisabled
import com.intellij.execution.configurations.RunnerSettings; //导入依赖的package包/类
@Override
public boolean isListenerDisabled(RunConfigurationBase configuration, Object listener, RunnerSettings runnerSettings) {
if (listener instanceof CoverageListener) {
if (!(runnerSettings instanceof CoverageRunnerData)) return true;
final CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(configuration);
return !(coverageEnabledConfiguration.getCoverageRunner() instanceof IDEACoverageRunner) ||
!(coverageEnabledConfiguration.isTrackPerTestCoverage() && !coverageEnabledConfiguration.isSampling());
}
return false;
}