org.netbeans.modules.versioning/1 1.32.0 1

org.netbeans.modules.versioning.spi
Annotation Type VersioningSystem.Registration


@Retention(value=SOURCE)
@Target(value={TYPE,METHOD})
public static @interface VersioningSystem.Registration

Register a VersioningSystem in the IDE.

If possible, prefer the annotation prior to a ServiceProvider registration because of a better overall VCS performance. All necessary information will be available to the VCS infrastructure to create menu items and handle file visibility without having to activate the particular VCS System until an explicit user action or relevant file event occurs.

See also VersioningSystem.

Since:
1.24
See Also:
VersioningSystem, ServiceProvider

Required Element Summary
 String actionsCategory
           Determines the path under which this VCS Systems actions are registered.
 String displayName
           Short name of the versioning system, it will be used as popup menu label, label in tooltips, etc.
 String menuLabel
           Short name of the versioning system, it will be used as menu label and it should define a mnemonic key.
 String[] metadataFolderNames
          The VCS Systems metadata folder names.
 

Element Detail

displayName

public abstract String displayName

Short name of the versioning system, it will be used as popup menu label, label in tooltips, etc.

Examples: CVS, Subversion, Mercurial, Teamware, SourceSafe, VSS, Clearcase, Local History.

Corresponds with the property value VersioningSystem.PROP_DISPLAY_NAME when used together with VersioningSystem.

See Also:
VersioningSystem.PROP_DISPLAY_NAME

menuLabel

public abstract String menuLabel

Short name of the versioning system, it will be used as menu label and it should define a mnemonic key.

Examples: &CVS, &Subversion, &Mercurial, &Teamware, &SourceSafe, &VSS, &Clearcase, Local &History.

Corresponds with the property value VersioningSystem.PROP_MENU_LABEL.

See Also:
VersioningSystem.PROP_MENU_LABEL

metadataFolderNames

public abstract String[] metadataFolderNames
The VCS Systems metadata folder names. The provided values are used to determine: Examples:

actionsCategory

public abstract String actionsCategory

Determines the path under which this VCS Systems actions are registered. The two following subpaths are then derived from it:

returning "Subversion" would make the VCS infrastructure to look for actions under the ActionReference paths "Versioning/Subversion/Actions/Unversioned" and "Versioning/Subversion/Actions/Global".

You can also make use of the ActionRegistration.menuText() and ActionRegistration.popupText() attributes, in case you need a different text in the Main Menu item and a projects popup menu item. Also note that this has no direct relevance to ActionID.category().

Example:

Register a VersioningSystem with the actionCategory "Subversion".

 @VersioningSystem.Registration(actionsCategory="Subversion")
 public class SubversionVCS extends VersioningSystem {
    ...
 }
 

Register the ImportAction under the ActionReference path "Versioning/Subversion/Actions/Unversioned" and set
ActionRegistration.popupText to "Import into &Subversion Repository..." and
ActionRegistration.menuText to "I&mport into Repository...".

 @ActionID(id = "org.netbeans.modules.subversion.ui.project.ImportAction", category = "Subversion")
 @ActionRegistration(displayName = "Import into Repository...", popupText="Import into &Subversion Repository...", menuText="I&mport into Repository...")
 @ActionReferences({ @ActionReference(path="Versioning/Subversion/Actions/Unversioned", position=1) })
 public final class ImportAction implements ActionListener {
   ...
 }
 

The Main Menu for an unversioned project then will be:
Main Menu > Team > Subversion > Import into Repository...

The Popup Menu for an unversioned project then will be:
Popup Menu > Versioning > Import into Subversion Repository...

See Also:
ActionID, ActionRegistration, ActionReference

org.netbeans.modules.versioning/1 1.32.0 1

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.