Java Code Examples for com.intellij.openapi.actionSystem.ActionPlaces#WELCOME_SCREEN
The following examples show how to use
com.intellij.openapi.actionSystem.ActionPlaces#WELCOME_SCREEN .
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: OpenAndroidModule.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override public void actionPerformed(AnActionEvent e) { final VirtualFile projectFile = findProjectFile(e); if (projectFile == null) { FlutterMessages.showError("Error Opening Android Studio", "Project not found."); return; } final int modifiers = e.getModifiers(); // From ReopenProjectAction. final boolean forceOpenInNewFrame = BitUtil.isSet(modifiers, InputEvent.CTRL_MASK) || BitUtil.isSet(modifiers, InputEvent.SHIFT_MASK) || e.getPlace() == ActionPlaces.WELCOME_SCREEN; VirtualFile sourceFile = e.getData(CommonDataKeys.VIRTUAL_FILE); // Using: //ProjectUtil.openOrImport(projectFile.getPath(), e.getProject(), forceOpenInNewFrame); // presents the user with a really imposing Gradle project import dialog. openOrImportProject(projectFile, e.getProject(), sourceFile, forceOpenInNewFrame); }
Example 2
Source File: OpenAndroidModule.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override public void actionPerformed(AnActionEvent e) { final VirtualFile projectFile = findProjectFile(e); if (projectFile == null) { FlutterMessages.showError("Error Opening Android Studio", "Project not found."); return; } final int modifiers = e.getModifiers(); // From ReopenProjectAction. final boolean forceOpenInNewFrame = BitUtil.isSet(modifiers, InputEvent.CTRL_MASK) || BitUtil.isSet(modifiers, InputEvent.SHIFT_MASK) || e.getPlace() == ActionPlaces.WELCOME_SCREEN; VirtualFile sourceFile = e.getData(CommonDataKeys.VIRTUAL_FILE); // Using: //ProjectUtil.openOrImport(projectFile.getPath(), e.getProject(), forceOpenInNewFrame); // presents the user with a really imposing Gradle project import dialog. openOrImportProject(projectFile, e.getProject(), sourceFile, forceOpenInNewFrame); }
Example 3
Source File: RecentProjectPanel.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull private AnAction performSelectedAction(@Nonnull InputEvent event, AnAction selection) { String actionPlace = UIUtil.uiParents(myList, true).filter(FlatWelcomeFrame.class).isEmpty() ? ActionPlaces.POPUP : ActionPlaces.WELCOME_SCREEN; AnActionEvent actionEvent = AnActionEvent.createFromInputEvent(event, actionPlace, selection.getTemplatePresentation(), DataManager.getInstance().getDataContext(myList), false, false); ActionUtil.performActionDumbAwareWithCallbacks(selection, actionEvent, actionEvent.getDataContext()); return selection; }