You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (Jira)" <ji...@apache.org> on 2021/04/27 14:10:00 UTC

[jira] [Commented] (NETBEANS-5627) Gradle project Lookup inconsistent until OpenProjects.open()

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

Laszlo Kishalmi commented on NETBEANS-5627:
-------------------------------------------

Thank you! This made me think. So I guess what is wrong.

[https://github.com/apache/netbeans/blob/903b73c7ed9284df976f3ba466e8696b51d64167/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java#L419]

When the plugin dependent lookup is created, there is no GradleProject in the NbGradleProjectImpl, not even a fallback one.

But once we "load" the FALLBACK project the plugin dependent lookup does not get refreshed as in that case we do not fire project info change event at that time.

> Gradle project Lookup inconsistent until OpenProjects.open()
> ------------------------------------------------------------
>
>                 Key: NETBEANS-5627
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5627
>             Project: NetBeans
>          Issue Type: Bug
>          Components: projects - Gradle
>            Reporter: Svatopluk Dedic
>            Assignee: Laszlo Kishalmi
>            Priority: Major
>
> Gradle fallback support recognizes several plugins from the directory structure (without reading the {{build.gradle}} file): groovy, java,  scala, war.
> However project Lookup does not contain services for those Plugins, until OpenProjects.open() is called. The Project, however still untrusted, and unevaluated, starts to serve java-related services.
> This is inconsistent with project API's philosophy: [https://bits.netbeans.org/dev/javadoc/org-netbeans-modules-projectuiapi-base/org/netbeans/api/project/ui/OpenProjects.html]
> {quote}*Only certain operations should actually be aware of which projects are "open"; by default, all project functionality should be available whether it is open or not.*
> {quote}
> In this particular situation, ClassPath.getClassPath(sourceFile, SOURCE) does not return ClassPath even though Gradle fallback support recognizes 'java' and 'java-base' plugins until the project opens in the UI. For the rest of the IDE, the project appears as not having any sources in it - the returned ClassPath is not marked as incomplete, but simply does not exist.



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

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

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