本文整理匯總了Java中com.intellij.openapi.actionSystem.ActionManager.tryToExecute方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionManager.tryToExecute方法的具體用法?Java ActionManager.tryToExecute怎麽用?Java ActionManager.tryToExecute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.openapi.actionSystem.ActionManager
的用法示例。
在下文中一共展示了ActionManager.tryToExecute方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onTemplateFinished
import com.intellij.openapi.actionSystem.ActionManager; //導入方法依賴的package包/類
protected void onTemplateFinished(TemplateManager manager, Editor editor, Template template) {
// format and add ;
final ActionManager actionManager = ActionManagerImpl.getInstance();
final String editorCompleteStatementText = "EditorCompleteStatement";
final AnAction action = actionManager.getAction(editorCompleteStatementText);
actionManager.tryToExecute(action, ActionCommand.getInputEvent(editorCompleteStatementText), null, ActionPlaces.UNKNOWN, true);
}
開發者ID:cesards,項目名稱:HakunaMatataIntelliJPlugin,代碼行數:8,代碼來源:AbstractRichStringBasedPostfixTemplate.java
示例2: swipedLeft
import com.intellij.openapi.actionSystem.ActionManager; //導入方法依賴的package包/類
@Override
public void swipedLeft(SwipeEvent event) {
ActionManager actionManager = ActionManager.getInstance();
AnAction forward = actionManager.getAction("Forward");
if (forward == null) return;
actionManager.tryToExecute(forward, createMouseEventWrapper(myFrame), null, null, false);
}
示例3: swipedRight
import com.intellij.openapi.actionSystem.ActionManager; //導入方法依賴的package包/類
@Override
public void swipedRight(SwipeEvent event) {
ActionManager actionManager = ActionManager.getInstance();
AnAction back = actionManager.getAction("Back");
if (back == null) return;
actionManager.tryToExecute(back, createMouseEventWrapper(myFrame), null, null, false);
}
示例4: actionPerform
import com.intellij.openapi.actionSystem.ActionManager; //導入方法依賴的package包/類
private void actionPerform(String action) {
ActionManager am = ActionManager.getInstance();
am.tryToExecute(am.getAction(action),
ActionCommand.getInputEvent(action), panel1, "", true);
}