Closed rotty3000 closed 3 years ago
As a note to my future self it would seem the logic for buildpath/testpath [1] could be extracted out to use IClasspathContainer
which would allow for specific natures to be supported in an agnostic fashion. We could then introduce an abstraction to support writing back to the underlying model; bnd project, maven pom, build.gradle file.
Not sure that is worth the effort. The class is really only a bridge, the necessary abstraction will likely double the code.
M2e is having trouble with Workspace. Central is starting to hit real timing issues with all the various states of the Workspace which are incredibly painful to work around. Furthermore I would like to provide quickfix support from maven (and gradle buildship soon) and there is no real need for a Workspace.
as long as I do not have to scale down functionality to go through a common denominator.
Certainly not! :) It's not my intention to hamstring any innovations, quite the contrary.
As a note to my future self it would seem the logic for buildpath/testpath [1] could be extracted out to use
IClasspathContainer
which would allow for specific natures to be supported in an agnostic fashion.
I think this could work.
We could then introduce an abstraction to support writing back to the underlying model; bnd project, maven pom, build.gradle file.
The abstraction would be fairly easy, I think. IJavaCompletionProposal
already forms 90% of the basis of what you would need for such an abstraction - the apply()
method would need to be overridden for each model type. But I think it would be hard to implement the automatic "apply" part in Gradle because there are so many different ways you could conceivably add dependencies in Gradle. (Maven, with its more structured dependency specifications, would probably be easier.) The remaining trick is to convert from the Bnd search result to the appropriate GAV coordinate to add into the build file.
It occurred to me that if we did this, the bnd Maven/Gradle plugins have a utility that goes beyond producing bundles - the indexing being a feature that stands on its own.
It occurred to me that if we did this, the bnd Maven/Gradle plugins have a utility that goes beyond producing bundles - the indexing being a feature that stands on its own.
This is also part of my thinking. I think there's great advantage here.
But I think it would be hard to implement the automatic "apply" part in Gradle because there are so many different ways you could conceivably add dependencies in Gradle.
I was thinking to rely on buildship's model for this. I believe their API already has a model (and that they've decided on some "best practice") for doing thins. That's my theory anyway.
I'm not going to do this so let's just close.
BuildpathQuickFixProcessor
to something more agnosticBuildpathQuickFixProcessor
directly uses the workspace for search. It would be great if workspace was but one of many possible providers so that we can contribute from other places like m2e (and soon buildship).