Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "DSDP/MTJ/Requirements/MIDlet templates"

< DSDP‎ | MTJ‎ | Requirements
(User Interface)
(ID: templates:FR002 - MTJ shall define an extension point for MIDlet templates)
 
(18 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
'''Community Review:''' TBD  
 
'''Community Review:''' TBD  
  
'''Related Bugs:''' TBD
+
'''Related Bugs:''' {{bug|239979}}
 
----
 
----
  
 
==='''ID''': templates:FR002 - MTJ shall define an extension point for MIDlet templates===
 
==='''ID''': templates:FR002 - MTJ shall define an extension point for MIDlet templates===
'''Description:''' An '''''Extension Point''''' were third party plugins can provide MIDlet templates
+
'''Description:''' An '''''Extension Point''''' where third party plugins can provide MIDlet templates to be used by MTJ upon creation of MIDlets from templates.
to be used by MTJ upon creation of MIDlets from templates.
+
  
The extension point will be composed by the following elements:
+
* Developers aiming to contribute with templates will need to do the following tasks:
 +
** Extend the extension point;
 +
** Create a folder structure as described bellow;
 +
** Implement a ITemplateProvider to build the UI and provide a dictionary of tags and values;
  
* '''Configuration Markup:'''
+
'''Template Creation:'''
 +
<br>
 +
* Templates are regular Java source files with special tags in the form $<tag-name>$. These tags will be replaced by the ITemplateProvider instance provided in the extension as described bellow. MTJ will collect all template files and use the ITemplateProvider instance's dictionary to replace all template tags by the dictionary values. '''The dictionary will usually have values for custom fields on the wizard'''.
 +
 
 +
* <b>Example:</b>
 
<pre>
 
<pre>
&lt;!ELEMENT extension (template+)&gt;
+
package $package_name$;
&lt;!ATTLIST extension
+
point CDATA #REQUIRED
+
id    CDATA #IMPLIED
+
name  CDATA #IMPLIED&gt;
+
  
MIDlet Template extension point defines a way for adding templates to MTJ.
+
import javax.microedition.midlet.MIDlet;
 +
import javax.microedition.midlet.MIDletStateChangeException;
  
&lt;!ELEMENT template EMPTY&gt;
+
public class $class_name$ extends MIDlet {
&lt;!ATTLIST template
+
 
name       CDATA #REQUIRED
+
public $class_name$() {
description CDATA #REQUIRED
+
}
permissions CDATA #IMPLIED
+
 
provider   CDATA #REQUIRED&gt;
+
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
 +
 
 +
}
 +
 
 +
protected void pauseApp() {
 +
 
 +
}
 +
 
 +
protected void startApp() throws MIDletStateChangeException {
 +
 
 +
}
 +
 
 +
}
 +
</pre>
 +
 
 +
The extension point will be composed by the following elements:
 +
 
 +
*'''template'''
 +
** <font color="green"><b>id</b></font> (String Attribute) <font color="#960018"><b>[REQUIRED]</b></font><p>Description: Template ID.</p>
 +
** <font color="green"><b>name</b></font> (String Attribute) <font color="#960018"><b>[REQUIRED]</b></font><p>Description: MIDlet Template Name.</p>
 +
** <font color="green"><b>overview</b></font> (String Attribute) <font color="#960018"><b>[REQUIRED]</b></font><p>Description: A short description of the template features.</p>
 +
** <font color="green"><b>description</b></font> (String Attribute) <font color="#960018"><b>[REQUIRED]</b></font><p>Description: MIDlet Template Description. Describes the template usage and the features the template implements.</p>
 +
** <font color="green"><b>permissions</b></font> (String Attribute) <font color="#960018"><b>[OPTIONAL]</b></font><p>Description: A comma separated list with the required permissions' names defined by the APIs (permission1,permission2,...,permissionN).</p>
 +
** <font color="green"><b>provider</b></font> (Java Attribute) <font color="#960018"><b>[REQUIRED]</b></font><p>Description: ITemplateProvider Interface defines methods for creation of template custom fields on the widget and provide a dictionary of values to replace the template tags for.</p>
 +
 
 +
*'''''Sequence compositor'''''
 +
** <font color="blue">template</font> (Element reference) ('''1 - *''')
 +
 
 +
'''Usage:''' After filling the plugin extension fields described above. It is necessary to create a structure as described below inside your plugin project:
 +
 
 +
<pre>
 +
Conventions:
 +
<..> := Folders; [..] := Files;
  
name       - MIDlet Template Name.  
+
<project-root>
description - MIDlet Template Description. Describes the template usage and the
+
  +<templates> (Templates folder)
features the template implements.  
+
       +<template-id> (The same name used in your template extension definition id described above.)
permissions - A comma separated list with the required permissions' names defined
+
          +<java> (Class Templates in the form <template-name>.template)
by the APIs (permission1,permission2,...,permissionN).
+
              -[tt1.template] (Template class)   
provider    - MIDletTemplateProvider Interface defines methods for creation of code
+
              -[tt1.template] (Template class)
sections such as attributes, methods, inner classes, etc. The provider does not know
+
          +<resources> (Resource files used by the template, these will be copied to the suite root folder)
anything about the MIDlet construction process.  
+
              -[image.png](Image Resource)
 +
              -[menu.txt](Text file Resource)
 +
              +<sub-folder>(Sub Folder)
 +
        ...
 
</pre>
 
</pre>
  
Line 61: Line 99:
 
'''Community Review:''' TBD  
 
'''Community Review:''' TBD  
  
'''Related Bugs:''' TBD
+
'''Related Bugs:''' {{bug|261542}}
 
----
 
----
  
Line 67: Line 105:
 
This section lists the main User Interface requirements for the Library Support feature.
 
This section lists the main User Interface requirements for the Library Support feature.
  
==='''ID''': library:FR003 - User must be able to create MIDlet from Template through the context sensitive menu.===
+
==='''ID''': templates:FR003 - User must be able to create MIDlet from Template through the context sensitive menu.===
  
 
'''Description:''' The context sensitive menu shall display the option <b>New > Java ME MIDlet From Template</b> when one of the following items are selected:
 
'''Description:''' The context sensitive menu shall display the option <b>New > Java ME MIDlet From Template</b> when one of the following items are selected:
Line 84: Line 122:
 
'''Community Review:''' TBD  
 
'''Community Review:''' TBD  
  
'''Related Bugs:''' TBD
+
'''Related Bugs:''' {{bug|261537}}
  
'''Related Images:''' [https://bugs.eclipse.org/bugs/attachment.cgi?id=116837 Context Sensitive Menu]
+
'''Related Images:''' [https://bugs.eclipse.org/bugs/attachment.cgi?id=122968 Context Sensitive Menu]
 
----
 
----
  
==='''ID''': library:FR004 - New MIDlet From Template Wizard.===
+
==='''ID''': templates:FR004 - New MIDlet From Template Wizard.===
  
 
'''Description:''' MTJ shall open wizard upon context sensitive menu option <b>New > Java ME MIDlet From Template</b> selection. It must display all available templates and build a MIDlet from the selected template.
 
'''Description:''' MTJ shall open wizard upon context sensitive menu option <b>New > Java ME MIDlet From Template</b> selection. It must display all available templates and build a MIDlet from the selected template.
Line 101: Line 139:
 
'''Community Review:''' TBD  
 
'''Community Review:''' TBD  
  
'''Related Bugs:''' TBD
+
'''Related Bugs:''' {{bug|261539}}
  
'''Related Images:''' [https://bugs.eclipse.org/bugs/attachment.cgi?id=116837 New MIDlet From Template Wizard]
+
'''Related Images:''' [https://bugs.eclipse.org/bugs/attachment.cgi?id=122971 New MIDlet From Template Wizard]
 
----
 
----
  
==='''ID''': library:FR005 - New MIDlet From Template Wizard shall display a customize page.===
+
==='''ID''': templates:FR005 - New MIDlet From Template Wizard shall display a customize page.===
  
'''Description:''' New MIDlet From Template Wizard shall display a custom page depending on the selected template in order to setup template specific fields.
+
'''Description:''' New MIDlet From Template Wizard shall display a custom page depending on the selected template in order to setup template specific fields. The custom page will have a common part for every template and a custom one as show on the [https://bugs.eclipse.org/bugs/attachment.cgi?id=122971 related image].
  
 
'''Priority:''' 1
 
'''Priority:''' 1
Line 118: Line 156:
 
'''Community Review:''' TBD  
 
'''Community Review:''' TBD  
  
'''Related Bugs:''' TBD
+
'''Related Bugs:''' {{bug|261539}}
  
'''Related Images:''' [https://bugs.eclipse.org/bugs/attachment.cgi?id=116837 New MIDlet From Template Wizard]
+
'''Related Images:''' [https://bugs.eclipse.org/bugs/attachment.cgi?id=122971 New MIDlet From Template Wizard]
  
 
----
 
----
  
 
[[Category:DSDP]] [[Category:MTJ]]
 
[[Category:DSDP]] [[Category:MTJ]]

Latest revision as of 09:20, 15 February 2009

Core

This section lists the main core requirements for the MIDlet templates feature.

ID: templates:FR001 - MTJ shall support the creation of MIDlets from templates.

Description: MTJ shall provide an extensible and flexible way for third party plugins to contribute with templates for MIDlet creation. These templates will help users to learn API's usage and reduce the programming effort.

Priority: 1

Owner: David Marques

Status: Proposed on 05-Feb-2009

Community Review: TBD

Related Bugs: bug 239979


ID: templates:FR002 - MTJ shall define an extension point for MIDlet templates

Description: An Extension Point where third party plugins can provide MIDlet templates to be used by MTJ upon creation of MIDlets from templates.

  • Developers aiming to contribute with templates will need to do the following tasks:
    • Extend the extension point;
    • Create a folder structure as described bellow;
    • Implement a ITemplateProvider to build the UI and provide a dictionary of tags and values;

Template Creation:

  • Templates are regular Java source files with special tags in the form $<tag-name>$. These tags will be replaced by the ITemplateProvider instance provided in the extension as described bellow. MTJ will collect all template files and use the ITemplateProvider instance's dictionary to replace all template tags by the dictionary values. The dictionary will usually have values for custom fields on the wizard.
  • Example:
package $package_name$;

import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class $class_name$ extends MIDlet {

	public $class_name$() {
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {

	}

	protected void pauseApp() {

	}

	protected void startApp() throws MIDletStateChangeException {

	}

}

The extension point will be composed by the following elements:

  • template
    • id (String Attribute) [REQUIRED]

      Description: Template ID.

    • name (String Attribute) [REQUIRED]

      Description: MIDlet Template Name.

    • overview (String Attribute) [REQUIRED]

      Description: A short description of the template features.

    • description (String Attribute) [REQUIRED]

      Description: MIDlet Template Description. Describes the template usage and the features the template implements.

    • permissions (String Attribute) [OPTIONAL]

      Description: A comma separated list with the required permissions' names defined by the APIs (permission1,permission2,...,permissionN).

    • provider (Java Attribute) [REQUIRED]

      Description: ITemplateProvider Interface defines methods for creation of template custom fields on the widget and provide a dictionary of values to replace the template tags for.

  • Sequence compositor
    • template (Element reference) (1 - *)

Usage: After filling the plugin extension fields described above. It is necessary to create a structure as described below inside your plugin project:

Conventions:
<..> := Folders; [..] := Files;

<project-root>
   +<templates> (Templates folder)
       +<template-id> (The same name used in your template extension definition id described above.)
           +<java> (Class Templates in the form <template-name>.template)
               -[tt1.template] (Template class)    
               -[tt1.template] (Template class)
           +<resources> (Resource files used by the template, these will be copied to the suite root folder)
               -[image.png](Image Resource)
               -[menu.txt](Text file Resource)
               +<sub-folder>(Sub Folder)
        ...

Priority: 1

Owner: David Marques

Status: Proposed on 05-Feb-2009

Community Review: TBD

Related Bugs: bug 261542


User Interface

This section lists the main User Interface requirements for the Library Support feature.

ID: templates:FR003 - User must be able to create MIDlet from Template through the context sensitive menu.

Description: The context sensitive menu shall display the option New > Java ME MIDlet From Template when one of the following items are selected:

  • MTJ Project;
  • Source folder;

Priority: 1

Owner: David Marques

Status: Proposed on 05-Feb-2009

Community Review: TBD

Related Bugs: bug 261537

Related Images: Context Sensitive Menu


ID: templates:FR004 - New MIDlet From Template Wizard.

Description: MTJ shall open wizard upon context sensitive menu option New > Java ME MIDlet From Template selection. It must display all available templates and build a MIDlet from the selected template.

Priority: 1

Owner: David Marques

Status: Proposed on 05-Feb-2009

Community Review: TBD

Related Bugs: bug 261539

Related Images: New MIDlet From Template Wizard


ID: templates:FR005 - New MIDlet From Template Wizard shall display a customize page.

Description: New MIDlet From Template Wizard shall display a custom page depending on the selected template in order to setup template specific fields. The custom page will have a common part for every template and a custom one as show on the related image.

Priority: 1

Owner: David Marques

Status: Proposed on 05-Feb-2009

Community Review: TBD

Related Bugs: bug 261539

Related Images: New MIDlet From Template Wizard


Back to the top