Skip to content

Conversation

nittka
Copy link
Collaborator

@nittka nittka commented Mar 18, 2018

Finding a workspace resource turned up quite often. Extending the ResourceUtils seems to make sense.

@thSoft
Copy link
Owner

thSoft commented Mar 18, 2018

Where would you use it?

@nittka
Copy link
Collaborator Author

nittka commented Mar 19, 2018

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?

@thSoft
Copy link
Owner

thSoft commented Mar 21, 2018

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.

@nittka
Copy link
Collaborator Author

nittka commented Mar 21, 2018

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.

nittka added a commit to nittka/elysium that referenced this pull request Feb 7, 2021
@nittka
Copy link
Collaborator Author

nittka commented Feb 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants