Extension SDK 9.0.5

oracle.jdeveloper.vcs.util
Class VCSDefaultUtils

java.lang.Object
  extended byoracle.jdeveloper.vcs.util.VCSDefaultUtils

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.

Since:
9.0.5

Method Summary
static IdeActivationListener createActivationListener(VCSStatusCache cache)
          Creates an activation listener to detect IDE application switches.
static ContextMenuListener createContextMenuListener(java.awt.Component child, URLFilter filter)
          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, VCSStatusCache cache, URLFilter filter)
          Creates a node overlay tracker based on the given status cache.
static VCSVersionStatus createRecognizedStatus(boolean versioned, javax.swing.Icon icon, java.lang.String tooltip)
          Creates a recognized version status object with the given information.
static Subject createSingleSubject(URLFilter filter)
          Creates a subject for observing many model subject implementors as one.
static VCSVersionStatus createUnrecognizedStatus()
          Creates a unrecognized version status object with no information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createActivationListener

public static final IdeActivationListener createActivationListener(VCSStatusCache cache)
Creates an activation listener to detect IDE application switches. The listener will simply clear the given status cache when activation is detected.

Parameters:
cache - the client's file status cache.
Returns:
the activation listener instance.

createKeyStrokeContext

public static final KeyStrokeContext createKeyStrokeContext(IdeAction[] actions,
                                                            java.lang.String name)
Creates a key stroke context object for the given actions.

Parameters:
actions - the array of actions for the key stroke context.
Returns:
the key stroke context instance.

createContextMenuListener

public static final ContextMenuListener createContextMenuListener(java.awt.Component child,
                                                                  URLFilter filter)
Creates a context menu listener for adding the given menu child. The listener can be based on a selection URL filter for determining whether the component should be made visible.

Parameters:
child - the menu child component to add.
filter - a filter that accepts URLs for handled contexts.
Returns:
the context menu listener instance.

createRecognizedStatus

public static final VCSVersionStatus createRecognizedStatus(boolean versioned,
                                                            javax.swing.Icon icon,
                                                            java.lang.String tooltip)
Creates a recognized version status object with the given information.

Parameters:
versioned - true if the status is versioned.
icon - the overlay icon for the status.
tooltip - the overlay tooltip for the status.
Returns:
the status instance.

createUnrecognizedStatus

public static final VCSVersionStatus createUnrecognizedStatus()
Creates a unrecognized version status object with no information.

Returns:
the status instance.

createSingleSubject

public static final Subject createSingleSubject(URLFilter filter)
Creates a subject for observing many model subject implementors as one.

Parameters:
filter - a filter that accepts URLs for the observed subjects.
Returns:
the subject instance.

createNodeOverlayTracker

public static final IconOverlayTracker createNodeOverlayTracker(int batchSize,
                                                                VCSStatusCache cache,
                                                                URLFilter filter)
Creates a node overlay tracker based on the given status cache. The implementation will ensure that overlays are refreshed when statuses become dirty. Also, the tracker will automatically be associated and disassociated with navigator windows.

Parameters:
batchSize - the overlay request batch size.
cache - the status cache for the tracker.
filter - a filter that accepts URLs for the controlled nodes.
Returns:
the node overlay tracker instance.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.