当前位置: 首页>>代码示例>>Java>>正文


Java ActionCallback.DONE属性代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:CdCommand.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:TogglePresentationModeAction.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:TabbedModuleEditor.java

示例4: toggleFullScreen

@Override
public ActionCallback toggleFullScreen(boolean state) {
  if (myFrame != null) {
    myRequestedState = state;
    X11UiUtil.toggleFullScreenMode(myFrame);
  }
  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:IdeFrameDecorator.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DelayCommand.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:TreeUtil.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:KeyShortcutCommand.java

示例8: getReady

@NotNull
@Override
public ActionCallback getReady(@NotNull Object requestor) {
  final ActionCallback callback = myViewPanel.getActionCallback();
  return callback == null ? ActionCallback.DONE : callback;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ScopeViewPane.java

示例9: requestFocus

@NotNull
@Override
public ActionCallback requestFocus(@Nullable final Content content, final boolean forced) {
  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ToolWindowHeadlessManagerImpl.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:FocusCommand.java

示例11: requestFocus

@NotNull
public ActionCallback requestFocus(@NotNull Component c, boolean forced) {
  c.requestFocus();
  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PassThroughIdeFocusManager.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:Place.java

示例13: onModifiedAdded

public ActionCallback onModifiedAdded(final Configurable colleague) {
  myTree.repaint();
  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:OptionsTree.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GridCellImpl.java

示例15: _execute

@Override
protected ActionCallback _execute(PlaybackContext context) {
  context.code(myText, getLine());
  return ActionCallback.DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PrintCommand.java


注:本文中的com.intellij.openapi.util.ActionCallback.DONE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。