Conversation
|
Where would you use it? |
|
Similar code is already used in LilyPondHyperlinkHelper and LilyPondLanguageSpecificURIEditorOpener. One major effort of the location based include resolution is permanently converting between IFile, File, Platform-URIs, IPath and java-Path in order to make everything work. Actually, I'd like to extend the ResourceUtils further, adding helper methods for the above transformations - and even if they are not used directly, it would be the place to look for sample code ;-) org.eclipse.util also has a ResourceUtils class: how about moving the emf.util code there and getting rid of a single class project (or splitting up org.eclipse.util into org.eclipse.util and org.eclipse.ui.util). At the moment, I do not rely on the changes in this PR, so we can leave it open for discussing possible modifications in the libraries? |
|
Yes, it is important to have a central place for these transformations. Please create a PR in Elysium that uses these changes to verify them in practice. |
|
With the current setup such a PR is problematic. Locally, the logic can be tested, but the maven builds will fail. The target platform does not contain the corresponding commons-version. The build will fail with compile errors, The same problem exists with using the new URI (rather than file) in the PdfAnnotation - the HyperlinkHelper can be updated to use the changes only after a new commons version is present on the update site. |
|
I updated the PR and created a branch in Elysium (https://github.com/nittka/elysium/tree/newUtil) illustrating the possible use of the new API. At the moment, I would not actually incorporate the Elysium-changes, though. More thorough testing would be needed. |
Finding a workspace resource turned up quite often. Extending the ResourceUtils seems to make sense.