学无止境  
日历
<2005年10月>
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
统计
  • 随笔 - 9
  • 文章 - 0
  • 评论 - 2
  • 引用 - 0

导航

常用链接

留言簿(2)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜

 
There is an example of creating linked resources in code.
IProject project = workspace.getProject("Project");//assume this exists
IFolder link = project.getFolder("Link");
IPath location = new Path("C:\TEMP\folder");
if (workspace.validateLinkLocation(location).isOK()) {
link.createLink(location, IResource.NONE, null);
} else {
//invalid location, throw an exception or warn user
}

This example will create a linked folder called "Link" that is located at "c:\temp\folder".

link.getFullPath() => "/Project/Link"
link.getLocation() => "c:\temp\folder"
link.getRawLocation() => "temp/folder"
link.isLinked() => "true"
IFile child = link.getFile("abc.txt");
child.create(...);
child.getFullPath() => "/Project/Link/abc.txt"
child.getLocation() => "c:\temp\folder\abc.txt"
child.getRawLocation() => "c:\temp\folder\abc.txt"
child.isLinked() => "false"

posted on 2005-10-17 05:25 lucia 阅读(833) 评论(0)  编辑  收藏 所属分类: Eclipse Plugin

只有注册用户登录后才能发表评论。


网站导航:
 
 
Copyright © lucia Powered by: 博客园 模板提供:沪江博客