sdedic opened a new pull request, #4495:
URL: https://github.com/apache/netbeans/pull/4495

   This PR actually consists of a series of features. I should probably make 
separate requests for that, but ... that would prolong the review process, I 
believe.
   
   The overall goal was to add a project query to get the project's output in 
form of an identifiable artifact(s) and their supposed (not built yet) or 
existing locations - and expose the analysis result through LSP.
   
   Overview:
   ## ProjectActionContext
   This one I wanted for a long time already. Many project APIs or services are 
likely to be affected by project configurations - and it's rather hard to 
invoke the services for a specific configuration, which is not the active one. 
By default UI works against the active configuration, which is fine, but API 
access should have an option to specify it.
   Adding configurations to all APIs is hard, and sometimes it is even 
impossible when the execution goes through some uncooperative layers.; the 
`ProjectActionContext` is a way how to pass the information 'out of band'.
   
   I needed to pass specifically project action to distinguish different types 
of build; for example Micronaut plugins (gradle, maven) support a regular 
build, and a native-image build, that produces different output(s).
   
   Important note for reviewers: while the ProjectActionContext allows to 
specify a profile or user properties, which can be ignored by the underlying 
project system, and give almost complete control over project model evaluation 
to the caller (at least for gradle and maven), I am not 100% sure if the 
properties + profiles is a good idea. A conservative approach would be to 
insist on creating a `ProjectConfiguration` for the profile+properties setup 
and use that.
   
   Reviewers, share your opinion on this; these ProjectActionContext properties 
could be eventually added (compatibly) later.
   
   ## ProjectArtifactsQuery
   this is a project query as usual, asking for project output with GAV 
coordinates (if applicable). I am almost sure the `ArtifactSpec` will satisfy 
PHP, too ... but I still keep it private until Gradle implementation is 
complete.
   
   The `Filter` specification does not cover all query cases, but works for the 
basic ones. When one wants "any output" and a specific output type / classifier.
   
   ## Micronaut support for native image build
   Added a project action and project action mapping for Maven to execute 
native-image build of the micronaut app. The action becomes available (and is 
configurable in project customizer) when one adds Micronaut plugin to the maven 
project build configuration.
   
   ## Maven fixes
   During implementation I've realized that the native-build action, 
contributed to the Maven by `MavenActionsProvider` is not visible in the 
customizer. I was little shocked when I realized that the customizer 
essentially hardcodes the list of (standard) actions and only displays 
user-defined ones in addition to the hardcoded list. I've corrected the 
behaviour of `M2Configuration` in that it lists just config-specific mappings, 
the others are retrieved through `ActionToGoalUtils`.
   I've also realized that the declarative actions lack proper support for 
I18N; so I've added a convenience lookup in ` Bundle.proeprties` using the 
action's (profile's) id, and in additiona specifying `displayName` that starts 
with '#' also makes a lookup, with the possbility to identify the Bundle path 
as well.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to