本文整理汇总了Java中com.intellij.openapi.actionSystem.ex.ActionManagerEx类的典型用法代码示例。如果您正苦于以下问题:Java ActionManagerEx类的具体用法?Java ActionManagerEx怎么用?Java ActionManagerEx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionManagerEx类属于com.intellij.openapi.actionSystem.ex包,在下文中一共展示了ActionManagerEx类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: processKeyTyped
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private boolean processKeyTyped(char c) {
// [vova] This is patch for Mac OS X. Under Mac "input methods"
// is handled before our EventQueue consume upcoming KeyEvents.
IdeEventQueue queue = IdeEventQueue.getInstance();
if (queue.shouldNotTypeInEditor() || ProgressManager.getInstance().hasModalProgressIndicator()) {
return false;
}
FileDocumentManager manager = FileDocumentManager.getInstance();
final VirtualFile file = manager.getFile(myDocument);
if (file != null && !file.isValid()) {
return false;
}
ActionManagerEx actionManager = ActionManagerEx.getInstanceEx();
DataContext dataContext = getDataContext();
actionManager.fireBeforeEditorTyping(c, dataContext);
MacUIUtil.hideCursor();
EditorActionManager.getInstance().getTypedAction().actionPerformed(this, c, dataContext);
return true;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:bigFile.java
示例2: _performEditorAction
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private boolean _performEditorAction(@NotNull String actionId) {
final DataContext dataContext = getEditorDataContext();
final ActionManagerEx managerEx = ActionManagerEx.getInstanceEx();
final AnAction action = managerEx.getAction(actionId);
final AnActionEvent event = new AnActionEvent(null, dataContext, ActionPlaces.UNKNOWN, new Presentation(), managerEx, 0);
return WriteCommandAction.runWriteCommandAction(getProject(), new Computable<Boolean>() {
@Override
public Boolean compute() {
action.update(event);
if (!event.getPresentation().isEnabled()) {
return false;
}
managerEx.fireBeforeActionPerformed(action, dataContext, event);
action.actionPerformed(event);
managerEx.fireAfterActionPerformed(action, dataContext, event);
return true;
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:CodeInsightTestFixtureImpl.java
示例3: run
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private void run(KeyEvent event) {
myIsRunningAction = true;
try {
ActionManagerEx actionManager = ActionManagerEx.getInstanceEx();
AnAction action = actionManager.getAction(myActionId);
DataContext context = DataManager.getInstance().getDataContext(IdeFocusManager.findInstance().getFocusOwner());
AnActionEvent anActionEvent = AnActionEvent.createFromAnAction(action, event, ActionPlaces.MAIN_MENU, context);
actionManager.fireBeforeActionPerformed(action, anActionEvent.getDataContext(), anActionEvent);
action.actionPerformed(anActionEvent);
actionManager.fireAfterActionPerformed(action, anActionEvent.getDataContext(), anActionEvent);
}
finally {
myIsRunningAction = false;
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ModifierKeyDoubleClickHandler.java
示例4: createQuickListsGroup
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private static Group createQuickListsGroup(final Condition<AnAction> filtered, final String filter, final boolean forceFiltering, final QuickList[] quickLists) {
Arrays.sort(quickLists, new Comparator<QuickList>() {
public int compare(QuickList l1, QuickList l2) {
return l1.getActionId().compareTo(l2.getActionId());
}
});
Group group = new Group(KeyMapBundle.message("quick.lists.group.title"), null, null);
for (QuickList quickList : quickLists) {
if (filtered != null && filtered.value(ActionManagerEx.getInstanceEx().getAction(quickList.getActionId()))) {
group.addQuickList(quickList);
} else if (SearchUtil.isComponentHighlighted(quickList.getName(), filter, forceFiltering, null)) {
group.addQuickList(quickList);
} else if (filtered == null && StringUtil.isEmpty(filter)) {
group.addQuickList(quickList);
}
}
return group;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ActionsTreeUtil.java
示例5: performAction
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private void performAction(MouseEvent e) {
AnActionEvent event = AnActionEvent.createFromInputEvent(e, myPlace, myPresentation, getDataContext());
if (!ActionUtil.lastUpdateAndCheckDumb(myAction, event, false)) {
return;
}
if (isButtonEnabled()) {
final ActionManagerEx manager = ActionManagerEx.getInstanceEx();
final DataContext dataContext = event.getDataContext();
manager.fireBeforeActionPerformed(myAction, dataContext, event);
Component component = PlatformDataKeys.CONTEXT_COMPONENT.getData(dataContext);
if (component != null && !component.isShowing()) {
return;
}
actionPerformed(event);
manager.queueActionPerformedEvent(myAction, dataContext, event);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ActionButton.java
示例6: ButtonToolbarImpl
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
public ButtonToolbarImpl(final String place,
@NotNull ActionGroup actionGroup,
DataManager dataManager,
ActionManagerEx actionManager) {
super(new GridBagLayout());
myPlace = place;
myPresentationFactory = new PresentationFactory();
myDataManager = dataManager;
initButtons(actionGroup);
updateActions();
//
actionManager.addTimerListener(500, new WeakTimerListener(actionManager, new MyTimerListener()));
enableEvents(MouseEvent.MOUSE_MOTION_EVENT_MASK | MouseEvent.MOUSE_EVENT_MASK);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ButtonToolbarImpl.java
示例7: processKeyTyped
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private boolean processKeyTyped(char c) {
// [vova] This is patch for Mac OS X. Under Mac "input methods"
// is handled before our EventQueue consume upcoming KeyEvents.
IdeEventQueue queue = IdeEventQueue.getInstance();
if (queue.shouldNotTypeInEditor() || ProgressManager.getInstance().hasModalProgressIndicator()) {
return false;
}
FileDocumentManager manager = FileDocumentManager.getInstance();
final VirtualFile file = manager.getFile(myDocument);
if (file != null && !file.isValid()) {
return false;
}
ActionManagerEx actionManager = ActionManagerEx.getInstanceEx();
DataContext dataContext = getDataContext();
myImmediatePainter.paintCharacter(myEditorComponent.getGraphics(), c);
actionManager.fireBeforeEditorTyping(c, dataContext);
MacUIUtil.hideCursor();
EditorActionManager.getInstance().getTypedAction().actionPerformed(this, c, dataContext);
return true;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:EditorImpl.java
示例8: showRerunNotification
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
public static void showRerunNotification(@Nullable RunContentDescriptor contentToReuse,
@NotNull final ExecutionConsole executionConsole) {
if (contentToReuse == null) {
return;
}
String lastActionId = ActionManagerEx.getInstanceEx().getPrevPreformedActionId();
boolean showNotification = !RerunTestsAction.ID.equals(lastActionId);
if (showNotification && !PropertiesComponent.getInstance().isTrueValue(KEY)) {
UiNotifyConnector.doWhenFirstShown(executionConsole.getComponent(), new Runnable() {
@Override
public void run() {
doShow(executionConsole);
}
});
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:RerunTestsNotification.java
示例9: setUp
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
@Before
public void setUp() {
MockApplication application = new MyMockApplicationEx(parent);
ActionManagerEx manager = Mockito.mock(ActionManagerEx.class);
ActionToolbar actionToolbar = Mockito.mock(ActionToolbar.class);
Mockito.when(actionToolbar.getComponent()).thenReturn(new JComponent() {});
Mockito.when(
manager.createActionToolbar(
Mockito.anyString(), Mockito.any(ActionGroup.class), Mockito.anyBoolean()))
.thenReturn(actionToolbar);
Mockito.when(
manager.createActionToolbar(
Mockito.anyString(),
Mockito.any(ActionGroup.class),
Mockito.anyBoolean(),
Mockito.anyBoolean()))
.thenReturn(actionToolbar);
application.addComponent(ActionManager.class, manager);
application.registerService(UISettings.class);
ApplicationManager.setApplication(application, parent);
XDebugSession session = Mockito.mock(XDebugSession.class);
Mockito.when(handler.getProcess()).thenReturn(mockProcess);
Mockito.when(mockProcess.getXDebugSession()).thenReturn(session);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:26,代码来源:CloudDebugHistoricalSnapshotsTest.java
示例10: _performEditorAction
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private boolean _performEditorAction(String actionId) {
final DataContext dataContext = getEditorDataContext();
ActionManagerEx managerEx = ActionManagerEx.getInstanceEx();
AnAction action = managerEx.getAction(actionId);
AnActionEvent event = new AnActionEvent(null, dataContext, ActionPlaces.UNKNOWN, new Presentation(), managerEx, 0);
action.update(event);
if (!event.getPresentation().isEnabled()) {
return false;
}
managerEx.fireBeforeActionPerformed(action, dataContext, event);
action.actionPerformed(event);
managerEx.fireAfterActionPerformed(action, dataContext, event);
return true;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:CodeInsightTestFixtureImpl.java
示例11: actionPerformed
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
public void actionPerformed(final ActionEvent e) {
AnAction action =
myAlternativeAction != null && (e.getModifiers() & InputEvent.ALT_MASK) == InputEvent.ALT_MASK ? myAlternativeAction : myAction;
final DataContext dataContext = DataManager.getInstance().getDataContext(this);
final ActionManagerEx actionManager = ActionManagerEx.getInstanceEx();
InputEvent inputEvent = e.getSource() instanceof InputEvent ? (InputEvent) e.getSource() : null;
final AnActionEvent event =
new AnActionEvent(inputEvent, dataContext, ActionPlaces.UNKNOWN, action.getTemplatePresentation(),
ActionManager.getInstance(),
0);
actionManager.fireBeforeActionPerformed(action, dataContext, event);
final Component component = PlatformDataKeys.CONTEXT_COMPONENT.getData(dataContext);
if (component != null && !component.isShowing()) {
return;
}
action.actionPerformed(event);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:ToolWindowHeader.java
示例12: createQuickListsGroup
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private static Group createQuickListsGroup(final Condition<AnAction> filtered, final String filter, final boolean forceFiltering, final QuickList[] quickLists) {
Arrays.sort(quickLists, new Comparator<QuickList>() {
public int compare(QuickList l1, QuickList l2) {
return l1.getActionId().compareTo(l2.getActionId());
}
});
Group group = new Group(KeyMapBundle.message("quick.lists.group.title"), null, null);
for (QuickList quickList : quickLists) {
if (filtered != null && filtered.value(ActionManagerEx.getInstanceEx().getAction(quickList.getActionId()))) {
group.addQuickList(quickList);
} else if (SearchUtil.isComponentHighlighted(quickList.getDisplayName(), filter, forceFiltering, null)) {
group.addQuickList(quickList);
} else if (filtered == null && StringUtil.isEmpty(filter)) {
group.addQuickList(quickList);
}
}
return group;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:ActionsTreeUtil.java
示例13: performAction
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private void performAction(MouseEvent e) {
AnActionEvent event = new AnActionEvent(
e, getDataContext(),
myPlace,
myPresentation,
ActionManager.getInstance(),
e.getModifiers()
);
if (!ActionUtil.lastUpdateAndCheckDumb(myAction, event, false)) {
return;
}
if (isButtonEnabled()) {
final ActionManagerEx manager = ActionManagerEx.getInstanceEx();
final DataContext dataContext = event.getDataContext();
manager.fireBeforeActionPerformed(myAction, dataContext, event);
Component component = PlatformDataKeys.CONTEXT_COMPONENT.getData(dataContext);
if (component != null && !component.isShowing()) {
return;
}
actionPerformed(event);
manager.queueActionPerformedEvent(myAction, dataContext, event);
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:ActionButton.java
示例14: ButtonToolbarImpl
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
public ButtonToolbarImpl(final String place,
final ActionGroup actionGroup,
DataManager dataManager,
ActionManagerEx actionManager) {
super(new GridBagLayout());
myPlace = place;
myPresentationFactory = new PresentationFactory();
myDataManager = dataManager;
initButtons(actionGroup);
updateActions();
//
actionManager.addTimerListener(500, new WeakTimerListener(actionManager, new MyTimerListener()));
enableEvents(MouseEvent.MOUSE_MOTION_EVENT_MASK | MouseEvent.MOUSE_EVENT_MASK);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:ButtonToolbarImpl.java
示例15: processKeyTyped
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private boolean processKeyTyped(char c) {
// [vova] This is patch for Mac OS X. Under Mac "input methods"
// is handled before our EventQueue consume upcoming KeyEvents.
IdeEventQueue queue = IdeEventQueue.getInstance();
if (queue.shouldNotTypeInEditor() || ProgressManager.getInstance().hasModalProgressIndicator()) {
return false;
}
FileDocumentManager manager = FileDocumentManager.getInstance();
if (manager != null) {
final VirtualFile file = manager.getFile(myDocument);
if (file != null && !file.isValid()) {
return false;
}
}
ActionManagerEx actionManager = ActionManagerEx.getInstanceEx();
DataContext dataContext = getDataContext();
actionManager.fireBeforeEditorTyping(c, dataContext);
MacUIUtil.hideCursor();
EditorActionManager.getInstance().getTypedAction().actionPerformed(this, c, dataContext);
return true;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:EditorImpl.java
示例16: IdeMenuBar
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
public IdeMenuBar(ActionManagerEx actionManager, DataManager dataManager) {
myActionManager = actionManager;
myTimerListener = new MyTimerListener();
myVisibleActions = new ArrayList<AnAction>();
myNewVisibleActions = new ArrayList<AnAction>();
myPresentationFactory = new MenuItemPresentationFactory();
myDataManager = dataManager;
if (WindowManagerEx.getInstanceEx().isFloatingMenuBarSupported()) {
myAnimator = new MyAnimator();
myActivationWatcher = new Timer(100, new MyActionListener());
myClockPanel = new ClockPanel();
myButton = new MyExitFullScreenButton();
add(myClockPanel);
add(myButton);
addPropertyChangeListener(WindowManagerEx.FULL_SCREEN, evt -> updateState());
addMouseListener(new MyMouseListener());
}
else {
myAnimator = null;
myActivationWatcher = null;
myClockPanel = null;
myButton = null;
}
}
开发者ID:consulo,项目名称:consulo,代码行数:26,代码来源:IdeMenuBar.java
示例17: performAction
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private void performAction(MouseEvent e) {
AnActionEvent event = AnActionEvent.createFromInputEvent(e, myPlace, myPresentation, getDataContext(), false, true);
if (!ActionUtil.lastUpdateAndCheckDumb(myAction, event, false)) {
return;
}
if (isButtonEnabled()) {
final ActionManagerEx manager = ActionManagerEx.getInstanceEx();
final DataContext dataContext = event.getDataContext();
manager.fireBeforeActionPerformed(myAction, dataContext, event);
Component component = dataContext.getData(PlatformDataKeys.CONTEXT_COMPONENT);
if (component != null && !component.isShowing()) {
return;
}
actionPerformed(event);
manager.queueActionPerformedEvent(myAction, dataContext, event);
if (event.getInputEvent() instanceof MouseEvent) {
//FIXME [VISTALL] we need that ?ToolbarClicksCollector.record(myAction, myPlace);
}
}
}
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:ActionButton.java
示例18: createToolbar
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
private ActionToolbar createToolbar(final ActionGroup group) {
final ActionToolbarImpl actionToolbar =
new ActionToolbarImpl(ActionPlaces.CONTEXT_TOOLBAR, group, true, DataManager.getInstance(), ActionManagerEx.getInstanceEx(),
KeymapManagerEx.getInstanceEx()) {
@Override
protected ActionButton createToolbarButton(final AnAction action,
boolean minimalMode,
boolean decorateButtons,
final String place,
final Presentation presentation,
final Dimension minimumSize) {
final ActionButton result = new ActionButton(action, presentation, place, minimumSize);
result.setMinimalMode(minimalMode);
result.setDecorateButtons(decorateButtons);
return result;
}
};
actionToolbar.setTargetComponent(myEditor.getContentComponent());
return actionToolbar;
}
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:ContextMenuImpl.java
示例19: actionPerformed
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public void actionPerformed(final ActionEvent e) {
AnAction action =
myAlternativeAction != null && BitUtil.isSet(e.getModifiers(), InputEvent.ALT_MASK) ? myAlternativeAction : myAction;
final DataContext dataContext = DataManager.getInstance().getDataContext(this);
final ActionManagerEx actionManager = ActionManagerEx.getInstanceEx();
InputEvent inputEvent = e.getSource() instanceof InputEvent ? (InputEvent) e.getSource() : null;
final AnActionEvent event =
new AnActionEvent(inputEvent, dataContext, ActionPlaces.TOOLWINDOW_TITLE, action.getTemplatePresentation(),
ActionManager.getInstance(),
0);
actionManager.fireBeforeActionPerformed(action, dataContext, event);
final Component component = dataContext.getData(PlatformDataKeys.CONTEXT_COMPONENT);
if (component != null && !component.isShowing()) {
return;
}
action.actionPerformed(event);
}
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:DesktopToolWindowHeader.java
示例20: beforeActionPerformed
import com.intellij.openapi.actionSystem.ex.ActionManagerEx; //导入依赖的package包/类
@Override
public void beforeActionPerformed(AnAction action, DataContext dataContext, AnActionEvent event) {
if (action instanceof ActionToIgnore) return;
AnAction escapeAction = ActionManagerEx.getInstanceEx().getAction(IdeActions.ACTION_EDITOR_ESCAPE);
if (action == escapeAction) return;
hideHints(HIDE_BY_ANY_KEY, false, false);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:HintManagerImpl.java
注:本文中的com.intellij.openapi.actionSystem.ex.ActionManagerEx类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论