• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java VcsConfiguration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: runCheckinHandlers

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Override
public void runCheckinHandlers(@NotNull final Runnable finishAction) {
  final VcsConfiguration configuration = VcsConfiguration.getInstance(myProject);
  final Collection<VirtualFile> files = myPanel.getVirtualFiles();

  final Runnable performCheckoutAction = new Runnable() {
    @Override
    public void run() {
      FileDocumentManager.getInstance().saveAllDocuments();
      finishAction.run();
    }
  };

  if (configuration.OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT && !DumbService.isDumb(myProject)) {
    new OptimizeImportsProcessor(myProject, CheckinHandlerUtil.getPsiFiles(myProject, files), COMMAND_NAME, performCheckoutAction).run();
  }  else {
    finishAction.run();
  }

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


示例2: testAdd

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testAdd() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);

  final VirtualFile d1 = createDirInCommand(myWorkingCopyDir, "d1");

  final VirtualFile f11 = createFileInCommand(d1, "f11.txt", "123\n456");
  final VirtualFile f12 = createFileInCommand(d1, "f12.txt", "----");

  // r1, addition without history
  checkin();

  final SvnVcs vcs = SvnVcs.getInstance(myProject);
  vcs.invokeRefreshSvnRoots();
  final CommittedChangesProvider<SvnChangeList,ChangeBrowserSettings> committedChangesProvider = vcs.getCommittedChangesProvider();
  final List<SvnChangeList> changeListList =
    committedChangesProvider.getCommittedChanges(committedChangesProvider.createDefaultSettings(),
                                                 new SvnRepositoryLocation(myRepoUrl), 0);
  checkList(changeListList, 1, new Data[] {new Data(absPath(f11), FileStatus.ADDED, null),
    new Data(absPath(f12), FileStatus.ADDED, null), new Data(absPath(d1), FileStatus.ADDED, null)});
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:SvnCommittedViewTest.java


示例3: testMove

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testMove() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
  changeListManager.ensureUpToDate(false);

  final LocalChangeList list = changeListManager.addChangeList("test", null);
  final LocalChangeList target = changeListManager.addChangeList("target", null);
  changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)});

  myScheme.doTest(new Runnable() {
    @Override
    public void run() {
      changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file)});
      checkFilesAreInList(new VirtualFile[] {file}, target.getName(), changeListManager);
    }
  });

  checkFilesAreInList(new VirtualFile[] {file}, target.getName(), changeListManager);

  changeListManager.ensureUpToDate(false);
  checkFilesAreInList(new VirtualFile[] {file}, target.getName(), changeListManager);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:SvnConcurrentChangeListManagerTest.java


示例4: testMove

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testMove() throws Throwable {
  final LocalChangeList newL = myChangeListManager.addChangeList("newOne", null);
  sleepABit();
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);

  myChangeListManager.setDefaultChangeList(newL);

  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);
  sleepABit();
  checkin();

  renameFileInCommand(file, "b.txt");
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);
  sleepABit();
  ensureAddedToNativeList();

  runAndVerifyStatus("", "--- Changelist 'newOne':", "A + b.txt", "D a.txt");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:SvnNativeListsTest.java


示例5: VcsBackgroundOperationsConfigurationPanel

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
public VcsBackgroundOperationsConfigurationPanel(final Project project) {
  myProject = project;

  if (! myProject.isDefault()) {
    myCacheSettingsPanel.initPanel(project);
    final VcsConfiguration settings = VcsConfiguration.getInstance(myProject);
    myChangedOnServerInterval.setModel(new SpinnerNumberModel(settings.CHANGED_ON_SERVER_INTERVAL, 5, 48 * 10 * 60, 5));

    myTrackChangedOnServer.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        myChangedOnServerInterval.setEnabled(myTrackChangedOnServer.isSelected());
      }
    });

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


示例6: apply

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
public void apply() throws ConfigurationException {

    VcsConfiguration settings = VcsConfiguration.getInstance(myProject);

    settings.PERFORM_COMMIT_IN_BACKGROUND = myCbCommitInBackground.isSelected();
    settings.PERFORM_UPDATE_IN_BACKGROUND = myCbUpdateInBackground.isSelected();
    settings.PERFORM_CHECKOUT_IN_BACKGROUND = myCbCheckoutInBackground.isSelected();
    settings.PERFORM_EDIT_IN_BACKGROUND = myCbEditInBackground.isSelected();
    settings.PERFORM_ADD_REMOVE_IN_BACKGROUND = myCbAddRemoveInBackground.isSelected();
    settings.PERFORM_ROLLBACK_IN_BACKGROUND = myPerformRevertInBackgroundCheckBox.isSelected();

    boolean remoteCacheStateChanged = settings.CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND != myTrackChangedOnServer.isSelected();
    if (! myProject.isDefault()) {
      settings.CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND = myTrackChangedOnServer.isSelected();
      settings.CHANGED_ON_SERVER_INTERVAL = ((Number) myChangedOnServerInterval.getValue()).intValue();

      myCacheSettingsPanel.apply();
    }

    for (VcsShowOptionsSettingImpl setting : myPromptOptions.keySet()) {
      setting.setValue(myPromptOptions.get(setting).isSelected());
    }
    // will check if should + was started -> inside
    RemoteRevisionsCache.getInstance(myProject).updateAutomaticRefreshAlarmState(remoteCacheStateChanged);
  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:VcsBackgroundOperationsConfigurationPanel.java


示例7: reset

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
public void reset() {
  VcsConfiguration settings = VcsConfiguration.getInstance(myProject);
  myCbCommitInBackground.setSelected(settings.PERFORM_COMMIT_IN_BACKGROUND);
  myCbUpdateInBackground.setSelected(settings.PERFORM_UPDATE_IN_BACKGROUND);
  myCbCheckoutInBackground.setSelected(settings.PERFORM_CHECKOUT_IN_BACKGROUND);
  myCbEditInBackground.setSelected(settings.PERFORM_EDIT_IN_BACKGROUND);
  myCbAddRemoveInBackground.setSelected(settings.PERFORM_ADD_REMOVE_IN_BACKGROUND);
  myPerformRevertInBackgroundCheckBox.setSelected(settings.PERFORM_ROLLBACK_IN_BACKGROUND);
  for (VcsShowOptionsSettingImpl setting : myPromptOptions.keySet()) {
    myPromptOptions.get(setting).setSelected(setting.getValue());
  }
  
  if (! myProject.isDefault()) {
    myTrackChangedOnServer.setSelected(settings.CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND);
    myChangedOnServerInterval.setValue(settings.CHANGED_ON_SERVER_INTERVAL);
    myChangedOnServerInterval.setEnabled(myTrackChangedOnServer.isSelected());
    myCacheSettingsPanel.reset();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:VcsBackgroundOperationsConfigurationPanel.java


示例8: VcsUpdateInfoScopeFilterConfigurable

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
VcsUpdateInfoScopeFilterConfigurable(Project project, VcsConfiguration vcsConfiguration) {
  myVcsConfiguration = vcsConfiguration;
  myCheckbox = new JCheckBox(VcsBundle.getString("settings.filter.update.project.info.by.scope"));
  myComboBox = new ComboBox();
  
  myComboBox.setEnabled(myCheckbox.isSelected());
  myCheckbox.addChangeListener(new ChangeListener() {
    @Override
    public void stateChanged(@NotNull ChangeEvent e) {
      myComboBox.setEnabled(myCheckbox.isSelected());
    }
  });

  myNamedScopeHolders = NamedScopesHolder.getAllNamedScopeHolders(project);
  for (NamedScopesHolder holder : myNamedScopeHolders) {
    holder.addScopeListener(this);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:VcsUpdateInfoScopeFilterConfigurable.java


示例9: getBig

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
public static Set<Change> getBig(List<Change> changes) {
  final Set<Change> exclude = new HashSet<Change>();
  for (Change change : changes) {
    ContentRevision beforeRevision = change.getBeforeRevision();
    if (beforeRevision != null) {
      try {
        String content = beforeRevision.getContent();
        if (content == null) {
          final FilePath file = beforeRevision.getFile();
          LOG.info("null content for " + (file.getPath()) + ", is dir: " + (file.isDirectory()));
          continue;
        }
        if (content.length() > VcsConfiguration.ourMaximumFileForBaseRevisionSize) {
          exclude.add(change);
        }
      }
      catch (VcsException e) {
        LOG.info(e);
      }
    }
  }
  return exclude;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:SelectFilesToAddTextsToPatchPanel.java


示例10: getHistory

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
private static List<HgFileRevision> getHistory(FilePath filePath, VirtualFile vcsRoot, Project project) {
  VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(project);
  int limit = vcsConfiguration.LIMIT_HISTORY ? vcsConfiguration.MAXIMUM_HISTORY_ROWS : -1;

  final HgLogCommand logCommand = new HgLogCommand(project);
  logCommand
    .setFollowCopies(!filePath.isDirectory());
  logCommand.setIncludeRemoved(true);
  try {
    return logCommand.execute(new HgFile(vcsRoot, filePath), limit, false);
  }
  catch (HgCommandException e) {
    new HgCommandResultNotifier(project).notifyError(null, HgVcsMessages.message("hg4idea.error.log.command.execution"), e.getMessage());
    return Collections.emptyList();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:HgHistoryProvider.java


示例11: testJustDeletedAndThenAddedFileShouldNotBePromptedForRemoval

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
/**
 * A file is also considered to be newly added, if it has a history, but the last action was removal of that file.
 * 1. Create a file, add it to the repository and commit.
 * 2. Delete the file and commit it.
 * 3. Create the file again and add it to the repository.
 * 4. Delete the file.
 * 5. File shouldn't be prompted for removal from repository.
 */
@Test
public void testJustDeletedAndThenAddedFileShouldNotBePromptedForRemoval() throws Exception {
  VirtualFile vf = createFileInCommand("a.txt", null);
  myChangeListManager.commitFiles(vf);
  deleteFileInCommand(vf);
  myChangeListManager.commitFiles(vf);

  showConfirmation(VcsConfiguration.StandardConfirmation.REMOVE);
  vf = createFileInCommand("a.txt", null);
  final HgMockVcsHelper helper = registerMockVcsHelper();
  helper.addListener(new VcsHelperListener() {
    @Override
    public void dialogInvoked() {
      fail("No dialog should be invoked, because newly added file should be silently removed from the repository");
    }
  });
  VcsTestUtil.deleteFileInCommand(myProject, vf);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:HgDeleteTest.java


示例12: getCvsHandler

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
protected CvsHandler getCvsHandler(CvsContext context) {
  if (myModifiedFiles != null) {
    if (!myModifiedFiles.isEmpty()) {
      if (!new ReplaceFileConfirmationDialog(context.getProject(), CvsBundle.getCheckoutOperationName()).requestConfirmation(myModifiedFiles)) {
        return CvsHandler.NULL;
      }

    }
  }

  myModifiedFiles = null;

  Project project = context.getProject();
  FilePath[] filesArray = context.getSelectedFilePaths();
  List<FilePath> files = Arrays.asList(filesArray);
  if (CvsVcs2.getInstance(project).getCheckoutOptions().getValue() || OptionsDialog.shiftIsPressed(context.getModifiers())) {
    CheckoutFileDialog checkoutFileDialog = new CheckoutFileDialog(project, files);
    if (!checkoutFileDialog.showAndGet()) {
      return CvsHandler.NULL;
    }
  }

  return CommandCvsHandler.createCheckoutFileHandler(filesArray, CvsConfiguration.getInstance(project),
                                                     VcsConfiguration.getInstance(project).getCheckoutOption());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:CheckoutFileAction.java


示例13: testAdd

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testAdd() throws Throwable {
  final LocalChangeList newL = myChangeListManager.addChangeList("newOne", null);
  sleepABit();
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);

  myChangeListManager.setDefaultChangeList(newL);

  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);
  sleepABit();

  ensureAddedToNativeList();

  runAndVerifyStatus("","--- Changelist 'newOne':", "A a.txt");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:SvnNativeListsTest.java


示例14: testDoubleMoveBack

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testDoubleMoveBack() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
  changeListManager.ensureUpToDate(false);

  final LocalChangeList list = changeListManager.addChangeList("test", null);
  final LocalChangeList target = changeListManager.addChangeList("target", null);
  changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)});

  myScheme.doTest(new Runnable() {
    @Override
    public void run() {
      changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file)});
      checkFilesAreInList(new VirtualFile[] {file}, target.getName(), changeListManager);
      changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)});
      checkFilesAreInList(new VirtualFile[] {file}, list.getName(), changeListManager);
    }
  });

  checkFilesAreInList(new VirtualFile[] {file}, list.getName(), changeListManager);

  changeListManager.ensureUpToDate(false);
  checkFilesAreInList(new VirtualFile[] {file}, list.getName(), changeListManager);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SvnConcurrentChangeListManagerTest.java


示例15: testAddPlusMove

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testAddPlusMove() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
  changeListManager.ensureUpToDate(false);

  final LocalChangeList list = changeListManager.addChangeList("test", null);
  changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)});

  final String targetName = "target";

  myScheme.doTest(new Runnable() {
    @Override
    public void run() {
      final LocalChangeList target = changeListManager.addChangeList(targetName, null);
      changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file)});
      checkFilesAreInList(new VirtualFile[] {file}, targetName, changeListManager);
    }
  });

  checkFilesAreInList(new VirtualFile[] {file}, targetName, changeListManager);

  changeListManager.ensureUpToDate(false);
  checkFilesAreInList(new VirtualFile[] {file}, targetName, changeListManager);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SvnConcurrentChangeListManagerTest.java


示例16: testEdit

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testEdit() throws Throwable {
  final LocalChangeList newL = myChangeListManager.addChangeList("newOne", null);
  sleepABit();
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);

  myChangeListManager.setDefaultChangeList(newL);

  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);
  sleepABit();
  checkin();
  VcsTestUtil.editFileInCommand(myProject, file, "111");
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);
  sleepABit();
  ensureAddedToNativeList();

  runAndVerifyStatus("", "--- Changelist 'newOne':", "M a.txt");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:SvnNativeListsTest.java


示例17: testDeleted

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testDeleted() throws Throwable {
  final LocalChangeList newL = myChangeListManager.addChangeList("newOne", null);
  sleepABit();
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);

  myChangeListManager.setDefaultChangeList(newL);

  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  enableSilentOperation(VcsConfiguration.StandardConfirmation.REMOVE);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);
  sleepABit();
  checkin();
  deleteFileInCommand(file);
  myDirtyScopeManager.markEverythingDirty();
  myChangeListManager.ensureUpToDate(false);
  sleepABit();
  ensureAddedToNativeList();

  runAndVerifyStatus("","--- Changelist 'newOne':", "D a.txt");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:SvnNativeListsTest.java


示例18: testUndoMoveToUnversioned

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testUndoMoveToUnversioned() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand(myWorkingCopyDir, "a.txt", "A");
  final VirtualFile child = moveToNewPackage(file, "child");
  verifySorted(runSvn("status"), "A child", "A child" + File.separatorChar + "a.txt");
  checkin();
  disableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile unversioned = createDirInCommand(myWorkingCopyDir, "unversioned");
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  verifySorted(runSvn("status"), "? unversioned");

  moveFileInCommand(child, unversioned);
  verifySorted(runSvn("status"), "? unversioned", "D child", "D child" + File.separator + "a.txt");

  undo();
  verifySorted(runSvn("status"), "? unversioned");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:SvnRenameTest.java


示例19: testUndoMoveToUnversionedCommitted

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testUndoMoveToUnversionedCommitted() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand(myWorkingCopyDir, "a.txt", "A");
  final VirtualFile child = moveToNewPackage(file, "child");
  verifySorted(runSvn("status"), "A child", "A child" + File.separatorChar + "a.txt");
  checkin();
  disableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile unversioned = createDirInCommand(myWorkingCopyDir, "unversioned");
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  verifySorted(runSvn("status"), "? unversioned");

  moveFileInCommand(child, unversioned);
  verifySorted(runSvn("status"), "? unversioned", "D child", "D child" + File.separator + "a.txt");
  checkin();

  undo();
  verifySorted(runSvn("status"), "? child", "? unversioned");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:SvnRenameTest.java


示例20: testRenameList

import com.intellij.openapi.vcs.VcsConfiguration; //导入依赖的package包/类
@Test
public void testRenameList() throws Exception {
  enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
  final VirtualFile file = createFileInCommand("a.txt", "old content");
  final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
  changeListManager.ensureUpToDate(false);

  final LocalChangeList list = changeListManager.addChangeList("test", null);
  changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)});

  final String newName = "renamed";

  myScheme.doTest(new Runnable() {
    @Override
    public void run() {
      changeListManager.editName(list.getName(), newName);
      checkFilesAreInList(new VirtualFile[] {file}, newName, changeListManager);
    }
  });

  checkFilesAreInList(new VirtualFile[] {file}, newName, changeListManager);

  changeListManager.ensureUpToDate(false);
  checkFilesAreInList(new VirtualFile[] {file}, newName, changeListManager);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:SvnConcurrentChangeListManagerTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SpanId类代码示例发布时间:2022-05-22
下一篇:
Java QualityQueryParser类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap