本文整理汇总了Java中com.intellij.openapi.util.ActionCallback.DONE属性的典型用法代码示例。如果您正苦于以下问题:Java ActionCallback.DONE属性的具体用法?Java ActionCallback.DONE怎么用?Java ActionCallback.DONE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.openapi.util.ActionCallback
的用法示例。
在下文中一共展示了ActionCallback.DONE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _execute
@Override
protected ActionCallback _execute(PlaybackContext context) {
File file = context.getPathMacro().resolveFile(myDir, context.getBaseDir());
if (!file.exists()) {
context.message("Cannot cd, directory doesn't exist: " + file.getAbsoluteFile(), getLine());
return ActionCallback.REJECTED;
}
try {
context.setBaseDir(file.getCanonicalFile());
}
catch (IOException e) {
context.setBaseDir(file);
}
context.message("{base.dir} set to " + context.getBaseDir().getAbsolutePath(), getLine());
return ActionCallback.DONE;
}
示例2: tweakFrameFullScreen
private static ActionCallback tweakFrameFullScreen(Project project, boolean inPresentation) {
Window window = IdeFrameImpl.getActiveFrame();
if (window instanceof IdeFrameImpl) {
IdeFrameImpl frame = (IdeFrameImpl)window;
PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(project);
if (inPresentation) {
propertiesComponent.setValue("full.screen.before.presentation.mode", String.valueOf(frame.isInFullScreen()));
return frame.toggleFullScreen(true);
}
else {
if (frame.isInFullScreen()) {
final String value = propertiesComponent.getValue("full.screen.before.presentation.mode");
return frame.toggleFullScreen("true".equalsIgnoreCase(value));
}
}
}
return ActionCallback.DONE;
}
示例3: navigateTo
@Override
public ActionCallback navigateTo(@Nullable final Place place, final boolean requestFocus) {
if (place != null) {
selectEditor((String)place.getPath(SELECTED_EDITOR_NAME));
}
return ActionCallback.DONE;
}
示例4: toggleFullScreen
@Override
public ActionCallback toggleFullScreen(boolean state) {
if (myFrame != null) {
myRequestedState = state;
X11UiUtil.toggleFullScreenMode(myFrame);
}
return ActionCallback.DONE;
}
示例5: _execute
public ActionCallback _execute(PlaybackContext context) {
final String s = getText().substring(PREFIX.length()).trim();
try {
final Integer delay = Integer.valueOf(s);
context.getRobot().delay(delay.intValue());
}
catch (NumberFormatException e) {
dumpError(context, "Invalid delay value: " + s);
return ActionCallback.REJECTED;
}
return ActionCallback.DONE;
}
示例6: selectInTree
@NotNull
public static ActionCallback selectInTree(Project project, @Nullable DefaultMutableTreeNode node, boolean requestFocus, @NotNull JTree tree, boolean center) {
if (node == null) return ActionCallback.DONE;
final TreePath treePath = new TreePath(node.getPath());
tree.expandPath(treePath);
if (requestFocus) {
ActionCallback result = new ActionCallback(2);
IdeFocusManager.getInstance(project).requestFocus(tree, true).notifyWhenDone(result);
selectPath(tree, treePath, center).notifyWhenDone(result);
return result;
}
return selectPath(tree, treePath, center);
}
示例7: _execute
public ActionCallback _execute(PlaybackContext context) {
final String one = getText().substring(PREFIX.length());
if (!one.endsWith(POSTFIX)) {
dumpError(context, "Expected " + "]");
return ActionCallback.REJECTED;
}
type(context.getRobot(), getFromShortcut(one.substring(0, one.length() - 1).trim()));
return ActionCallback.DONE;
}
示例8: getReady
@NotNull
@Override
public ActionCallback getReady(@NotNull Object requestor) {
final ActionCallback callback = myViewPanel.getActionCallback();
return callback == null ? ActionCallback.DONE : callback;
}
示例9: requestFocus
@NotNull
@Override
public ActionCallback requestFocus(@Nullable final Content content, final boolean forced) {
return ActionCallback.DONE;
}
示例10: run
@NotNull
public final ActionCallback run() {
boolean shouldLogFocuses = Registry.is("ide.log.focuses");
if (shouldLogFocuses) {
myToFocus.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
if (isExpired()) return;
super.focusGained(e);
LOG.info("Focus gained on " + myToFocus.getClass().getName());
myToFocus.removeFocusListener(this);
}
});
}
if (commandCreationTime > lastProcessedCommandTime) {
if (!(myToFocus.requestFocusInWindow())) {
if (shouldLogFocuses) {
LOG.info("We could not request focus in window on " + myToFocus.getClass().getName());
LOG.info(myAllocation);
}
if (ApplicationManager.getApplication().isActive()) {
myToFocus.requestFocus();
if (shouldLogFocuses) {
LOG.info("Force request focus on " + myToFocus.getClass().getName());
}
}
}
else if (shouldLogFocuses) {
LOG.info("We have successfully requested focus in window on " + myToFocus.getClass().getName());
LOG.info(myAllocation);
}
lastProcessedCommandTime = commandCreationTime;
}
clear();
return ActionCallback.DONE;
}
示例11: requestFocus
@NotNull
public ActionCallback requestFocus(@NotNull Component c, boolean forced) {
c.requestFocus();
return ActionCallback.DONE;
}
示例12: goFurther
public static ActionCallback goFurther(Object object, Place place, final boolean requestFocus) {
if (object instanceof Navigator) {
return ((Navigator)object).navigateTo(place, requestFocus);
}
return ActionCallback.DONE;
}
示例13: onModifiedAdded
public ActionCallback onModifiedAdded(final Configurable colleague) {
myTree.repaint();
return ActionCallback.DONE;
}
示例14: select
public ActionCallback select(final Content content, final boolean requestFocus) {
final TabInfo tabInfo = myContents.getValue(content);
return tabInfo != null ? myTabs.select(tabInfo, requestFocus) : ActionCallback.DONE;
}
示例15: _execute
@Override
protected ActionCallback _execute(PlaybackContext context) {
context.code(myText, getLine());
return ActionCallback.DONE;
}