• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ModelDiff类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.intellij.ide.util.gotoByName.ModelDiff的典型用法代码示例。如果您正苦于以下问题:Java ModelDiff类的具体用法?Java ModelDiff怎么用?Java ModelDiff使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ModelDiff类属于com.intellij.ide.util.gotoByName包,在下文中一共展示了ModelDiff类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: updateModel

点赞 2

import com.intellij.ide.util.gotoByName.ModelDiff; //导入依赖的package包/类
private static int updateModel(@NotNull MyModel tableModel, @NotNull List<UsageNode> listOld, @NotNull List<UsageNode> listNew, int oldSelection) {
  UsageNode[] oa = listOld.toArray(new UsageNode[listOld.size()]);
  UsageNode[] na = listNew.toArray(new UsageNode[listNew.size()]);
  List<ModelDiff.Cmd> cmds = ModelDiff.createDiffCmds(tableModel, oa, na);
  int selection = oldSelection;
  if (cmds != null) {
    for (ModelDiff.Cmd cmd : cmds) {
      selection = cmd.translateSelection(selection);
      cmd.apply();
    }
  }
  return selection;
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:14,
代码来源:ShowUsagesAction.java

示例2: updateModel

点赞 2

import com.intellij.ide.util.gotoByName.ModelDiff; //导入依赖的package包/类
private static int updateModel(@NotNull MyModel tableModel, @NotNull List<UsageNode> listOld,
    @NotNull List<UsageNode> listNew, int oldSelection) {
  UsageNode[] oa = listOld.toArray(new UsageNode[listOld.size()]);
  UsageNode[] na = listNew.toArray(new UsageNode[listNew.size()]);
  List<ModelDiff.Cmd> cmds = ModelDiff.createDiffCmds(tableModel, oa, na);
  int selection = oldSelection;
  if (cmds != null) {
    for (ModelDiff.Cmd cmd : cmds) {
      selection = cmd.translateSelection(selection);
      cmd.apply();
    }
  }
  return selection;
}
 

开发者ID:square,
项目名称:dagger-intellij-plugin,
代码行数:15,
代码来源:ShowUsagesAction.java

示例3: updateModel

点赞 2

import com.intellij.ide.util.gotoByName.ModelDiff; //导入依赖的package包/类
private static int updateModel(@Nonnull MyModel tableModel, @Nonnull List<UsageNode> listOld, @Nonnull List<UsageNode> listNew, int oldSelection) {
  UsageNode[] oa = listOld.toArray(new UsageNode[listOld.size()]);
  UsageNode[] na = listNew.toArray(new UsageNode[listNew.size()]);
  List<ModelDiff.Cmd> cmds = ModelDiff.createDiffCmds(tableModel, oa, na);
  int selection = oldSelection;
  if (cmds != null) {
    for (ModelDiff.Cmd cmd : cmds) {
      selection = cmd.translateSelection(selection);
      cmd.apply();
    }
  }
  return selection;
}
 

开发者ID:consulo,
项目名称:consulo,
代码行数:14,
代码来源:ShowUsagesAction.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)