[TIP] Configurations Templates

You probably discovered that you can create "configurations" for different devices and setting in Mobility Pack. If you are not familiar with this term check either my previous post or read article about device fragmentation in 4.1. There is some description of configurations in NbFieldGuide too - this is for 4.1 but it the usage is the same in 5.0, only the preprocessor block definition has changed.

Problem Description (Use Case)
It can happend that you created one really complicated configuration where you set all neccessary properties e.g. emulator, set values to your abilities, filter your resources, obfuscation level, deployment method etc. This is setup for distribution build but you'd need another configuration for testing/debugging purposes. The "testing/debugging" configuration should be almost the same as the "distribution" one but there won't be any deployment, obfuscation will be off and you won't to deploy it to your server. There is easy way how to achive this in Mobility Pack.

Create configuration template
I expect that your distribution configuration already exist and I'll call it LukasSpecialConfiguration.
Open Project Properties and press button manage configuration. Project Configuration Manager dialog opens. Select your configuration (LukasSpecialConfiguration in my case) and press 'Save As Template' button. This will save the configuration with all settings and you can simply use it in any project in IDE.

Use Configuration Template
Invoke Add Configuration dialog - from popup menu in editor, from Project Configuration combo box in Project Properties or from Project Configuration Manager. Choose your configuration template from combo box and name it. Now it's simple to change some settings and have the configuration for "testing/debugging".
This feature increase your productivity. E.g. when you want/need to create lot of configurations and you want to set some properties to all of them. Just create them from the same template.



Configuration Templates Created by Mobility Pack
There will be automatically created template for every your emulator (device) that exist in any J2ME platform in NetBeans Mobility Pack.

Creating Configurations in New Project
You can create configurations in your project when you are creting this project. There is step 4 - ore Configuration Selection and you can check all configurations from existing templates that you want/need in this project.



Did you notice that mobility Pack will create abilities with values from available informations in emulator e.g. existing JSRs, APIs, ScreenWidth, ScreenHeight etc... ?
Comments:

Although this is a great feature, what is missing is the functionality that when I change a value in the DIST configuration that was not changed in the DEBUG configuration, that that value would've changed also in the DEBUG configuration, eg files that need to be included or excluded. Iwan

Posted by Iwan Eising on November 08, 2005 at 02:40 PM CET #

Do you mean something like inheritance of configurations? There is only inheritance from DefaultConfiguration now.
You can achieve this when you'll make your DIST configuration the DefaultConfiguration and then the DEBUG will inherit all settings from the default one.

Posted by Lukas on November 09, 2005 at 05:40 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This is the main channel to share news, tips and other stuff related to my work. Sometimes you can find even personal stuff. Enjoy your reading...

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
news
Blogroll

No bookmarks in folder

OldNews
MyTrash
NavBar
NetBeans
LinksToBeExpanded