Community
Participate
Working Groups
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
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.
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. >
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.
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
Created attachment 125421 [details] Templates Example Project Hello Everyone, Follows attached the examples project for the MIDlet Templates feature. Regards, David Marques
Created attachment 125436 [details] Patch with images. Image files attached.
All patches were integrated.
Comment on attachment 125405 [details] Patch with feature implementation. OK, patch Integrated.
Comment on attachment 125421 [details] Templates Example Project OK, patch Integrated.
Comment on attachment 125436 [details] Patch with images. OK, patch Integrated.
All bugs were closed and requirements documented.
released on MTJ 1.0