2013-04-07 3 views
-1

사용자가 생성 한 속성에서 버튼을 클릭 할 때 파일 브라우저를 만들려고합니다. 다음 코드를 사용하면 작업 영역에서 전체 파일을 가져옵니다. 그러나 모든 PC를 탐색해야합니다.파일 브라우저 만들기

IFile[] files = WorkspaceResourceDialog.openFileSelection(null, "File selection", "Please select any file", false, null, null); 

의견이 있으십니까?

답변

0
 ResourceDialog resourceDialog= 
    new ResourceDialog(Display.getCurrent().getActiveShell(), 
"Select your image", SWT.OPEN); 

     resourceDialog.create(); 
     resourceDialog.open(); 
     String path=resourceDialog.getURIText();