Eclipse API에서 외부 프로젝트 또는 작업 공간을 찾는 파일에서 ifile을 얻는 방법
-
05-07-2019 - |
문제
외부 프로젝트 또는 작업 공간을 찾는 파일을 열기 위해 ifile 인터페이스를 만들고 싶습니다.
Ifile 인터페이스를 얻는 방법?
안부, 사이먼
해결책
http://wiki.eclipse.org/faq_how_how_do_i_open_an_editor_an_a_file_outside_the_workspace%3f
당신은 a를 만들 수 있습니다 연결된 리소스:
IPath location = new Path(name);
IFile file = project.getFile(location.lastSegment());
file.createLink(location, IResource.NONE, null);
또는 EFS 인터페이스를 사용할 수 있다면 (Eclipse 3.3 이후) Ifile 대신에 사용할 수 있습니다.
제휴하지 않습니다 StackOverflow