Community
Participate
Working Groups
Open external text file in Eclipse. "File->Save As" A file save dialog is opened but the *current* directory (from the current file opened in the editor) is not selected and after changing the file name "OK" button is still disabled. To save this file one has additionally find and select the parent directory, which is cumbersome. We found this issue on gtk2-2.10.4-21.el5_7.7 (RHEL 5.8), where the attempt to hit "OK" results in immediate Eclipse crash. Fortunately, this is fixed in later GTK versions, the "Save" dialog simply do not enables OK button until parent directory is selected. This bug is reproducible on Eclipse from 3.6 to 4.6 on GTK2 and GTK3. org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.performSaveAs() for external files does not properly set filter path in FileDialog. It must be a directory path, not the file path. The fix is trivial, I have the patch.
Created attachment 259154 [details] comparison before/after the patch
New Gerrit change created: https://git.eclipse.org/r/64250
Just validated that the original issue seem to be GTK specific (have no Mac) - on Windows 10 the file dialog shows right directory in any case (with/without patch).
(In reply to Andrey Loskutov from comment #3) > Just validated that the original issue seem to be GTK specific (have no Mac) > - on Windows 10 the file dialog shows right directory in any case > (with/without patch). Moving to SWT.
(In reply to Dani Megert from comment #4) > (In reply to Andrey Loskutov from comment #3) > > Just validated that the original issue seem to be GTK specific (have no Mac) > > - on Windows 10 the file dialog shows right directory in any case > > (with/without patch). > > Moving to SWT. Dani, FileDialog states in the javadoc, that the filter path argument must be a directory path. Here the client (editor) clearly violates this. Should SWT now make a breaking change and throw exceptions if this doesn't match, or should SWT parse and modify given argument, trying to resolve the path against file system? Also set/get will be not symmetrical anymore?
(In reply to Andrey Loskutov from comment #5) > (In reply to Dani Megert from comment #4) > > (In reply to Andrey Loskutov from comment #3) > > > Just validated that the original issue seem to be GTK specific (have no Mac) > > > - on Windows 10 the file dialog shows right directory in any case > > > (with/without patch). > > > > Moving to SWT. > > Dani, FileDialog states in the javadoc, that the filter path argument must > be a directory path. Here the client (editor) clearly violates this. Sorry Andrey, I did not deeply look into it, just moved after I read "GTK specific".
Gerrit change https://git.eclipse.org/r/64250 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=b39c96b5b9ef219a62925929107ad06c6b1e8c74