|
24 | 24 | import org.eclipse.jface.viewers.ViewerFilter;
|
25 | 25 | import org.eclipse.jface.window.Window;
|
26 | 26 | import org.eclipse.swt.widgets.Shell;
|
| 27 | +import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; |
27 | 28 | import org.eclipse.ui.dialogs.SelectionDialog;
|
28 | 29 | import org.eclipse.ui.model.WorkbenchContentProvider;
|
29 | 30 | import org.eclipse.ui.model.WorkbenchLabelProvider;
|
@@ -101,14 +102,14 @@ public static IResource openFolderDialog(String initialFolder, IProject project,
|
101 | 102 | return null;
|
102 | 103 | }
|
103 | 104 |
|
104 |
| - private static SelectionDialog createFolderDialog(String initialFolder, final IProject project, |
| 105 | + public static ElementTreeSelectionDialog createFolderDialog(String initialFolder, final IProject project, |
105 | 106 | final boolean showAllProjects, final boolean showFolder, Shell shell) {
|
106 | 107 |
|
107 | 108 | ILabelProvider lp = new WorkbenchLabelProvider();
|
108 | 109 | ITreeContentProvider cp = new WorkbenchContentProvider();
|
109 | 110 | FolderSelectionDialog dialog = new FolderSelectionDialog(shell, lp, cp);
|
110 | 111 | // dialog.setTitle(TypeScriptUIMessages.TernModuleOptionsPanel_selectPathDialogTitle);
|
111 |
| - IFolder folder = StringUtils.isEmpty(initialFolder) ? null |
| 112 | + IContainer folder = StringUtils.isEmpty(initialFolder) ? project |
112 | 113 | : (project != null ? project.getFolder(initialFolder)
|
113 | 114 | : ResourcesPlugin.getWorkspace().getRoot().getFolder(new Path(initialFolder)));
|
114 | 115 | if (folder != null && folder.exists()) {
|
|
0 commit comments