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 2020/12/10 14:48:00 UTC
[jira] [Commented] (NETBEANS-5134) Error nodes in Gradle
subprojects
[ https://issues.apache.org/jira/browse/NETBEANS-5134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17247285#comment-17247285 ]
Laszlo Kishalmi commented on NETBEANS-5134:
-------------------------------------------
Well,
This usually happens with 'wrong' Gradle projects, that puts the source directories outside of the sub-project folder. These are also places where people use these source folders to share code between subprojects.
Anyway in those cases the FileOwnerQuery could return something else than the sub-project where the sources are defined.
The root project FileOwnerQuery might be tweaked to take account sourcedirs outside the sub-project, but if sub-projects start to share code, then I do not know what could be done.
> Error nodes in Gradle subprojects
> ---------------------------------
>
> Key: NETBEANS-5134
> URL: https://issues.apache.org/jira/browse/NETBEANS-5134
> Project: NetBeans
> Issue Type: Bug
> Components: projects - Gradle
> Affects Versions: 12.2
> Reporter: Jaroslav Tulach
> Assignee: Laszlo Kishalmi
> Priority: Major
> Attachments: image-2020-12-10-04-55-17-574.png
>
>
> I am trying to open
> [https://github.com/daemontus/heap-language/]
> project in NetBeans 12.2 and this is the result:
> !image-2020-12-10-04-55-17-574.png!
> There is a lot of Error Node. This is caused by {{SourcesNodeFactory}}:
> {code:java}
> @Override
> public Node node(SourceGroup group) {
> Project owner = FileOwnerQuery.getOwner(group.getRootFolder());
> if (owner != project) {
> if (owner == null) {
> //#152418 if project for folder is not found, just look the other way..
> Logger.getLogger(SourcesNodeFactory.class.getName()).log(Level.INFO, "Cannot find a project owner for folder {0}", group.getRootFolder()); //NOI18N
> return null;
> }
> AbstractNode erroNode = new AbstractNode(Children.LEAF);
> String prjText = ProjectUtils.getInformation(owner).getDisplayName();
> //TODO: Could this happen? Use Bundle.
> erroNode.setDisplayName("Error Node: " + group.getDisplayName() + " " + prjText);
> return erroNode;
> } {code}
> the {{group.getRootFolder()}} belongs to sub project, but the {{owner}} is identified as the parent project.
--
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