Java Code Examples for com.intellij.execution.actions.ConfigurationContext#getProject()
The following examples show how to use
com.intellij.execution.actions.ConfigurationContext#getProject() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SmRunnerUtils.java From intellij with Apache License 2.0 | 5 votes |
public static List<Location<?>> getSelectedSmRunnerTreeElements(ConfigurationContext context) { Project project = context.getProject(); List<SMTestProxy> tests = getSelectedTestProxies(context); return tests.stream() .map(test -> (Location<?>) test.getLocation(project, GlobalSearchScope.allScope(project))) .filter(Objects::nonNull) .collect(Collectors.toList()); }
Example 2
Source File: PantsTestRunConfigurationProducer.java From intellij-pants-plugin with Apache License 2.0 | 5 votes |
@Override public boolean isConfigurationFromContext( @NotNull ExternalSystemRunConfiguration configuration, @NotNull ConfigurationContext context ) { final ExternalSystemRunConfiguration tempConfig = new ExternalSystemRunConfiguration( PantsConstants.SYSTEM_ID, context.getProject(), configuration.getFactory(), configuration.getName() ); final Ref<PsiElement> locationRef = new Ref<>(context.getPsiLocation()); setupConfigurationFromContext(tempConfig, context, locationRef); return compareSettings(configuration.getSettings(), tempConfig.getSettings()); }