本文整理汇总了Java中com.intellij.execution.configurations.RunConfiguration.getProject方法的典型用法代码示例。如果您正苦于以下问题:Java RunConfiguration.getProject方法的具体用法?Java RunConfiguration.getProject怎么用?Java RunConfiguration.getProject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.execution.configurations.RunConfiguration
的用法示例。
在下文中一共展示了RunConfiguration.getProject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAvailableConfigurations
import com.intellij.execution.configurations.RunConfiguration; //导入方法依赖的package包/类
@NotNull
private static List<RunnerAndConfigurationSettings> getAvailableConfigurations(@NotNull RunConfiguration runConfiguration) {
Project project = runConfiguration.getProject();
if (project == null || !project.isInitialized()) {
return Collections.emptyList();
}
List<RunnerAndConfigurationSettings> configurations = new ArrayList<RunnerAndConfigurationSettings>(RunManagerImpl.getInstanceImpl(project).getSortedConfigurations());
String executorId = DefaultRunExecutor.getRunExecutorInstance().getId();
for (Iterator<RunnerAndConfigurationSettings> iterator = configurations.iterator(); iterator.hasNext();) {
RunnerAndConfigurationSettings settings = iterator.next();
ProgramRunner runner = ProgramRunnerUtil.getRunner(executorId, settings);
if (runner == null || settings.getConfiguration() == runConfiguration) {
iterator.remove();
}
}
return configurations;
}
示例2: configureTask
import com.intellij.execution.configurations.RunConfiguration; //导入方法依赖的package包/类
@Override
public boolean configureTask(RunConfiguration runConfiguration, T task) {
final ToolSelectDialog dialog = new ToolSelectDialog(runConfiguration.getProject(), task.getToolActionId(), createToolsPanel());
if (!dialog.showAndGet()) {
return false;
}
boolean isModified = dialog.isModified();
Tool selectedTool = dialog.getSelectedTool();
LOG.assertTrue(selectedTool != null);
String selectedToolId = selectedTool.getActionId();
String oldToolId = task.getToolActionId();
if (oldToolId != null && oldToolId.equals(selectedToolId)) {
return isModified;
}
task.setToolActionId(selectedToolId);
return true;
}
示例3: SMTRunnerConsoleProperties
import com.intellij.execution.configurations.RunConfiguration; //导入方法依赖的package包/类
/**
* @param config
* @param testFrameworkName Prefix for storage which keeps runner settings. E.g. "RubyTestUnit"
* @param executor
*/
public SMTRunnerConsoleProperties(@NotNull RunConfiguration config, @NotNull String testFrameworkName, @NotNull Executor executor) {
this(config.getProject(), config, testFrameworkName, executor);
}