net.sf.javadocbuilder.ui
Class NewBuilderDialog

java.lang.Object
  |
  +--Dialog
        |
        +--net.sf.javadocbuilder.ui.NewBuilderDialog
All Implemented Interfaces:
Constants
Direct Known Subclasses:
EditBuilderDialog

public class NewBuilderDialog
extends Dialog
implements Constants

Dialog page for adding a new builder. This page is used for editing a build command too, since basically consists of a form that maps ICommand to a UI.

Author:
Miguel Griffa
See Also:
Serialized Form

Field Summary
protected  net.sf.javadocbuilder.BuilderConfiguration builderConfiguration
          The command to configure
protected  Button classNameFilteringButton
           
protected  Text classNameFitleringPatternText
           
private static java.lang.String CLICK_ON_A_TEMPLATE
           
private static java.util.logging.Logger log
           
protected  net.sf.javadocbuilder.extensions.Manager manager
           
protected  Text outDirText
           
protected  Text outNamePatternText
           
protected  IProject project
           
protected  Button singleOutButton
           
protected  net.sf.javadocbuilder.ITemplateSource[] sources
           
protected  Text srcDirsText
           
protected  Text tagFilterNameText
           
protected  Button tagFitlerEnabled
           
protected  Label templateInfo
           
protected  net.sf.javadocbuilder.ITemplate[] templates
           
private  List templatesList
           
private  Combo templateSourceCombo
           
 
Fields inherited from interface net.sf.javadocbuilder.Constants
ARG_CLASSNAME_FILTER_ENABLED, ARG_CLASSNAME_FILTER_PATTERN, ARG_CUSTOM_TEMPLATE_NAME, ARG_OUT_DIR, ARG_OUT_NAME_PATTERN, ARG_SINGLE_FILE, ARG_SOURCE_DIRECTORIES, ARG_TAG_FILTER_ENABLED, ARG_TAG_FILTER_NAME, ARG_TEMPLATE_NAME, CONFIGURATION_FILENAME
 
Constructor Summary
protected NewBuilderDialog(Shell parentShell, IProject prj)
           
 
Method Summary
private  void createAddSrcDirButton(Composite srcDirsComposite)
           
protected  Control createContents(Composite main)
           
private  void createFiltersTab(Composite parent)
           
private  void createMainTabItem(Composite parent)
           
private  void createTemplates(Composite parent)
          Creates the UI area of the templates list and info.
private  void createTemplateTabItem(Composite parent)
           
protected  void disableCustomTemplateWidgets()
           
protected  void disableTemplateWidgets()
           
protected  void enableCustomTemplateWidgets()
           
protected  void enableTemplateWidgets()
           
private  void fillTemplates()
          Set the templatesList with the templates provided in the selected templateSource.
protected  void fillValues()
          Sets values of widgets according to data on builderConfiguration
 net.sf.javadocbuilder.BuilderConfiguration getBuilderConfiguration()
           
private  boolean isEmpty(Text t)
          Check if the given text is empty.
private  java.lang.String nullSafe(java.lang.Object o)
           
protected  void okPressed()
           
private  void selectTemplateName()
           
private  void selectTemplateSource()
          Gets the index of the template source on the combo or -1 if not found or the combo is empty
private  void setCustomTemplateWidgets(boolean val)
           
private  void setTemplateWidgets(boolean val)
           
private  boolean validConfiguration()
          Evaluates the validity (and consitency) of arguments for a builder configuration This method informs the user the errors found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLICK_ON_A_TEMPLATE

private static final java.lang.String CLICK_ON_A_TEMPLATE
See Also:
Constant Field Values

builderConfiguration

protected net.sf.javadocbuilder.BuilderConfiguration builderConfiguration
The command to configure


srcDirsText

protected Text srcDirsText

outDirText

protected Text outDirText

singleOutButton

protected Button singleOutButton

outNamePatternText

protected Text outNamePatternText

tagFitlerEnabled

protected Button tagFitlerEnabled

tagFilterNameText

protected Text tagFilterNameText

project

protected IProject project

classNameFilteringButton

protected Button classNameFilteringButton

classNameFitleringPatternText

protected Text classNameFitleringPatternText

log

private static java.util.logging.Logger log

manager

protected net.sf.javadocbuilder.extensions.Manager manager

sources

protected net.sf.javadocbuilder.ITemplateSource[] sources

templatesList

private List templatesList

templateSourceCombo

private Combo templateSourceCombo

templates

protected net.sf.javadocbuilder.ITemplate[] templates

templateInfo

protected Label templateInfo
Constructor Detail

NewBuilderDialog

protected NewBuilderDialog(Shell parentShell,
                           IProject prj)
Parameters:
parentShell -
Method Detail

okPressed

protected void okPressed()

isEmpty

private final boolean isEmpty(Text t)
Check if the given text is empty. This method is for usage in the validation routine. If the text field is empty an information message is shown to the user and this method returns false.

Parameters:
t -
Returns:

validConfiguration

private boolean validConfiguration()
Evaluates the validity (and consitency) of arguments for a builder configuration This method informs the user the errors found.

Returns:
true if there is no problem with the configuartion and false otherwise

setCustomTemplateWidgets

private void setCustomTemplateWidgets(boolean val)

enableCustomTemplateWidgets

protected void enableCustomTemplateWidgets()

disableCustomTemplateWidgets

protected void disableCustomTemplateWidgets()

enableTemplateWidgets

protected void enableTemplateWidgets()

disableTemplateWidgets

protected void disableTemplateWidgets()

setTemplateWidgets

private void setTemplateWidgets(boolean val)

createContents

protected Control createContents(Composite main)

createTemplateTabItem

private void createTemplateTabItem(Composite parent)

createTemplates

private void createTemplates(Composite parent)
Creates the UI area of the templates list and info.


fillTemplates

private void fillTemplates()
Set the templatesList with the templates provided in the selected templateSource. A side effect of this method is filling the templates field with the result of ITemplateSource.getTemplates()


createMainTabItem

private void createMainTabItem(Composite parent)
Parameters:
parent -

createFiltersTab

private void createFiltersTab(Composite parent)

createAddSrcDirButton

private void createAddSrcDirButton(Composite srcDirsComposite)
Parameters:
srcDirsComposite -

getBuilderConfiguration

public final net.sf.javadocbuilder.BuilderConfiguration getBuilderConfiguration()
Returns:
Returns the builderConfiguration.

fillValues

protected void fillValues()
Sets values of widgets according to data on builderConfiguration


selectTemplateName

private void selectTemplateName()

selectTemplateSource

private void selectTemplateSource()
Gets the index of the template source on the combo or -1 if not found or the combo is empty

Returns:

nullSafe

private final java.lang.String nullSafe(java.lang.Object o)