import org.eclipse.core.filesystem.IFileStore; //導入方法依賴的package包/類

/**

* Moves the project history from the old project to the new one.

*

* @param oldProject the old project, which does not exist anymore

* @param newProject the new project, which already exists

* @param monitor the progress monitor to use

*/

private void moveHistory(

final IProject oldProject, final IProject newProject, final IProgressMonitor monitor) {

try {

monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_updating_history, 60);

final IFileStore historyStore =

EFS.getLocalFileSystem()

.getStore(RefactoringCorePlugin.getDefault().getStateLocation())

.getChild(NAME_HISTORY_FOLDER);

final String oldName = oldProject.getName();

final String newName = newProject.getName();

final IFileStore oldStore = historyStore.getChild(oldName);

if (oldStore

.fetchInfo(

EFS.NONE,

new SubProgressMonitor(monitor, 10, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL))

.exists()) {

final IFileStore newStore = historyStore.getChild(newName);

if (newStore

.fetchInfo(

EFS.NONE,

new SubProgressMonitor(monitor, 10, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL))

.exists())

newStore.delete(

EFS.NONE,

new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));

oldStore.move(

newStore,

EFS.OVERWRITE,

new SubProgressMonitor(monitor, 20, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));

}

} catch (CoreException exception) {

RefactoringCorePlugin.log(exception);

} finally {

monitor.done();

}

}

java getchild_Java IFileStore.getChild方法代碼示例相关推荐

  1. java servicefactory_Java DirectoryServiceFactory.getDirectoryService方法代碼示例

    本文整理匯總了Java中org.apache.directory.server.core.factory.DirectoryServiceFactory.getDirectoryService方法的典 ...

  2. java getstringarray_Java AnnotationAttributes.getStringArray方法代碼示例

    本文整理匯總了Java中org.springframework.core.annotation.AnnotationAttributes.getStringArray方法的典型用法代碼示例.如果您正苦 ...

  3. java getselecteditem_Java JComboBox.getSelectedItem方法代碼示例

    本文整理匯總了Java中javax.swing.JComboBox.getSelectedItem方法的典型用法代碼示例.如果您正苦於以下問題:Java JComboBox.getSelectedIt ...

  4. java setlocation_Java Point.setLocation方法代碼示例

    本文整理匯總了Java中java.awt.Point.setLocation方法的典型用法代碼示例.如果您正苦於以下問題:Java Point.setLocation方法的具體用法?Java Poin ...

  5. java setpriority_Java TaskEntity.setPriority方法代碼示例

    本文整理匯總了Java中org.activiti.engine.impl.persistence.entity.TaskEntity.setPriority方法的典型用法代碼示例.如果您正苦於以下問題 ...

  6. java importgeopoint_Java GeoPoint.project方法代碼示例

    本文整理匯總了Java中com.nextgis.maplib.datasource.GeoPoint.project方法的典型用法代碼示例.如果您正苦於以下問題:Java GeoPoint.proje ...

  7. java hssffont_Java HSSFFont.setColor方法代碼示例

    本文整理匯總了Java中org.apache.poi.hssf.usermodel.HSSFFont.setColor方法的典型用法代碼示例.如果您正苦於以下問題:Java HSSFFont.setC ...

  8. java disconnect_Java BlockingConnection.disconnect方法代碼示例

    本文整理匯總了Java中org.fusesource.mqtt.client.BlockingConnection.disconnect方法的典型用法代碼示例.如果您正苦於以下問題:Java Bloc ...

  9. java dofinal_Java Mac.doFinal方法代碼示例

    本文整理匯總了Java中javax.crypto.Mac.doFinal方法的典型用法代碼示例.如果您正苦於以下問題:Java Mac.doFinal方法的具體用法?Java Mac.doFinal怎 ...

最新文章

  1. Learn OpenGL (一):打开窗口
  2. 算法分析赛:从数据中挖掘价值,72万奖金,DCIC 2020 大数据赛道来了!
  3. SQL-4查找所有已经分配部门的员工的last_name和first_name(自然连接)
  4. 手写AngularJS脏检查机制
  5. JEECMS自定义标签开发步骤
  6. TextBox中的KeyDown 时间不能响应的问题!
  7. 小米10的Android安全更新,MIUI 12首批更新名单被曝光,小米10系列优先上Android 11...
  8. 异步查询回调函数调用
  9. Python | 不使用库函数将十进制数转换为二进制
  10. 使用Maven编译项目遇到——“maven编码gbk的不可映射字符”解决办法 ——转载...
  11. 服务器怎么操作系统版本,服务器怎么操作系统版本
  12. 数据库课程设计(饭店点餐系统)
  13. linux用户态和内核态堆栈,Linux内核态、用户态简介与IntelCPU特权级别--Ring0-3
  14. 论文笔记:Intriguing properties of neural networks
  15. 二、RISC-V SoC内核注解——译码 代码讲解
  16. C51 Proteus仿真板
  17. Maven配置公司的mavne私服
  18. 【数据分析进阶】DCIC竞赛-task56 订单调度分析
  19. 【负载均衡集群——保姆式教学】
  20. 接口请求时加载loading动画

热门文章

  1. Spring Cloud 是什么
  2. 在Visual Studio 2015中使用Grunt、Bowe
  3. 2016年最值得关注的16个网页设计趋势
  4. .NET技术大系概览
  5. 发明python的人是个天才_BBC纪录片《天才的发明 The Genius of Invention》全4集 英语中英字幕 720P高清纪录片...
  6. a - 数据结构实验之串一:kmp简单应用_数据结构(C语言版)_笔记_3
  7. select设置text的值选中(兼容ios和Android)基于jquery
  8. 改变mysql默认字符集为utf8
  9. 调试中除了在URL上加时间戳外,如何避免js、css被返回304状态?
  10. 去除浏览器输入框等的边框(包括手机浏览器)