You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IFileViewType#getFile is currently required to map a given selected file to one to be shown in the file view. The API is not well prepared to handle the case that there is no such file (e.g. dummy.txt cannot be mapped to a pdf file compiled from a score, as dummy.txt has nothing to do with LilyPond compilation).
In PR thSoft/elysium#182, I tried to work around this problem by returning a file with a dummy extension which is not supported.
There are several other options.
allow IFileViewType#getFile to return null indicating that the given file is not supported
change the return type of IFileViewType#getFile to Optional with the same meaning
add a method boolean IFileViewType#isSupported(IFile sourceFile) (possibly with default implementation true for backward compatibility)
something else
I believe the actual logic cannot be placed in commons because only the file view type itself knows which source files can have a corresponding file to be shown in the view.
The text was updated successfully, but these errors were encountered:
IFileViewType#getFile is currently required to map a given selected file to one to be shown in the file view. The API is not well prepared to handle the case that there is no such file (e.g. dummy.txt cannot be mapped to a pdf file compiled from a score, as dummy.txt has nothing to do with LilyPond compilation).
In PR thSoft/elysium#182, I tried to work around this problem by returning a file with a dummy extension which is not supported.
There are several other options.
I believe the actual logic cannot be placed in commons because only the file view type itself knows which source files can have a corresponding file to be shown in the view.
The text was updated successfully, but these errors were encountered: