Eclipse API에서 외부 프로젝트 또는 작업 공간을 찾는 파일에서 ifile을 얻는 방법

StackOverflow https://stackoverflow.com/questions/624897

  •  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 대신에 사용할 수 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top