Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.klavergne.jext.plugins.clearcase
Class ClearCasePlugin  view ClearCasePlugin download ClearCasePlugin.java

java.lang.Object
  extended bycom.klavergne.jext.plugins.clearcase.ClearCasePlugin
All Implemented Interfaces:
org.jext.event.JextListener, org.jext.Plugin

public class ClearCasePlugin
extends java.lang.Object
implements org.jext.Plugin, org.jext.event.JextListener

The ClearCasePlugin is a plugin for Jext, the Java Text Editor. This plugin integrates ClearCase actions with Jext allowing a user to check out or check in file, add a file to the source control, and a number of other things.

Version:
1.0

Field Summary
private  java.util.Map actions
          A Map containing all the actions for this plugin.
private static java.lang.String CLASS_NAME
          The name of this class.
private  boolean clearCaseAvailable
          A boolean indicating if ClearCase is available on the current machine.
private static java.lang.String ENABLED_WHEN_ALWAYS
          Value in property file defining that an Action should always be enabled.
private static java.lang.String ENABLED_WHEN_CHECKED_IN
          Value in property file defining that an Action should be enabled when the current file is checked in.
private static java.lang.String ENABLED_WHEN_CHECKED_OUT
          Value in property file defining that an Action should be enabled when the current file is checked out.
private static java.lang.String ENABLED_WHEN_CONTROLLED
          Value in property file defining that an Action should be enabled when the current file is under source control.
private static java.lang.String ENABLED_WHEN_NOT_CONTROLLED
          Value in property file defining that an Action should be enabled when the current file is not under source control.
private static int FILE_STATUS_CHECKED_IN
          Value for the file status flag that states that the current file is checked in.
private static int FILE_STATUS_CHECKED_OUT
          Value for the file status flag that states that the current file is checked out.
private static int FILE_STATUS_IN_VOB
          Value for the file status flag that states that the current file is in a directory that is in a ClearCase VOB.
private static int FILE_STATUS_NOT_CONTROLLED
          Value for the file status flag that states that the current file is not under source control.
private static int FILE_STATUS_NOT_IN_VOB
          Value for the file status flag that states that the current file is not in a directory that is in a ClearCase VOB.
private static java.lang.Class[] NEW_ACTION_PARAM_TYPES
          Used to instantiate a new Action.
 
Constructor Summary
ClearCasePlugin()
           
 
Method Summary
 void createMenuItems(org.jext.JextFrame parent, java.util.Vector menus, java.util.Vector menuItems)
          This method, defined in the Plugin interface, is called by Jext to create any menu items that are required by this plugin.
 void createOptionPanes(org.jext.options.OptionsDialog parent)
          This method, defined in the Plugin interface, is called by Jext to create any option panes that are required by this plugin.
private  void enableActions(int fileStatus)
          Enables or disables all the actions for this plugin depending on the status of the current file and the enabled property in the XML properties file.
 void jextEventFired(org.jext.event.JextEvent event)
          Called by Jext whenever a JextEvent is fired.
private  void loadActionLabel(javax.swing.Action action)
          Looks up the action's name in the XML properties file to find the label for the action.
 void start()
          Called by Jext to start this plugin.
 void stop()
          Called by Jext to stop this plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_STATUS_NOT_IN_VOB

private static final int FILE_STATUS_NOT_IN_VOB
Value for the file status flag that states that the current file is not in a directory that is in a ClearCase VOB.

See Also:
Constant Field Values

FILE_STATUS_IN_VOB

private static final int FILE_STATUS_IN_VOB
Value for the file status flag that states that the current file is in a directory that is in a ClearCase VOB.

See Also:
Constant Field Values

FILE_STATUS_CHECKED_OUT

private static final int FILE_STATUS_CHECKED_OUT
Value for the file status flag that states that the current file is checked out.

See Also:
Constant Field Values

FILE_STATUS_CHECKED_IN

private static final int FILE_STATUS_CHECKED_IN
Value for the file status flag that states that the current file is checked in.

See Also:
Constant Field Values

FILE_STATUS_NOT_CONTROLLED

private static final int FILE_STATUS_NOT_CONTROLLED
Value for the file status flag that states that the current file is not under source control.

See Also:
Constant Field Values

ENABLED_WHEN_ALWAYS

private static final java.lang.String ENABLED_WHEN_ALWAYS
Value in property file defining that an Action should always be enabled.

See Also:
Constant Field Values

ENABLED_WHEN_CONTROLLED

private static final java.lang.String ENABLED_WHEN_CONTROLLED
Value in property file defining that an Action should be enabled when the current file is under source control.

See Also:
Constant Field Values

ENABLED_WHEN_NOT_CONTROLLED

private static final java.lang.String ENABLED_WHEN_NOT_CONTROLLED
Value in property file defining that an Action should be enabled when the current file is not under source control.

See Also:
Constant Field Values

ENABLED_WHEN_CHECKED_OUT

private static final java.lang.String ENABLED_WHEN_CHECKED_OUT
Value in property file defining that an Action should be enabled when the current file is checked out.

See Also:
Constant Field Values

ENABLED_WHEN_CHECKED_IN

private static final java.lang.String ENABLED_WHEN_CHECKED_IN
Value in property file defining that an Action should be enabled when the current file is checked in.

See Also:
Constant Field Values

CLASS_NAME

private static final java.lang.String CLASS_NAME
The name of this class.

See Also:
Constant Field Values

NEW_ACTION_PARAM_TYPES

private static final java.lang.Class[] NEW_ACTION_PARAM_TYPES
Used to instantiate a new Action.


clearCaseAvailable

private boolean clearCaseAvailable
A boolean indicating if ClearCase is available on the current machine.


actions

private final java.util.Map actions
A Map containing all the actions for this plugin.

Constructor Detail

ClearCasePlugin

public ClearCasePlugin()
Method Detail

createMenuItems

public void createMenuItems(org.jext.JextFrame parent,
                            java.util.Vector menus,
                            java.util.Vector menuItems)
This method, defined in the Plugin interface, is called by Jext to create any menu items that are required by this plugin.

Specified by:
createMenuItems in interface org.jext.Plugin

createOptionPanes

public void createOptionPanes(org.jext.options.OptionsDialog parent)
This method, defined in the Plugin interface, is called by Jext to create any option panes that are required by this plugin.

Specified by:
createOptionPanes in interface org.jext.Plugin

start

public void start()
Called by Jext to start this plugin.

Specified by:
start in interface org.jext.Plugin

stop

public void stop()
Called by Jext to stop this plugin.

Specified by:
stop in interface org.jext.Plugin

loadActionLabel

private void loadActionLabel(javax.swing.Action action)
Looks up the action's name in the XML properties file to find the label for the action. If the label contains a $, the following character is used as the mnemonic for the action.


enableActions

private void enableActions(int fileStatus)
Enables or disables all the actions for this plugin depending on the status of the current file and the enabled property in the XML properties file. The fileStatus should be one or more of the following (set by using the | operator): FILE_STATUS_NOT_IN_VOB, FILE_STATUS_IN_VOB, FILE_STATUS_CHECKED_OUT, FILE_STATUS_CHECKED_IN, FILE_STATUS_NOT_CONTROLLED.


jextEventFired

public void jextEventFired(org.jext.event.JextEvent event)
Called by Jext whenever a JextEvent is fired. In this plugin, it is used to call enableActions() when a file is opened or a file tab was selected.

Specified by:
jextEventFired in interface org.jext.event.JextListener