public final class VCSDefaultUtils
extends java.lang.Object
Utility class for creating default instances of integration-related classes. Static methods produce general-purpose and common implementations of interfaces that are useful to a version control extension.
Modifier and Type | Method and Description |
---|---|
static IdeActivationListener |
createActivationListener(oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
Creates an activation listener to detect IDE application switches.
|
static ContextMenuListener |
createContextMenuListener(java.awt.Component child,
URLFilter filter,
java.lang.String vcsId)
Creates a context menu listener for adding the given menu child.
|
static KeyStrokeContext |
createKeyStrokeContext(IdeAction[] actions,
java.lang.String name)
Creates a key stroke context object for the given actions.
|
static IconOverlayTracker |
createNodeOverlayTracker(int batchSize,
oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache,
URLFilter filter,
java.lang.String vcsId)
Deprecated.
replaced by declarative registration through icon-overlay-hook
|
static IconOverlayTracker |
createNodeOverlayTracker(int batchSize,
VCSOverlayItemProducer overlayItemProducer,
URLFilter filter,
java.lang.String vcsId)
Deprecated.
replaced by declarative registration through icon-overlay-hook
|
static VCSStatus |
createRecognizedStatus(boolean versioned,
javax.swing.Icon icon,
java.lang.String tooltip)
Creates a recognized version status object with the given information.
|
static VCSStatus |
createUnrecognizedStatus()
Creates a unrecognized version status object with no information.
|
public static final IdeActivationListener createActivationListener(oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
cache
- the client's file status cache.public static final KeyStrokeContext createKeyStrokeContext(IdeAction[] actions, java.lang.String name)
actions
- the array of actions for the key stroke context.public static final ContextMenuListener createContextMenuListener(java.awt.Component child, URLFilter filter, java.lang.String vcsId)
child
- the menu child component to add.filter
- a filter that accepts URLs for handled contexts.vcsId
- the VCS extension controlling the context menu.@Deprecated public static final IconOverlayTracker createNodeOverlayTracker(int batchSize, oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache, URLFilter filter, java.lang.String vcsId)
batchSize
- the overlay request batch size.cache
- the status cache for the tracker.filter
- a filter that accepts URLs for the controlled nodes.vcsId
- the owning extension.@Deprecated public static final IconOverlayTracker createNodeOverlayTracker(int batchSize, VCSOverlayItemProducer overlayItemProducer, URLFilter filter, java.lang.String vcsId)
batchSize
- the overlay request batch size.overlayItemProducer
- the overlay producer for the tracker.filter
- a filter that accepts URLs for the controlled nodes.vcsId
- the owning extension.public static final VCSStatus createRecognizedStatus(boolean versioned, javax.swing.Icon icon, java.lang.String tooltip)
versioned
- true
if the status is versioned.icon
- the overlay icon for the status.tooltip
- the overlay tooltip for the status.public static final VCSStatus createUnrecognizedStatus()