Hi Svata,

Thanks for looking into this.

Not sure I like the 0.0 special case (as it orders after all position
entries, which is contrary to the "natural" number ordering). I'd offer a
simplification:
-allow stringvalue="any" for positions. Orders the same as if no position
is given, but won't produce warnings whether or not other entries are
ordered.
-if all entries either have negative positions (float or otherwise), "any"
or nothing, don't report the "missing ordering" warning for the entries
that don't have a position.

A workaround might be (for example for the completion provider) to add it
with mimetype="", and then remove it using _hidden from the text/x-java
(and possibly re-add it with a position, if needed). Not completely sure if
this would work (if _hidden works in this case), and depends on how many
services we are generally adding to the root mime type.

Jan


On Wed, Sep 16, 2020 at 8:14 PM Svata Dedic <[email protected]> wrote:

> Hi,
>
> I am trying to fix "commit-validation" test that (among other things)
> ensures some consistency in registration layers, in particular order of
> registrations in MIME Lookup.
>
> The explanation got terribly long, so I put up a Wiki page, see
>
> https://cwiki.apache.org/confluence/display/NETBEANS/File+Ordering+Change+proposal
> for full details.
>
> Short summary:
> - there's NO WAY how to register a service in Editors/ (unspecified
> mimetype), that would pass current commit-validation
> -  the unspecified mimetype ("") was specifically designed to define
> universal services, for all editors (without that, this is what the
> entire MIME inheritance is about)
> - once some obscure module registers a service in "" MIME type, it is
> likely to force all distribution modules to use positions in their
> registrations from that time onwards.
>
> POSSIBLE SOLUTIONS:
> * Change test
> * Define positions in the whole codebase + maintain
> * Improve FileUtil.getOrder() contract
>
> Again, please see
>
> https://cwiki.apache.org/confluence/display/NETBEANS/File+Ordering+Change+proposa
> for all the details.
>
> Relevant PRs and branches:
> * https://github.com/apache/netbeans/pull/2359
> * https://github.com/apache/netbeans/pull/2360
> *
>
> https://github.com/apache/netbeans/compare/master...sdedic:origin/bugfix/commitvalidation-fixes3
>
> Please share your thoughts, help me select (or discover) the best (or at
> least effective) solution.
>
> Thanks,
> -Svata
>
> ---------------------------------------------------------------------
> 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