Re: [MODULE]Get main project and get its git information
<[email protected]> Thu, 2 Feb 2017 22:56:57 +0000 (UTC)
| Newsgroups | gmane.comp.java.netbeans.devel |
|---|---|
| Message-ID | <[email protected]> |
please forward all future [nbdev] comments to [email protected]. Please remove [email protected] from your correspondence. Regards. Steve Metz From: Brett Ryan <[email protected]> To: [email protected] Sent: Thursday, February 2, 2017 11:41 AM Subject: [nbdev] Re: [MODULE]Get main project and get its git information I think the assumption would be that it would return itself if there is no main project set? Is this true for maven projects though? You can not set the main so should it return the parent or should a main be set? On 3 Feb 2017, at 05:28, Benno Markiewicz <[email protected]> wrote: What do you think is the main project? The main can be set via Run->Set Main Project I guess this info not what you to read. So what is the use case behind your question? Den 2 feb. 2017 14:00 skrev "Gabriele" <[email protected]>: I'm using this code to get the selected project, but getMainProject always returns null so it falls back to getting all projects. Code: Project[] projects; Project project = OpenProjects.getDefault(). getMainProject(); projects = project == null ? OpenProjects.getDefault(). getOpenProjects() : new Project[]{project}; for (Project p : projects) { ProjectInformation info = ProjectUtils.getInformation(p) ; System.out.println(info. getName()); } After that, I want to extract the project's credentials and info to connect to the repository. I couldn't find any example or hint on how to do that. Can anyone set me in the right direction?