Community
Participate
Working Groups
Build Identifier: 20100917-0705 If the underlying target file was changed by another editor in eclipse (i.e. the text editor) while the target editor is opened, the target editor doesn't recognize the changes. As a consequence the 'Set as target platform' command in the target editor will apply the out-dated configuration shown in the target editor. Also doing further changes in the target editor will overwrite changes made in the text editor. The editor has to be closed and opened again to get the changes. The resourceChanged(IResourceChangeEvent event) method of the target editor's FileInputListener is probably the right place to handle this. Reproducible: Always Steps to Reproduce: 1. open a .target file in the target editor 2. open the same file in the text editor (while the target editor is still open) 3. make changed to the file in the text editor 4. target editor doesn't reflect the made changes
Thought this was a duplicate report, but I can't find an equivalent bug. It would be better to listen for resource changes. Marking as help wanted.
Created attachment 186014 [details] Proposed patch fixing resource change handling and more This patch introduces the following fixes: - Resource change handling implemented. There is no user interaction, similar to the behavior of the manifest editor. - Save As action works properly (currently broken) - Failing save operations are reported to the user and editor stays dirty (currently only error log is written, editor becomes clean without saving) - In case the target definition cannot be read, the editor doesn’t open, but displays an error message to the user (currently the editor opens on an empty model assigned to some meta file location and pretends everything is fine) As target definitions cannot be read from “out of sync” files, the patch also fixes the issue described in bug 317842, not very elegant though.
Thanks for the work! Hopefully we can review and commit it for M5.
I tried out the patch a bit and it is great. Might put it in today.
Fixed up copyrights and some javadoc. Committed to HEAD. Thanks for the contribution.
Wow, that was fast. Thank you.
Verified in I20110124-1800