Bug 261536 - [MidletTemplates]: Define MIDlets templates requirements
Summary: [MidletTemplates]: Define MIDlets templates requirements
Status: CLOSED FIXED
Alias: None
Product: MTJ (Archived)
Classification: Tools
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.0 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL: http://wiki.eclipse.org/DSDP/MTJ/Requ...
Whiteboard:
Keywords: accessibility, api, contributed, core, ui, usability
Depends on:
Blocks: 239979 261537 261539 261540 261541 261542 261543
  Show dependency tree
 
Reported: 2009-01-19 12:30 EST by Diego Madruga Sandin CLA
Modified: 2009-07-09 09:58 EDT (History)
2 users (show)

See Also:


Attachments
Patch with feature implementation. (81.26 KB, patch)
2009-02-11 11:19 EST, David Marques CLA
wds057: iplog+
wds057: review+
Details | Diff
Templates Example Project (14.85 KB, patch)
2009-02-11 12:43 EST, David Marques CLA
wds057: iplog+
wds057: review+
Details | Diff
Patch with images. (5.86 KB, patch)
2009-02-11 14:27 EST, David Marques CLA
wds057: iplog+
wds057: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Madruga Sandin CLA 2009-01-19 12:30:47 EST
MTJ always creates new empty MIDlets in the new MIDlet wizard. It would be nice to have a set of different basic MIDlets templates that could be selected enabling the user to create fully functional MIDlets based in this templates in a new MIDlet creation wizard.


The requirements to this new feature shall be documented in the WIKI page:
http://wiki.eclipse.org/DSDP/MTJ/Requirements/MIDlet_templates
Comment 1 Gorkem Ercan CLA 2009-01-27 10:16:05 EST
Is there going to be a way for the templates to define the libraries and JSRs that are required for the code created by that template? I think templates should be able to declare their required APIs/JSRs and be disabled for a project that has a target that does not meet all the requirements. For example an eSWT template should not be presented (or presented on the UI but disabled) to user for a platform with no eSWT support.
Comment 2 Gustavo de Paula CLA 2009-01-29 14:23:21 EST
we initially thought about doing that. the problem is that there is no standard way to represent a JSR ID or a library ID. so we would not know how to do the filter on the proper way.

so we end up deciding to drop this filter mechanism. we also have the same problem with the library feature on mtj and we drop the filter there too.

do you think it is good idea to add this back to both the libraries and templates? if yes, do you suggest some way to represent and implement the filters?



(In reply to comment #1)
> Is there going to be a way for the templates to define the libraries and JSRs
> that are required for the code created by that template? I think templates
> should be able to declare their required APIs/JSRs and be disabled for a
> project that has a target that does not meet all the requirements. For example
> an eSWT template should not be presented (or presented on the UI but disabled)
> to user for a platform with no eSWT support.
> 

Comment 3 Gorkem Ercan CLA 2009-01-30 04:59:14 EST
Provided that the main reason for the filtering is about classpath consistency. I think internally we can match a JSR/Library ID with a class name. For example org.eclipse.swt.Display for eSWT and filter the templates if the target project does not have it on buildpath. 

This solution is not bullet proof as well. It will not handle the cases for different version of the same API. However, the solution can be used as a starting point and we can work with SDK/library owners for a more standardized approach.
Comment 4 David Marques CLA 2009-02-11 11:19:00 EST
Created attachment 125405 [details]
Patch with feature implementation.

Hello everyone,

Follows attached the implementation of the MIDlet Templates feature. This patch covers the following bugs:

-  239979:  [MidletTemplates]: MIDlets templates;
-  261537:  [MidletTemplates]: Add template option in the context menu and in the new wizard dialog
-  261539:  [MidletTemplates]: Create the New Java ME MIDlet from Template wizard
-  261541:  [MidletTemplates]: Define an Extension Point were MIDlet Templates can be specified

NOTE: It does not include any template implementation. I will attach another patch with an example soon.

Best Regards,

David Marques
Comment 5 David Marques CLA 2009-02-11 12:43:17 EST
Created attachment 125421 [details]
Templates Example Project

Hello Everyone,

Follows attached the examples project for the MIDlet Templates feature.

Regards,

David Marques
Comment 6 David Marques CLA 2009-02-11 14:27:26 EST
Created attachment 125436 [details]
Patch with images.

Image files attached.
Comment 7 Diego Madruga Sandin CLA 2009-02-12 11:25:42 EST
All patches were integrated.
Comment 8 Diego Madruga Sandin CLA 2009-02-12 11:26:19 EST
Comment on attachment 125405 [details]
Patch with feature implementation.

OK, patch Integrated.
Comment 9 Diego Madruga Sandin CLA 2009-02-12 11:27:05 EST
Comment on attachment 125421 [details]
Templates Example Project

OK, patch Integrated.
Comment 10 Diego Madruga Sandin CLA 2009-02-12 11:41:52 EST
Comment on attachment 125436 [details]
Patch with images.

OK, patch Integrated.
Comment 11 Diego Madruga Sandin CLA 2009-03-30 18:10:32 EDT
All bugs were closed and requirements documented.
Comment 12 Gustavo de Paula CLA 2009-07-09 09:58:48 EDT
released on MTJ 1.0