Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

DSDP/MTJ/Requirements/MIDlet templates

< DSDP‎ | MTJ‎ | Requirements

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