com.borland.jbuilder.ide
Class SetupManager

java.lang.Object
  |
  +--com.borland.jbuilder.ide.SetupManager

public class SetupManager
extends java.lang.Object

Serves as a static registry for all available Setup objects.


Method Summary
static Setup getSetup(java.lang.String name)
          Searches for a registered Setup instance by name.
static Setup getSetup(java.lang.String name, java.lang.String parentName)
          Searches for a registered child Setup of parent Setup by name.
static Setup[] getSetups()
           
static Setup[] getSetups(java.lang.String parentName)
           
static boolean isShowRestartWarning()
           
static void registerSetup(Setup setup)
          Registers an instance of a class that extends the Setup abstract class.
static void registerSetup(Setup setup, java.lang.String parentName)
          Registers an instance of a class that extends the Setup abstract class, and should appear as part of another Setup.
static void setShowRestartWarning(boolean show)
          Sets the showRestartWarning variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerSetup

public static void registerSetup(Setup setup)
Registers an instance of a class that extends the Setup abstract class.

registerSetup

public static void registerSetup(Setup setup,
                                 java.lang.String parentName)
Registers an instance of a class that extends the Setup abstract class, and should appear as part of another Setup. No more than one level of sub setups is allowed, so a Setup with parentName should have already been registered to appear at the main setup level. If a parentName Setup doesn't exist, the child will be added anyway -- that way it doesn't matter whether the parent or the child comes first in the opentools list. If a child Setup is added, it will be displayed in the parent Setup page as a sub page.
Parameters:
setup - The setup to register.
parentName - The name of the parent setup.

getSetups

public static Setup[] getSetups()
Returns:
An array of all registered Setup instances, or an empty array if none have been registered.

getSetups

public static Setup[] getSetups(java.lang.String parentName)
Parameters:
parentName - The name of the parent Setup.
Returns:
A complete array of all registered Setup instances that are children of a parentSetup, or an empty array if none have been registered.

getSetup

public static Setup getSetup(java.lang.String name)
Searches for a registered Setup instance by name. This only searches the main setups, not the children.
Parameters:
name - The name of the desired Setup.
Returns:
The Setup instance with a matching name, or null if no such Setup is registered.

getSetup

public static Setup getSetup(java.lang.String name,
                             java.lang.String parentName)
Searches for a registered child Setup of parent Setup by name.
Parameters:
name - The name of the desired Setup.
parentName - The parent Setup name.
Returns:
The child Setup instance with a matching name, or null if no such Setup is registered.

setShowRestartWarning

public static void setShowRestartWarning(boolean show)
Sets the showRestartWarning variable. Use this function when you add your own setup if you want to indicate to the user that they must restart JBuilder after executing your Setup. Use this function carefully -- most (if not all) of the time you want to call it with show==true, to indicate that you want the warning to appear. Setting it to false could cause the warning to not appear at all -- even for the JBuilder added Setups that actually need it.
Parameters:
show - Indicates whether a warning dialog should be shown after the Setup dialog is closed to indicate that JBuilder needs to be restarted.

isShowRestartWarning

public static boolean isShowRestartWarning()
Returns:
boolean indicating whether the restart warning should be shown.