Java Doc for OptionTemplateSection.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
         org.eclipse.pde.ui.templates.OptionTemplateSection

All known Subclasses:   org.eclipse.pde.internal.ui.templates.PDETemplateSection,
OptionTemplateSection
abstract public class OptionTemplateSection extends BaseOptionTemplateSection (Code)
This class adds some conventions to the class it is based on. For example, it expects to find the template content in the following location:
 [install location]/[templateDirectory]/[sectionId]
 
where templateDirectory is expected to be 'templates_3.0' (to distinguish from template designed for earlier Eclipse versions), and sectionId is the unique identifier as reported by the template section.

It also assumes that all wizard pages associated with this template will be based on OptionTemplateWizardPage.
since:
   2.0




Constructor Summary
public  OptionTemplateSection()
     The default constructor.

Method Summary
public  WizardPagecreatePage(int pageIndex)
     Creates the wizard page for the specified page index.
public  WizardPagecreatePage(int pageIndex, String helpContextId)
     Creates the wizard page for the specified page index.
protected  voidflagMissingRequiredOption(TemplateOption option)
     Locates the page that this option is presented in and flags that the option is required and is currently not set.
public  StringgetDescription()
     Returns the description of this template to be used in the UI.
abstract protected  URLgetInstallURL()
     Returns the install URL of the plug-in that contributes this template.
public  StringgetLabel()
     Returns the label of this template to be used in the UI.
public  TemplateOption[]getOptions(int pageIndex)
     Returns options that belong to the page with the given index.
public  TemplateOption[]getOptions(WizardPage page)
     Returns options that are added to the provided wizard page.
public  WizardPagegetPage(int pageIndex)
     Returns the wizard page at the specified index.
public  intgetPageCount()
     Returns a number of pages that this template contributes to the wizard.
public  intgetPageIndex(TemplateOption option)
     Returns the zero-based index of a page that hosts the the given option.
abstract public  StringgetSectionId()
     Returns the unique name of this section.
protected  StringgetTemplateDirectory()
     Returns the directory where all the templates are located in the contributing plug-in.
public  URLgetTemplateLocation()
    
protected  voidregisterOption(TemplateOption option, Object value, int pageIndex)
    
protected  voidresetPageState()
     Resets the current page state by clearing the error message and making the page complete, thereby allowing users to flip to the next page.
public  voidsetPageCount(int count)
     Sets the number of pages this template will manage.
public  voidvalidateOptions(TemplateOption source)
    


Constructor Detail
OptionTemplateSection
public OptionTemplateSection()(Code)
The default constructor.




Method Detail
createPage
public WizardPage createPage(int pageIndex)(Code)
Creates the wizard page for the specified page index. This method cannot be called before setPageCount(int). The page will be created with all the options registered for that page index. Therefore, make all the calls to addOption() before calling this method.
Parameters:
  pageIndex - a zero-based index of the page relative to this template. Forexample, if a template needs to have two pages, you have tocall this method twice (once with index 0 and again with index1).
See Also:   OptionTemplateSection.setPageCount(int)
See Also:   BaseOptionTemplateSection.addOption



createPage
public WizardPage createPage(int pageIndex, String helpContextId)(Code)
Creates the wizard page for the specified page index. This method cannot be called before setPageCount(int). The page will be created with all the options registered for that page index. Therefore, make all the calls to addOption() before calling this method.
Parameters:
  pageIndex - a zero-based index of the page relative to this template. Forexample, if a template need to have two pages, you have tocall this method twice (once with index 0 and again with index1).
Parameters:
  helpContextId - the Id of the help context defined in the contributing plug-inthat will be used to locate content of the info-pop displayedwhen F1 is pressed.
See Also:   OptionTemplateSection.setPageCount(int)
See Also:   BaseOptionTemplateSection.addOption



flagMissingRequiredOption
protected void flagMissingRequiredOption(TemplateOption option)(Code)
Locates the page that this option is presented in and flags that the option is required and is currently not set. The flagging is done by setting the page incomplete and setting the error message that uses option's message label.
Parameters:
  option - the option that is required and currently not set



getDescription
public String getDescription()(Code)
Returns the description of this template to be used in the UI. The description is obtained by creating a lookup key using the following rule: "template.[section-id].desc". This key is used to locate the label in the plugin.properties file of the plug-in that contributed this template. the translated description of this template



getInstallURL
abstract protected URL getInstallURL()(Code)
Returns the install URL of the plug-in that contributes this template. the install URL of the contributing plug-in



getLabel
public String getLabel()(Code)
Returns the label of this template to be used in the UI. The label is obtained by creating a lookup key using the following rule: "template.[section-id].name". This key is used to locate the label in the plugin.properties file of the plug-in that contributed this template. the translated label of this template



getOptions
public TemplateOption[] getOptions(int pageIndex)(Code)
Returns options that belong to the page with the given index.
Parameters:
  pageIndex - 0-based index of the template page @see #setPageCount(int)



getOptions
public TemplateOption[] getOptions(WizardPage page)(Code)
Returns options that are added to the provided wizard page.
Parameters:
  page - wizard page that hosts required options array of options added to the provided wizard page



getPage
public WizardPage getPage(int pageIndex)(Code)
Returns the wizard page at the specified index. Pages must be created prior to calling this method. the wizard page at the specified index or null ifinvalid index.
See Also:   OptionTemplateSection.createPage(int)



getPageCount
public int getPageCount()(Code)
Returns a number of pages that this template contributes to the wizard. the number of pages
See Also:   OptionTemplateSection.setPageCount(int)



getPageIndex
public int getPageIndex(TemplateOption option)(Code)
Returns the zero-based index of a page that hosts the the given option.
Parameters:
  option - template option for which a page index is being requested zero-based index of a page that hosts the option or -1 if none ofthe pages contain the option.



getSectionId
abstract public String getSectionId()(Code)
Returns the unique name of this section. This name will be used to construct name and description lookup keys, as well as the template file location in the contributing plug-in. the unique section Id
See Also:   OptionTemplateSection.getLabel()
See Also:   OptionTemplateSection.getDescription()
See Also:   OptionTemplateSection.getTemplateLocation()



getTemplateDirectory
protected String getTemplateDirectory()(Code)
Returns the directory where all the templates are located in the contributing plug-in. "templates_[schemaVersion]" for code since Eclipse 3.0, or"templates" for pre-3.0 code.



getTemplateLocation
public URL getTemplateLocation()(Code)
Implements the abstract method by looking for templates using the following path:

[install location]/[templateDirectory]/[sectionId] the URL of the location where files to be emitted by thistemplate are located.




registerOption
protected void registerOption(TemplateOption option, Object value, int pageIndex)(Code)



resetPageState
protected void resetPageState()(Code)
Resets the current page state by clearing the error message and making the page complete, thereby allowing users to flip to the next page.



setPageCount
public void setPageCount(int count)(Code)
Sets the number of pages this template will manage. This method must be called prior to adding pages and options in order to initialize the template. Once the method has been called, you can call methods that accept page index in the range [0..count-1].
Parameters:
  count - number of pages that this template will contribute to thetemplate wizard



validateOptions
public void validateOptions(TemplateOption source)(Code)
Validate options given a template option



Methods inherited from org.eclipse.pde.ui.templates.BaseOptionTemplateSection
protected TemplateOption addBlankField(int pageIndex)(Code)(Java Doc)
protected TemplateOption addBlankField(int height, int pageIndex)(Code)(Java Doc)
protected ComboChoiceOption addComboChoiceOption(String name, String label, String[][] choices, String value, int pageIndex)(Code)(Java Doc)
protected TemplateOption addOption(String name, String label, boolean value, int pageIndex)(Code)(Java Doc)
protected TemplateOption addOption(String name, String label, String value, int pageIndex)(Code)(Java Doc)
protected TemplateOption addOption(String name, String label, String[][] choices, String value, int pageIndex)(Code)(Java Doc)
public void execute(IProject project, IPluginModelBase model, IProgressMonitor monitor) throws CoreException(Code)(Java Doc)
public boolean getBooleanOption(String key)(Code)(Java Doc)
public String getReplacementString(String fileName, String key)(Code)(Java Doc)
public String getStringOption(String name)(Code)(Java Doc)
public Object getValue(String name)(Code)(Java Doc)
protected void initializeFields(IFieldData data)(Code)(Java Doc)
public void initializeFields(IPluginModelBase model)(Code)(Java Doc)
protected void initializeOption(String name, Object value)(Code)(Java Doc)
public boolean isDependentOnParentWizard()(Code)(Java Doc)
protected void registerOption(TemplateOption option, Object value, int pageIndex)(Code)(Java Doc)
public void setOptionEnabled(String name, boolean enabled)(Code)(Java Doc)
abstract public void validateOptions(TemplateOption changed)(Code)(Java Doc)

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.