[jira] [Commented] (NETBEANS-5629) Gradle project Lookups ordering not defined well

2021-05-03 Thread Jaroslav Tulach (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17338403#comment-17338403
 ] 

Jaroslav Tulach commented on NETBEANS-5629:
---

No, not yet. {{position}} has always been internal to individual lookup 
implementations. But it could be conditionally exposed, I think.

> Gradle project Lookups ordering not defined well
> 
>
> Key: NETBEANS-5629
> URL: https://issues.apache.org/jira/browse/NETBEANS-5629
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Svatopluk Dedic
>Priority: Major
>
> Individual Plugins can contribute to project Lookup. In my testcase, which 
> uses java/java-base plugins, the Lookups loaded from 
> *Projects/org-netbeans-modules-gradle/*** were loaded in the following order:
> {code:java}
> [java, , root, java-base, base]
> {code}
> When Groovy was also present, the order was
> {code:java}
> [java, groovy, , root, groovy-base, java-base, base]
> {code}
> (note - groovy after java, groovy-base before java-base). But with scala, the 
> order is:
> {code:java}
> [java, scala, , root, java-base, scala-base, base]
> {code}
> (note - scala-base AFTER java-base).
> When opening a project with 
> {code:java}
> apply plugin: 'groovy'
> {code}
> the order is yet different:
> {code:java}
> [groovy, java, , root, groovy-base, java-base, base]{code}
> The order is unreliable and I guess under some circumstances even the 
> , xxx-base and xxx could be reordered as plugin names go through 
> series of hashmaps.



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

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-5629) Gradle project Lookups ordering not defined well

2021-05-02 Thread Svatopluk Dedic (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17338197#comment-17338197
 ] 

Svatopluk Dedic commented on NETBEANS-5629:
---

{quote}You can also enhance {{ProxyLookup}} to honor {{position}} value of the 
\{{Lookup.Item }} instances it delegates to, if you think it would fix your 
problem.
{quote}
Is there a *position* attribute in *Lookup.Item* ?

 

> Gradle project Lookups ordering not defined well
> 
>
> Key: NETBEANS-5629
> URL: https://issues.apache.org/jira/browse/NETBEANS-5629
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Svatopluk Dedic
>Priority: Major
>
> Individual Plugins can contribute to project Lookup. In my testcase, which 
> uses java/java-base plugins, the Lookups loaded from 
> *Projects/org-netbeans-modules-gradle/*** were loaded in the following order:
> {code:java}
> [java, , root, java-base, base]
> {code}
> When Groovy was also present, the order was
> {code:java}
> [java, groovy, , root, groovy-base, java-base, base]
> {code}
> (note - groovy after java, groovy-base before java-base). But with scala, the 
> order is:
> {code:java}
> [java, scala, , root, java-base, scala-base, base]
> {code}
> (note - scala-base AFTER java-base).
> When opening a project with 
> {code:java}
> apply plugin: 'groovy'
> {code}
> the order is yet different:
> {code:java}
> [groovy, java, , root, groovy-base, java-base, base]{code}
> The order is unreliable and I guess under some circumstances even the 
> , xxx-base and xxx could be reordered as plugin names go through 
> series of hashmaps.



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

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-5629) Gradle project Lookups ordering not defined well

2021-05-01 Thread Jaroslav Tulach (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337941#comment-17337941
 ] 

Jaroslav Tulach commented on NETBEANS-5629:
---

{quote}[~jtulach] - what do you think: shouldn't we use the MimeLookup-like 
composition for plugin-implied services ?
{quote}
Sure, if existing implementation works for your case, then use it! MimeLookup 
implementation is in the platform already. It is no longer tight to editor and 
it doesn't have to be tight to MIME types.

You can also enhance {{ProxyLookup}} to honor {{position}} value of the 
{{Lookup.Item }} instances it delegates to, if you think it would fix your 
problem.

 

> Gradle project Lookups ordering not defined well
> 
>
> Key: NETBEANS-5629
> URL: https://issues.apache.org/jira/browse/NETBEANS-5629
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Svatopluk Dedic
>Priority: Major
>
> Individual Plugins can contribute to project Lookup. In my testcase, which 
> uses java/java-base plugins, the Lookups loaded from 
> *Projects/org-netbeans-modules-gradle/*** were loaded in the following order:
> {code:java}
> [java, , root, java-base, base]
> {code}
> When Groovy was also present, the order was
> {code:java}
> [java, groovy, , root, groovy-base, java-base, base]
> {code}
> (note - groovy after java, groovy-base before java-base). But with scala, the 
> order is:
> {code:java}
> [java, scala, , root, java-base, scala-base, base]
> {code}
> (note - scala-base AFTER java-base).
> When opening a project with 
> {code:java}
> apply plugin: 'groovy'
> {code}
> the order is yet different:
> {code:java}
> [groovy, java, , root, groovy-base, java-base, base]{code}
> The order is unreliable and I guess under some circumstances even the 
> , xxx-base and xxx could be reordered as plugin names go through 
> series of hashmaps.



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

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-5629) Gradle project Lookups ordering not defined well

2021-05-01 Thread Laszlo Kishalmi (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337820#comment-17337820
 ] 

Laszlo Kishalmi commented on NETBEANS-5629:
---

Hmm. That's interesting. Seems to be a bug in the Project API, at least for me. 
Though while I was checking its implementation, I'd find difficult to fix that.
Probably the ordering has disappeared with: 
[https://github.com/apache/netbeans/pull/2553] when I removed the 
ProjectServiceProvider registrations.

I see three options to fix this:
 # Fix the project api to handle ProjectServiceProvider well
 # Use a LinkedHasSet to keep the order of the plugins, the plugin detection is 
happening in NbProjectInfoBuilder, upon a pre-defined list of plugins, so the 
order can be set there.
 # Maybe it is enough to to put a position attribute to the 
LookupProvider.Registration on the LookupProviders

This issue was not really a problem earlier since compared to Gradle, Ant and 
Maven projects are relatively static.

> Gradle project Lookups ordering not defined well
> 
>
> Key: NETBEANS-5629
> URL: https://issues.apache.org/jira/browse/NETBEANS-5629
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Svatopluk Dedic
>Priority: Major
>
> Individual Plugins can contribute to project Lookup. In my testcase, which 
> uses java/java-base plugins, the Lookups loaded from 
> *Projects/org-netbeans-modules-gradle/*** were loaded in the following order:
> {code:java}
> [java, , root, java-base, base]
> {code}
> When Groovy was also present, the order was
> {code:java}
> [java, groovy, , root, groovy-base, java-base, base]
> {code}
> (note - groovy after java, groovy-base before java-base). But with scala, the 
> order is:
> {code:java}
> [java, scala, , root, java-base, scala-base, base]
> {code}
> (note - scala-base AFTER java-base).
> When opening a project with 
> {code:java}
> apply plugin: 'groovy'
> {code}
> the order is yet different:
> {code:java}
> [groovy, java, , root, groovy-base, java-base, base]{code}
> The order is unreliable and I guess under some circumstances even the 
> , xxx-base and xxx could be reordered as plugin names go through 
> series of hashmaps.



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

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-5629) Gradle project Lookups ordering not defined well

2021-05-01 Thread Svatopluk Dedic (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337808#comment-17337808
 ] 

Svatopluk Dedic commented on NETBEANS-5629:
---

It does :) experienced on my own in Maven projects, which work in a similar 
way, but for packaging only (sidenote:  packaging (distribution type) can be an 
interesting additional 'axis' in the gradle plugin system, too as it ultimately 
combines with technology plugins).

It does matter since individual plugin-folders are merged in ProxyLookup, which 
enumerates the contents (= list of ProjectServiceProviders) in the order of the 
ProxyLookup components, and only then (2nd level) ordered by position attribute 
of ProjectserviceProviders). I would like to take the opportunity that Gradle 
APIs do not define (at the moment) the order at all, to work out a system that 
works consistently for Ant, Maven, Gradle projects.

> Gradle project Lookups ordering not defined well
> 
>
> Key: NETBEANS-5629
> URL: https://issues.apache.org/jira/browse/NETBEANS-5629
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Svatopluk Dedic
>Priority: Major
>
> Individual Plugins can contribute to project Lookup. In my testcase, which 
> uses java/java-base plugins, the Lookups loaded from 
> *Projects/org-netbeans-modules-gradle/*** were loaded in the following order:
> {code:java}
> [java, , root, java-base, base]
> {code}
> When Groovy was also present, the order was
> {code:java}
> [java, groovy, , root, groovy-base, java-base, base]
> {code}
> (note - groovy after java, groovy-base before java-base). But with scala, the 
> order is:
> {code:java}
> [java, scala, , root, java-base, scala-base, base]
> {code}
> (note - scala-base AFTER java-base).
> When opening a project with 
> {code:java}
> apply plugin: 'groovy'
> {code}
> the order is yet different:
> {code:java}
> [groovy, java, , root, groovy-base, java-base, base]{code}
> The order is unreliable and I guess under some circumstances even the 
> , xxx-base and xxx could be reordered as plugin names go through 
> series of hashmaps.



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

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-5629) Gradle project Lookups ordering not defined well

2021-05-01 Thread Laszlo Kishalmi (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337801#comment-17337801
 ] 

Laszlo Kishalmi commented on NETBEANS-5629:
---

Telling the truth, I never considered that the order of these Lookups count.  
BTW does this really count? Not just the orders on the ProjectServiceProviders?

> Gradle project Lookups ordering not defined well
> 
>
> Key: NETBEANS-5629
> URL: https://issues.apache.org/jira/browse/NETBEANS-5629
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Svatopluk Dedic
>Priority: Major
>
> Individual Plugins can contribute to project Lookup. In my testcase, which 
> uses java/java-base plugins, the Lookups loaded from 
> *Projects/org-netbeans-modules-gradle/*** were loaded in the following order:
> {code:java}
> [java, , root, java-base, base]
> {code}
> When Groovy was also present, the order was
> {code:java}
> [java, groovy, , root, groovy-base, java-base, base]
> {code}
> (note - groovy after java, groovy-base before java-base). But with scala, the 
> order is:
> {code:java}
> [java, scala, , root, java-base, scala-base, base]
> {code}
> (note - scala-base AFTER java-base).
> When opening a project with 
> {code:java}
> apply plugin: 'groovy'
> {code}
> the order is yet different:
> {code:java}
> [groovy, java, , root, groovy-base, java-base, base]{code}
> The order is unreliable and I guess under some circumstances even the 
> , xxx-base and xxx could be reordered as plugin names go through 
> series of hashmaps.



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

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



[jira] [Commented] (NETBEANS-5629) Gradle project Lookups ordering not defined well

2021-04-27 Thread Svatopluk Dedic (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17333291#comment-17333291
 ] 

Svatopluk Dedic commented on NETBEANS-5629:
---

Note: given the order is *unspecified* (in fact), I would like to take an 
opportunity to somehow unify the behaviour with *Maven*, which now has 
*packaging*-dependent services, but lacks *plugin*-dependent ones (see 
NETBEANS-5394).

BTW there's one interesting difference between *ProxyLookup* composition and 
the composition that *MimeLookup* does:
 * ProxyLookup just orders the enumerated instance according to the delegate 
order. *position* attribute just orders within one delegate, so e.g. a *java* 
service can not go after/make a fallback to  *java-base* service (provided that 
java-base comes in earlier delegate)
 * MimeLookup applies the *position* attribute across branches. So one can 
position a "plug in" service before, or after the 'generic' one at will.

[~jtulach] - what do you think: shouldn't we use the MimeLookup-like 
composition for plugin-implied services ?

 

> Gradle project Lookups ordering not defined well
> 
>
> Key: NETBEANS-5629
> URL: https://issues.apache.org/jira/browse/NETBEANS-5629
> Project: NetBeans
>  Issue Type: Bug
>Reporter: Svatopluk Dedic
>Priority: Major
>
> Individual Plugins can contribute to project Lookup. In my testcase, which 
> uses java/java-base plugins, the Lookups loaded from 
> *Projects/org-netbeans-modules-gradle/*** were loaded in the following order:
> {code:java}
> [java, , root, java-base, base]
> {code}
> When Groovy was also present, the order was
> {code:java}
> [java, groovy, , root, groovy-base, java-base, base]
> {code}
> (note - groovy after java, groovy-base before java-base). But with scala, the 
> order is:
> {code:java}
> [java, scala, , root, java-base, scala-base, base]
> {code}
> (note - scala-base AFTER java-base).
> When opening a project with 
> {code:java}
> apply plugin: 'groovy'
> {code}
> the order is yet different:
> {code:java}
> [groovy, java, , root, groovy-base, java-base, base]{code}
> The order is unreliable and I guess under some circumstances even the 
> , xxx-base and xxx could be reordered as plugin names go through 
> series of hashmaps.



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

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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