Search in sources :

Example 51 with NotNull

use of org.jetbrains.annotations.NotNull in project intellij-community by JetBrains.

the class TestNGRunnableState method startProcess.

@NotNull
@Override
protected OSProcessHandler startProcess() throws ExecutionException {
    final OSProcessHandler processHandler = new KillableColoredProcessHandler(createCommandLine());
    ProcessTerminatedListener.attach(processHandler);
    createSearchingForTestsTask().attachTaskToProcess(processHandler);
    return processHandler;
}
Also used : OSProcessHandler(com.intellij.execution.process.OSProcessHandler) KillableColoredProcessHandler(com.intellij.execution.process.KillableColoredProcessHandler) NotNull(org.jetbrains.annotations.NotNull)

Example 52 with NotNull

use of org.jetbrains.annotations.NotNull in project intellij-community by JetBrains.

the class AbstractComboBoxAction method createPopupActionGroup.

@NotNull
@Override
protected DefaultActionGroup createPopupActionGroup(JComponent button) {
    DefaultActionGroup actionGroup = new DefaultActionGroup();
    for (final T item : myItems) {
        if (addSeparator(actionGroup, item)) {
            continue;
        }
        AnAction action = new AnAction() {

            @Override
            public void actionPerformed(AnActionEvent e) {
                if (mySelection != item && selectionChanged(item)) {
                    mySelection = item;
                    AbstractComboBoxAction.this.update(item, myPresentation, false);
                }
            }
        };
        actionGroup.add(action);
        Presentation presentation = action.getTemplatePresentation();
        presentation.setIcon(mySelection == item ? CHECKED : null);
        update(item, presentation, true);
    }
    return actionGroup;
}
Also used : AnActionEvent(com.intellij.openapi.actionSystem.AnActionEvent) Presentation(com.intellij.openapi.actionSystem.Presentation) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) AnAction(com.intellij.openapi.actionSystem.AnAction) NotNull(org.jetbrains.annotations.NotNull)

Example 53 with NotNull

use of org.jetbrains.annotations.NotNull in project intellij-community by JetBrains.

the class TestNGTestObject method getSearchScope.

@NotNull
protected GlobalSearchScope getSearchScope() {
    final TestData data = myConfig.getPersistantData();
    final Module module = myConfig.getConfigurationModule().getModule();
    if (data.TEST_OBJECT.equals(TestType.PACKAGE.getType())) {
        SourceScope scope = myConfig.getPersistantData().getScope().getSourceScope(myConfig);
        if (scope != null) {
            return scope.getGlobalSearchScope();
        }
    } else if (module != null) {
        return GlobalSearchScope.moduleWithDependenciesScope(module);
    }
    return GlobalSearchScope.projectScope(myConfig.getProject());
}
Also used : SourceScope(com.intellij.execution.testframework.SourceScope) Module(com.intellij.openapi.module.Module) NotNull(org.jetbrains.annotations.NotNull)

Example 54 with NotNull

use of org.jetbrains.annotations.NotNull in project intellij-community by JetBrains.

the class CCPluginConfigurator method getActionGroup.

@NotNull
@Override
public DefaultActionGroup getActionGroup(Project project) {
    final DefaultActionGroup group = new DefaultActionGroup();
    group.add(new StudyPreviousTaskAction());
    group.add(new StudyNextTaskAction());
    group.add(new StudyRefreshTaskFileAction());
    group.add(new CCShowHintAction());
    group.add(new StudyRunAction());
    group.add(new StudyEditInputAction());
    return group;
}
Also used : DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) CCShowHintAction(com.jetbrains.edu.coursecreator.actions.CCShowHintAction) NotNull(org.jetbrains.annotations.NotNull)

Example 55 with NotNull

use of org.jetbrains.annotations.NotNull in project intellij-community by JetBrains.

the class CCSubtaskEditorNotificationProvider method createPopup.

@NotNull
public static ListPopup createPopup(@NotNull Task task, @NotNull Project project) {
    ArrayList<Integer> values = new ArrayList<>();
    for (int i = 0; i <= task.getLastSubtaskIndex(); i++) {
        values.add(i);
    }
    values.add(ADD_SUBTASK_ID);
    return JBPopupFactory.getInstance().createListPopup(new SwitchSubtaskPopupStep(SWITCH_SUBTASK, values, task, project));
}
Also used : RelativePoint(com.intellij.ui.awt.RelativePoint) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

NotNull (org.jetbrains.annotations.NotNull)8141 VirtualFile (com.intellij.openapi.vfs.VirtualFile)888 ArrayList (java.util.ArrayList)809 PsiElement (com.intellij.psi.PsiElement)764 Project (com.intellij.openapi.project.Project)647 File (java.io.File)627 Nullable (org.jetbrains.annotations.Nullable)518 List (java.util.List)400 PsiFile (com.intellij.psi.PsiFile)358 Module (com.intellij.openapi.module.Module)336 IOException (java.io.IOException)325 TextRange (com.intellij.openapi.util.TextRange)260 Document (com.intellij.openapi.editor.Document)173 ContainerUtil (com.intellij.util.containers.ContainerUtil)173 BasePhpElementVisitor (com.kalessil.phpStorm.phpInspectionsEA.openApi.BasePhpElementVisitor)169 ASTNode (com.intellij.lang.ASTNode)167 GlobalSearchScope (com.intellij.psi.search.GlobalSearchScope)167 Map (java.util.Map)156 java.util (java.util)154 IElementType (com.intellij.psi.tree.IElementType)146