Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.generator

Class CodeGenerationConnector


public final class CodeGenerationConnector

This class offers a set of static methods for installing a new plugin with code generation skills and tightly integrate it with the existing code generation framework.


 Method Summary
public static void   addActionListener(ActionListener listener )
Adds a new ActionListener to the list of listeners for the code generation. 
public static void   addExternalLibraries( Generator generator , String origin , List libraries )
Adds a list of external libraries (a collections of velocity macros) to the given generator. 
public static void   addExternalPreparationClasses( Generator generator , String origin , Map preparationClasses )
Adds a map of external preparation classes (subclasses of PreparedElement) to the given generator. 
public static boolean   addGeneratorController(String origin , GeneratorController controller )
Adds a new generator controller to the list of known generator controller for the code generation. 
public static void   addLanguage(String language )
Adds a new language to the list of known and choosable languages for code generation. 
public static void   addLanguageFeature(String language , String shortName , String longName , boolean exclusive )
Adds a new feature or enhancement to an existing language. 
public static void   addMacroLibrary(String origin , String file )
Adds a new velocity macro library to the list of known macro libraries. 
public static void   addSettingsPanel(String language , JPanel panel , String pluginName )
Adds a new settings panel for a plugin. 
public static void   addSettingsPanel(JPanel panel , String pluginName )
 
public static void   addValidElementClass(String origin , Class elementClass )
Adds a new class of elements to the list of valid element classes for code generation. 
public static CodeGenerationDialog   getGenerationDialog()
Returns null, or the currently running instance of the dialog. 
public static Generator   getGenerator(String pluginName )
Returns the generator used for code generation from the given plugin. 
public static String   getLowercaseLanguage(String language )
Returns the lower-cased language name, as it appears in the configuration. 
public static void   removeActionListener(ActionListener listener )
Removes a listener from the list of known listeners. 
public static void   removeExternalLibraries( Generator generator , String origin )
Removes all external libraries registered under their origin from the given generator. 
public static void   removeExternalPreparationClasses( Generator generator , String origin )
Removes the map of external preparation classes registered for the given origin from the generator. 
public static boolean   removeGeneratorController(String origin )
Removes the generator controller added under the given origin from the list of known generator controllers for the code generation. 
public static void   removeLanguage(String language )
Removes a language from the list of known and choosable languages for code generation. 
public static void   removeLanguageFeature(String language , String shortName )
Removes a feature or enhancement for an existing language. 
public static void   removeMacroLibrary(String origin , String file )
Removes a velocity macro library from the list of known macro libraries. 
public static void   removeSettingsPanel(String language , String pluginName )
Removes a settings panel from the list of known panels. 
public static void   removeSettingsPanel(String pluginName )
 
public static void   removeSettingsPanel(JPanel panel )
 
public static void   removeValidElementClass(String origin , Class elementClass )
Remove class of elements from the list of valid element classes for code generation. 
arrow_up
 

 

 Method Detail

addActionListener

public static void addActionListener(ActionListener listener )

Adds a new ActionListener to the list of listeners for the code generation.
Parameters:
listener - The new listener to be added.
 
arrow_up
 
 

addExternalLibraries

public static void addExternalLibraries( Generator generator , String origin , List libraries )

Adds a list of external libraries (a collections of velocity macros) to the given generator. The new libraries are registered under their origin.
Parameters:
generator - The Generator instance, the external library should be added to.
origin - A unique name for the plugin being the owner of the new libraries.
libraries - The list of macro libraries to be added.
 
arrow_up
 
 

addExternalPreparationClasses

public static void addExternalPreparationClasses( Generator generator , String origin , Map preparationClasses )

Adds a map of external preparation classes (subclasses of PreparedElement) to the given generator. The map contains instances of Class only.
Parameters:
generator - The Generator instance, the external preparation classes should be added to.
origin - A unique name for the plugin being the owner of the new preparation classes.
preparationClasses - The map of preparation classes to be added.
 
arrow_up
 
 

addGeneratorController

public static boolean addGeneratorController(String origin , GeneratorController controller )

Adds a new generator controller to the list of known generator controller for the code generation.
Parameters:
origin - A unique name for the plugin being the owner of the new generator controller.
controller - The new generator controller to be added.
Returns:
True, if adding the generator controller was successful, otherwise false.
 
arrow_up
 
 

addLanguage

public static void addLanguage(String language )

Adds a new language to the list of known and choosable languages for code generation. All necessary actions for adding the language to the code generation dialog and managing the configuration are taken.
Parameters:
language - Displayname of new language (e.g. Java).
 
arrow_up
 
 

addLanguageFeature

public static void addLanguageFeature(String language , String shortName , String longName , boolean exclusive )

Adds a new feature or enhancement to an existing language. The feature shows itself as a radio or check button in the code generation dialog. If the feature can be combined with other features for language, it is displayed as a check button. Otherwise it is displayed as a radio button.
Parameters:
language - Displayname of the language the feature should be added to.
shortName - Short name of the new feature (used for configuration).
longName - Long name of the new feature (used for display).
exclusive - True if this feature cannot be combined with other features.
 
arrow_up
 
 

addMacroLibrary

public static void addMacroLibrary(String origin , String file )

Adds a new velocity macro library to the list of known macro libraries.
Parameters:
origin - Name of the plugin, the library should be added for.
file - Name of the macro library file to be added.
 
arrow_up
 
 

addSettingsPanel

public static void addSettingsPanel(String language , JPanel panel , String pluginName )

Adds a new settings panel for a plugin. The settings panel can either be general for the plugin or special for a language. The panel itself has to be created and layouted in advance. Later changes are currently not supported. The panel is displayed as part of the settings dialog for the code generation of a choosen language. There has to be a language specific plugin panel in order to have anything displayed at all. The general will then be displayed in the upper part of the resulting tab, while the language specific panel will be displayed in the lower part of it. No language parameter means the panel is meant to be general for the plugin.
Parameters:
language - Displayname of the language the panel should be added to.
panel - The panel to be added.
pluginName - Displayname of the plugin this panel is created for.
 
arrow_up
 
 

addSettingsPanel

public static void addSettingsPanel(JPanel panel , String pluginName )

 
arrow_up
 
 

addValidElementClass

public static void addValidElementClass(String origin , Class elementClass )

Adds a new class of elements to the list of valid element classes for code generation. Generating code works for elements of known element classes only.
Parameters:
origin - Name of the plugin, the information should be added for.
elementClass - Class of elements to be added.
 
arrow_up
 
 

getGenerationDialog

public static CodeGenerationDialog getGenerationDialog()

Returns null, or the currently running instance of the dialog. 
arrow_up
 
 

getGenerator

public static Generator getGenerator(String pluginName )

Returns the generator used for code generation from the given plugin.
Parameters:
pluginName - The name of the plugin.
Returns:
The Generator instance used for code generation.
 
arrow_up
 
 

getLowercaseLanguage

public static String getLowercaseLanguage(String language )

Returns the lower-cased language name, as it appears in the configuration.
Parameters:
language - The language name (e.g. 'Java').
Returns:
The language name converted to lower case.
 
arrow_up
 
 

removeActionListener

public static void removeActionListener(ActionListener listener )

Removes a listener from the list of known listeners.
Parameters:
listener - Listener to be removed.
 
arrow_up
 
 

removeExternalLibraries

public static void removeExternalLibraries( Generator generator , String origin )

Removes all external libraries registered under their origin from the given generator.
Parameters:
generator - The Generator instance, the external library should be removed from.
origin - A unique name for the plugin being the owner of the new libraries.
 
arrow_up
 
 

removeExternalPreparationClasses

public static void removeExternalPreparationClasses( Generator generator , String origin )

Removes the map of external preparation classes registered for the given origin from the generator.
Parameters:
generator - The Generator instance, the external preparation classes should be added to.
origin - A unique name for the plugin being the owner of the new preparation classes.
 
arrow_up
 
 

removeGeneratorController

public static boolean removeGeneratorController(String origin )

Removes the generator controller added under the given origin from the list of known generator controllers for the code generation.
Parameters:
origin - A unique name for the plugin being the owner of the new generator controller.
Returns:
True, if removing the generator controller was successful, otherwise false.
 
arrow_up
 
 

removeLanguage

public static void removeLanguage(String language )

Removes a language from the list of known and choosable languages for code generation. If the language still has features, they will not be removed. The configuration entries are left unchanged, so that they can be reactivated once the plugin is reinstalled.
Parameters:
language - Displayname of new language (e.g. Java).
 
arrow_up
 
 

removeLanguageFeature

public static void removeLanguageFeature(String language , String shortName )

Removes a feature or enhancement for an existing language. The configuration entries will be left unchanged, so that they can be reactivated once the plugin is reinstalled.
Parameters:
language - Displayname of new language (e.g. Java).
 
arrow_up
 
 

removeMacroLibrary

public static void removeMacroLibrary(String origin , String file )

Removes a velocity macro library from the list of known macro libraries.
Parameters:
origin - Name of the plugin, the library should be removed for.
file - Name of macro library file to be removed.
 
arrow_up
 
 

removeSettingsPanel

public static void removeSettingsPanel(String language , String pluginName )

Removes a settings panel from the list of known panels. The panel to be removed is identified by the language and plugin it is created for or by passing the instance of the panel itself. If only a plugin name is given, the general panel for this plugin will be removed. Each previously added panel has to be removed seperately.
Parameters:
language - Displayname of the language the panel to be removed was created for.
pluginName - Displayname of the plugin the panel to be removed was created for.
panel - The panel to be removed.
 
arrow_up
 
 

removeSettingsPanel

public static void removeSettingsPanel(String pluginName )

 
arrow_up
 
 

removeSettingsPanel

public static void removeSettingsPanel(JPanel panel )

 
arrow_up
 
 

removeValidElementClass

public static void removeValidElementClass(String origin , Class elementClass )

Remove class of elements from the list of valid element classes for code generation. Generating code works for elements of this class is no longer possible.
Parameters:
origin - Name of the plugin, the information should be removed for.
elementClass - Class of elements to be removed.
 
arrow_up
 

Created  2003 - 3 - 4

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2001 Gentleware AG, Vogt-Kölln-Str.30, 22527 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.