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


Java ActionCallback.doWhenDone方法代码示例

本文整理汇总了Java中com.intellij.openapi.util.ActionCallback.doWhenDone方法的典型用法代码示例。如果您正苦于以下问题:Java ActionCallback.doWhenDone方法的具体用法?Java ActionCallback.doWhenDone怎么用?Java ActionCallback.doWhenDone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.util.ActionCallback的用法示例。


在下文中一共展示了ActionCallback.doWhenDone方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: refilterNow

import com.intellij.openapi.util.ActionCallback; //导入方法依赖的package包/类
@Override
protected ActionCallback refilterNow(Object preferredSelection, boolean adjustSelection) {
  final List<Object> toRestore = new ArrayList<Object>();
  if (myFilter.myContext.isHoldingFilter() && !myWasHoldingFilter && myToExpandOnResetFilter == null) {
    myToExpandOnResetFilter = myBuilder.getUi().getExpandedElements();
  }
  else if (!myFilter.myContext.isHoldingFilter() && myWasHoldingFilter && myToExpandOnResetFilter != null) {
    toRestore.addAll(myToExpandOnResetFilter);
    myToExpandOnResetFilter = null;
  }

  myWasHoldingFilter = myFilter.myContext.isHoldingFilter();

  ActionCallback result = super.refilterNow(preferredSelection, adjustSelection);
  myRefilteringNow = true;
  return result.doWhenDone(new Runnable() {
    public void run() {
      myRefilteringNow = false;
      if (!myFilter.myContext.isHoldingFilter() && getSelectedElements().isEmpty()) {
        restoreExpandedState(toRestore);
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:SettingsTreeView.java

示例2: refilterNow

import com.intellij.openapi.util.ActionCallback; //导入方法依赖的package包/类
@Override
protected ActionCallback refilterNow(Object preferredSelection, boolean adjustSelection) {
  final List<Object> toRestore = new ArrayList<Object>();
  if (myFilter.myContext.isHoldingFilter() && !myWasHoldingFilter && myToExpandOnResetFilter == null) {
    myToExpandOnResetFilter = myBuilder.getUi().getExpandedElements();
  } else if (!myFilter.myContext.isHoldingFilter() && myWasHoldingFilter && myToExpandOnResetFilter != null) {
    toRestore.addAll(myToExpandOnResetFilter);
    myToExpandOnResetFilter = null;
  }

  myWasHoldingFilter = myFilter.myContext.isHoldingFilter();

  ActionCallback result = super.refilterNow(preferredSelection, adjustSelection);
  myRefilteringNow = true;
  return result.doWhenDone(new Runnable() {
    public void run() {
      myRefilteringNow = false;
      if (!myFilter.myContext.isHoldingFilter() && getSelectedElements().isEmpty()) {
        restoreExpandedState(toRestore);
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:OptionsTree.java

示例3: restore

import com.intellij.openapi.util.ActionCallback; //导入方法依赖的package包/类
private ActionCallback restore(final int index) {
  final ActionCallback result = new ActionCallback();
  final Restore action = myActions.get(index);
  final ActionCallback actionCalback = action.restoreInGrid();
  actionCalback.doWhenDone(new Runnable() {
    @Override
    public void run() {
      if (index < myActions.size() - 1) {
        restore(index + 1).notifyWhenDone(result);
      } else {
        result.setDone();
      }
    }
  });

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:CellTransform.java

示例4: selectOrderEntry

import com.intellij.openapi.util.ActionCallback; //导入方法依赖的package包/类
public ActionCallback selectOrderEntry(@NotNull final Module module, @Nullable final OrderEntry orderEntry) {
  for (final ModuleStructureExtension extension : ModuleStructureExtension.EP_NAME.getExtensions()) {
    final ActionCallback callback = extension.selectOrderEntry(module, orderEntry);
    if (callback != null) {
      return callback;
    }
  }

  Place p = new Place();
  p.putPath(ProjectStructureConfigurable.CATEGORY, this);
  Runnable r = null;

  final MasterDetailsComponent.MyNode node = findModuleNode(module);
  if (node != null) {
    p.putPath(TREE_OBJECT, module);
    p.putPath(ModuleEditor.SELECTED_EDITOR_NAME, ClasspathEditor.NAME);
    r = new Runnable() {
      @Override
      public void run() {
        if (orderEntry != null) {
          ModuleEditor moduleEditor = ((ModuleConfigurable)node.getConfigurable()).getModuleEditor();
          ModuleConfigurationEditor editor = moduleEditor.getEditor(ClasspathEditor.NAME);
          if (editor instanceof ClasspathEditor) {
            ((ClasspathEditor)editor).selectOrderEntry(orderEntry);
          }
        }
      }
    };
  }
  final ActionCallback result = ProjectStructureConfigurable.getInstance(myProject).navigateTo(p, true);
  return r != null ? result.doWhenDone(r) : result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:ModuleStructureConfigurable.java

示例5: restoreInGrid

import com.intellij.openapi.util.ActionCallback; //导入方法依赖的package包/类
@Override
public ActionCallback restoreInGrid() {
  myRestoringNow = true;
  if (myActions.size() == 0) return ActionCallback.DONE;
  final ActionCallback topCallback = restore(0);
  return topCallback.doWhenDone(new Runnable() {
    @Override
    public void run() {
      myActions.clear();
      myRestoringNow = false;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:CellTransform.java


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