Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display VCS path besides project name in NetBeans?

In Eclipse there are options to configure the display of specific information related to a version control system like Subversion or Git as 'label decoration' besides the project name within its Navigator view.

Label decorations in Eclipse's *Preferences* dialog

Is there something similar available in NetBeans?

like image 484
Sebastian Zartner Avatar asked Aug 07 '15 09:08

Sebastian Zartner


People also ask

How do I view project files in NetBeans?

In NetBeans IDE, choose File > Open Project. In the file chooser, select the project and click Open Project.

Which files of a NetBeans project are tracked by Git?

Git is used for version control of files, much like tools such as Mercurial, Subversion, CVS, and Perforce.

Where do NetBeans Projects save?

Under the project name that interest you, go in the "src" folder. All your java files should be there.

Where is project structure in NetBeans?

The project contains all of your sources and project metadata, such as the project's Ant build script. The project opens in the IDE. You can view its logical structure in the Projects window (Ctrl-1) and its file structure in the Files window (Ctrl-2).


2 Answers

You can enable scm branch information in the project name:

View -> Show versioning labels

like image 74
R. Oosterholt Avatar answered Oct 05 '22 02:10

R. Oosterholt


I realized now that it is possible to display such decorations via the menu View > Show Versioning Labels.

The labels can be adjusted within Tools > Options > Team > Versioning > <version control system> > <version control system> Status Labels.

Some description to this can be found in the NetBeans documentation.

To get labels similar to the default ones in Eclipse I entered this as format:

{commit_revision} {date} {author} {folder}

In the options dialog this looks like this:

Subversion Status Labels

To further define how branches are displayed, you need to click on Define {folder}...

In the opening dialog I added the following entries:

.*?/(?<!/src/.{1,200})((branches|tags)/.+?)(/.*)?   \1
.*?/(?<!/src/.{1,200})trunk/.+                      trunk

See how it's looking in the dialog:

Manage labels dialog

This will display 'branches/foo' and 'tags/bar' for branches and tags and 'trunk' for the trunk.

Within the Projects view this will then look like this:

Display of trunk within *Projects* view

Display of branch within *Projects* view

like image 26
Sebastian Zartner Avatar answered Oct 05 '22 03:10

Sebastian Zartner