[ 
https://issues.apache.org/jira/browse/NETBEANS-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Svatopluk Dedic updated NETBEANS-4795:
--------------------------------------
    Labels: sd-candidate  (was: )

> Formalize reuse of registered services
> --------------------------------------
>
>                 Key: NETBEANS-4795
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4795
>             Project: NetBeans
>          Issue Type: New Feature
>          Components: platform - Lookup
>    Affects Versions: 11.3
>            Reporter: Svatopluk Dedic
>            Assignee: Svatopluk Dedic
>            Priority: Major
>              Labels: sd-candidate
>
> During {{commit-validation}} cleanup, I've found out that it's relatively 
> commont to *reuse other module services* in layer registration. The most 
> reused was HTML completion provider, Word completion provider. But also Java 
> Indexer was reused in Groovy.
> Currently this is done by *hardcoding classname* of the original provider 
> implementation - but for example {{HtmlCompletionProvider}} is not a public 
> API. Well, now it is, since if the class was moved, all web scripting modules 
> would fail to complete tags.
> Another approach is to use *shadow to filename*, which is again not an API. 
> In the case of Java Indexer, the filename has changed because manual XML 
> registration was replaced by an annotation - with an undefined (impl-class 
> based) filename generation).
> For these cases, I would like to have {{id}} attribute introduced for service 
> providers, which would declare that the *id* is part of the module public 
> API: the filename will be then formed as *serviceclass-modulecnb-id* to be 
> stable and moderately unique. The annotation processor could check that (for 
> NB modules; or maybe as a part of the documentation build step ?), the ID is 
> mentioned in {{arch.xml as an supplemental API.}}
> For reference, I'd like to introduce an annotation, which would register *a 
> foreign implementation*, so e.g. package-info.java could be annotated as with 
> the templates. The reference would contain attributes
>  * module CNB
>  * service class
>  * ID
>  * optional true/false
> The Processor would ensure that the appropriate dependency is declared (weak 
> = Recommends, otherwise Needs), that the target exists AND is indeed a 
> declared API (perhaps an articial attribute in the layer).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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