Re: [MODULE]Get main project and get its git information
Benno Markiewicz <[email protected]> Thu, 2 Feb 2017 19:28:20 +0100
| Newsgroups | gmane.comp.java.netbeans.devel |
|---|---|
| Message-ID | <CAA_aP4hYt=0WZa-nUp1ootQ5q3qsuhEoFcgDdXY-sjYok6-W+Q@mail.gmail.com> |
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? > > > > >