Java Doc for BaseOptionTemplateSection.java in  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » ui » templates » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » Eclipse plug in development » org.eclipse.pde.ui.templates 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.pde.ui.templates.AbstractTemplateSection
      org.eclipse.pde.ui.templates.BaseOptionTemplateSection

All known Subclasses:   org.eclipse.pde.ui.templates.OptionTemplateSection,
BaseOptionTemplateSection
abstract public class BaseOptionTemplateSection extends AbstractTemplateSection (Code)
This class adds a notion of options to the default template section implementation. Options have values and visual presence that allows users to change them. When a section is configured with a number of options, they become available to the code generator and can take part in conditional code emitting.

This class is typically used in conjunction with OptionTemplateWizardPage . The later is capable of creating UI based on the list of options it was given, thus simplifying new template section creation.
since:
   2.0





Method Summary
protected  TemplateOptionaddBlankField(int pageIndex)
     Adds a blank field with a default height to provide spacing.
protected  TemplateOptionaddBlankField(int height, int pageIndex)
     Adds a blank field with a specific height to provide spacing.
protected  ComboChoiceOptionaddComboChoiceOption(String name, String label, String[][] choices, String value, int pageIndex)
     Force a combo choice representation.
protected  TemplateOptionaddOption(String name, String label, boolean value, int pageIndex)
     Adds a boolean option with a provided name, label and initial value.
protected  TemplateOptionaddOption(String name, String label, String value, int pageIndex)
     Adds a string option with a provided name, label and initial value.
protected  TemplateOptionaddOption(String name, String label, String[][] choices, String value, int pageIndex)
     Adds a choice option with a provided name, label, list of choices and the initial value (choice).
Parameters:
  name - the unique name of the option (can be used as a variable inconditional code emitting and variable substitution)
Parameters:
  label - presentable name of the option
Parameters:
  choices - an array of choices that the user will have when setting thevalue of the option.
public  voidexecute(IProject project, IPluginModelBase model, IProgressMonitor monitor)
     Modifies the superclass implementation by adding the initialization step before commencing execution.
public  booleangetBooleanOption(String key)
     Returns a boolean value of the option with a given name.
public  StringgetReplacementString(String fileName, String key)
     Expands variable substitution to include all string options defined in this template.
public  StringgetStringOption(String name)
     Returns a string value of the option with a given name.
public  ObjectgetValue(String name)
     Returns the value of the option with a given name.
protected  voidinitializeFields(IFieldData data)
     Initializes options in the wizard page using the data provided by the method parameters.
public  voidinitializeFields(IPluginModelBase model)
     Initializes options in the wizard page using the data provided by the method parameters.
protected  voidinitializeOption(String name, Object value)
     Initializes the option with a given unique name with the provided value.
public  booleanisDependentOnParentWizard()
     Returns true if this template depends on values set in the parent wizard. Values in the parent wizard include plug-in id, plug-in name, plug-in class name, plug-in provider etc.
protected  voidregisterOption(TemplateOption option, Object value, int pageIndex)
     Registers the provided option and sets the initial value.
public  voidsetOptionEnabled(String name, boolean enabled)
     Enables the option with a given name.
abstract public  voidvalidateOptions(TemplateOption changed)
     Subclasses must implement this method in order to validate options whose value have been changed by the user.



Method Detail
addBlankField
protected TemplateOption addBlankField(int pageIndex)(Code)
Adds a blank field with a default height to provide spacing.
Parameters:
  pageIndex - a zero-based index of a page where this option should appear the newly created option



addBlankField
protected TemplateOption addBlankField(int height, int pageIndex)(Code)
Adds a blank field with a specific height to provide spacing.
Parameters:
  height - specifies the height of the blank field in pixels
Parameters:
  pageIndex - a zero-based index of a page where this option should appear the newly created option



addComboChoiceOption
protected ComboChoiceOption addComboChoiceOption(String name, String label, String[][] choices, String value, int pageIndex)(Code)
Force a combo choice representation. Radio buttons look bad - even if only two options specified.
Parameters:
  name -
Parameters:
  label -
Parameters:
  choices -
Parameters:
  value -
Parameters:
  pageIndex - the newly created option



addOption
protected TemplateOption addOption(String name, String label, boolean value, int pageIndex)(Code)
Adds a boolean option with a provided name, label and initial value.
Parameters:
  name - the unique name of the option (can be used as a variable inconditional code emitting and variable substitution)
Parameters:
  label - presentable name of the option
Parameters:
  value - initial value of the option
Parameters:
  pageIndex - a zero-based index of a page where this option should appear the newly created option



addOption
protected TemplateOption addOption(String name, String label, String value, int pageIndex)(Code)
Adds a string option with a provided name, label and initial value.
Parameters:
  name - the unique name of the option (can be used as a variable inconditional code emitting and variable substitution)
Parameters:
  label - presentable name of the option
Parameters:
  value - initial value of the option
Parameters:
  pageIndex - a zero-based index of a page where this option should appear the newly created option



addOption
protected TemplateOption addOption(String name, String label, String[][] choices, String value, int pageIndex)(Code)
Adds a choice option with a provided name, label, list of choices and the initial value (choice).
Parameters:
  name - the unique name of the option (can be used as a variable inconditional code emitting and variable substitution)
Parameters:
  label - presentable name of the option
Parameters:
  choices - an array of choices that the user will have when setting thevalue of the option. Each array position should accept anarray of String objects of size 2, the first being the uniquename and the second the presentable label of the choice.
Parameters:
  value - initial value (choice) of the option
Parameters:
  pageIndex - a zero-based index of a page where this option should appear the newly created option



execute
public void execute(IProject project, IPluginModelBase model, IProgressMonitor monitor) throws CoreException(Code)
Modifies the superclass implementation by adding the initialization step before commencing execution. This is important because some options may not be initialized and users may choose to press 'Finish' before the wizard page where the options are were shown for the first time.



getBooleanOption
public boolean getBooleanOption(String key)(Code)
Returns a boolean value of the option with a given name. The option with that name must exist and must be registered as a boolean option to begin with.
Parameters:
  key - the unique name of the option the boolean value of the option with a given name or null if not found.



getReplacementString
public String getReplacementString(String fileName, String key)(Code)
Expands variable substitution to include all string options defined in this template.
See Also:   AbstractTemplateSection.getReplacementString(StringString)



getStringOption
public String getStringOption(String name)(Code)
Returns a string value of the option with a given name. The option with that name must exist and must be registered as a string option to begin with.
Parameters:
  name - the unique name of the option the string value of the option with a given name or null if not found.



getValue
public Object getValue(String name)(Code)
Returns the value of the option with a given name. The actual type of the returned object depends on the option type.
Parameters:
  name - the name of the option the current value of the option with a specified name ornull if not found or not applicable.



initializeFields
protected void initializeFields(IFieldData data)(Code)
Initializes options in the wizard page using the data provided by the method parameters. Some options may depend on the user selection in the common wizard pages before template page has been shown (for example, plug-in ID, plug-in name etc.). This method allows options to initialize in respect to these values.

The method is called before the actual plug-in has been built.


Parameters:
  data - plug-in data as defined in the common plug-in project wizardpages



initializeFields
public void initializeFields(IPluginModelBase model)(Code)
Initializes options in the wizard page using the data provided by the method parameters. Some options may depend on the user selection in the common wizard pages before template page has been shown (for example, plug-in ID, plug-in name etc.). This method allows options to initialize in respect to these values.

This method is called after the plug-in has already been created or as part of new extension creation (inside the manifest editor). Either way, the plug-in properties in the model have been fully set and the model can be used to initialize options that cannot be initialized independently.
Parameters:
  model - the model of the plug-in manifest file.




initializeOption
protected void initializeOption(String name, Object value)(Code)
Initializes the option with a given unique name with the provided value. The value will be set only if the option has not yet been initialized.
Parameters:
  name - option unique name
Parameters:
  value - the initial value of the option



isDependentOnParentWizard
public boolean isDependentOnParentWizard()(Code)
Returns true if this template depends on values set in the parent wizard. Values in the parent wizard include plug-in id, plug-in name, plug-in class name, plug-in provider etc. If the template does depend on these values, initializeFields will be called when the page is made visible in the forward direction (going from the first page to the pages owned by this template). If the page is never shown (Finish is pressed before the page is made visible at least once), initializeFields will be called with the model object instead during template execution. The same method will also be called when the template is created within the context of the plug-in manifest editor, because plug-in model already exists at that time. true if this template depends on the data set inthe parent wizard, false otherwise.



registerOption
protected void registerOption(TemplateOption option, Object value, int pageIndex)(Code)
Registers the provided option and sets the initial value.
Parameters:
  option - the option to register
Parameters:
  value - the initial value
Parameters:
  pageIndex - the page index to which this option belongs



setOptionEnabled
public void setOptionEnabled(String name, boolean enabled)(Code)
Enables the option with a given name. The exact effect of the method depends on the option type, but the end-result should always be the same - users should not be able to modify values of disabled options. This method has no effect if the option with a given name is not found.
Parameters:
  name - the unique name of the option
Parameters:
  enabled - the enable state that the option should have



validateOptions
abstract public void validateOptions(TemplateOption changed)(Code)
Subclasses must implement this method in order to validate options whose value have been changed by the user. The subclass can elect to validate the option on its own, or to also check validity of other options in relation to the new value of this one.
Parameters:
  changed - the option whose value has been changed by the user



Fields inherited from org.eclipse.pde.ui.templates.AbstractTemplateSection
final public static String KEY_ACTIVATOR_SIMPLE(Code)(Java Doc)
final public static String KEY_PACKAGE_NAME(Code)(Java Doc)
final public static String KEY_PLUGIN_CLASS(Code)(Java Doc)
final public static String KEY_PLUGIN_ID(Code)(Java Doc)
final public static String KEY_PLUGIN_NAME(Code)(Java Doc)
protected IPluginModelBase model(Code)(Java Doc)
protected IProject project(Code)(Java Doc)

Methods inherited from org.eclipse.pde.ui.templates.AbstractTemplateSection
public void addPages(Wizard wizard)(Code)(Java Doc)
protected IPluginExtension createExtension(String pointId, boolean reuse) throws CoreException(Code)(Java Doc)
public void execute(IProject project, IPluginModelBase model, IProgressMonitor monitor) throws CoreException(Code)(Java Doc)
protected void generateFiles(IProgressMonitor monitor) throws CoreException(Code)(Java Doc)
protected void generateFiles(IProgressMonitor monitor, URL locationUrl) throws CoreException(Code)(Java Doc)
public IPluginReference[] getDependencies(String schemaVersion)(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public int getNumberOfWorkUnits()(Code)(Java Doc)
public boolean getPagesAdded()(Code)(Java Doc)
abstract protected ResourceBundle getPluginResourceBundle()(Code)(Java Doc)
public String getPluginResourceString(String key)(Code)(Java Doc)
public String getReplacementString(String fileName, String key)(Code)(Java Doc)
protected IFolder getSourceFolder(IProgressMonitor monitor) throws CoreException(Code)(Java Doc)
protected double getTargetVersion()(Code)(Java Doc)
public URL getTemplateLocation()(Code)(Java Doc)
public Object getValue(String key)(Code)(Java Doc)
protected boolean isOkToCreateFile(File sourceFile)(Code)(Java Doc)
protected boolean isOkToCreateFolder(File sourceFolder)(Code)(Java Doc)
protected void markPagesAdded()(Code)(Java Doc)
abstract protected void updateModel(IProgressMonitor monitor) throws CoreException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.