Community
Participate
Working Groups
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Build Identifier: Proposal for storing vendor-supplied data with device definitions: Under Device Management, you can edit your device definitions. The stock fields include the description, location of the emulator and preverifier, the list of libraries, and a few other items. SDK providers supply emulators which have many and varied runtime settings and they will want to easily persist user preferences. This proposal is that we offer a standard mechanism for storing arbitrary vendor-defined properties in the device.xml file where MTJ stores its device settings. Associating SDK provider properties with a device means that they are persisted with the device and automatically disposed when a device is deleted. Without this capability, a vendor must: - locate an appropriate folder - persist the data - manage the lifecycle of their store file The proposal is to add the following API methods to IMIDPDevice: public Properties getSdkProviderProperties(String sdkId) throws IllegalArgumentException; public void setSdkProviderProperties(String sdkId, final Properties properties) throws IllegalArgumentException; SDK provider properties will be stored in the devices.xml file as follows: <device0 bundle="com.acompany.mtjtoolkit" class="com.acompany.mtjtoolkit.bigbadphone" id="0"> ... <sdkProviderProperties> <sdk id=”com.acompany.mtjtoolkit”> <property name=”binDirectory” value = “c:\\ACompany\\BigBadPhone\\bin”/> <property name=”userSetting1” value = “true”/> <property name=”userSetting2” value = “42”/> </sdk> </sdkProviderProperties> ... </device0> There will be no restriction on how many 'sdk' elements that will be allowed under a 'sdkProviderProperties' element, though typically there will be only one. If this were not the case, then some other party could overwrite the one and only SDK provider section. Reproducible: Always
Research In Motion will be making a contribution for this feature. Cheers, Jon Dearden
Created attachment 153514 [details] Patch for MTJ bug 288549 This patch adds the following methods to IDevice.java and AbstractMIDPDevice.java: public void setSDKProvidedProperties(String sdkId, final Properties properties) throws IllegalArgumentException; public Properties getSDKProvidedProperties(String sdkId) throws IllegalArgumentException; These methods allow arbitrary vendor-specific data to be associated with a device. This is useful for vendors who have user-adjustable emulator settings they would like to associate with different devices. These settings may be controlled via additional vendor-supplied device editor pages.
I, Jon Dearden, have created the patch 153514 solely based on existing (EPL licensed) code in the MTJ project, and wrote 100% of the new code myself without using any other open source or proprietary source code as a basis for my work. I am making my contribution available under the terms of the Eclipse Public License (EPL) to be included in the code base of the MTJ project.
I'll revise this patch.