thSoft / elysium

LilyPond IDE for Eclipse
http://elysium.thsoft.hu
14 stars 3 forks source link

link file view only if compiled file may exist #182

Closed nittka closed 6 years ago

nittka commented 6 years ago

Currently, if score view/audio view are open and "linked" with the selected file, changing selection to a file that may not have a corresponding compiled file shows the "pdf/midi file does not exists" warning.

Generally, I like the link with editor functionality, but it is irritating if you jump from the score to an ily-file and the score disappears. The selection change listener in FileView is not null safe, so what I do is returning a file with a dummy extension in case the selected file cannot be the source file of a potential pdf/midi file.

thSoft commented 6 years ago

I support this behavior, however, it should be implemented in FileView directly. Please open a separate issue in eclipse-commons for this.

nittka commented 6 years ago

I opened the above issue. Would you consider merging this PR "temporarily"? My current feeling (after looking at the commons code) is that the API needs changing and not all functionality can go to the file view anyway. The file types themselves will still have to determine, whether something can be shown or not. So code similar to what is contained in this PR will still be necessary.

Merging now will introduce this desired behaviour immediately while giving time to come up with the appropriate API (and making a rushed commons release unnecessary).

Just wondering...

thSoft commented 6 years ago

Hmm, I'm in doubt whether it is worth introducing code that will have to be changed later. If you'd really like to, I propose the following: create an issue for the erroneous behavior and another one that this solution needs to be refactored. I'll merge this, which will close the former issue but the latter will stay open. Is this okay?

nittka commented 6 years ago

I created #189 and #190. The corresponding issue in commons already exists.

thSoft commented 6 years ago

Okay, thanks.