[yocto] [RFC 00/17][eclipse-poky] Storing yocto settings as target profiles

Zhang, Jessica jessica.zhang at intel.com
Thu Jan 24 16:30:00 PST 2013


Hi Timo and Atanas,

Thanks for the contribution and I really think it's a great idea and nice feature enhancement by allowing save user customized preference configs via profiles.  But I ran into couple issues when applying the patch series and playing with it.

1st. For patch 7/17, seems we're have following dup changes:

+       public static IPreferenceStore getProfilePreferenceStore(String profileName) {
+               int profileIdentifier = profileName.hashCode();
+
+               return new ScopedPreferenceStore(InstanceScope.INSTANCE,getUniqueIdentifier() + "." + profileIdentifier);
+       }
+
+       public static IPreferenceStore getProfilePreferenceStore(String profileName) {
+               int profileIdentifier = profileName.hashCode();
+
+               return new ScopedPreferenceStore(InstanceScope.INSTANCE,getUniqueIdentifier() + "." + profileIdentifier);
+       }
+

Also, we're missing the patch for NewYoctoCProjectTemplate.java since we're still calling YoctoSDKUtils.getElemFromStore() which should be getElemFromDefaultStore()?

2nd, some behavior exceptions:

When I first open the preference page, I can see the Standard profile, when after I made all my selections for toolchain, sysroot, etc. then I click on new and entered a profile name, e.g. pokytree. To my surprise, my changes went to the default profile, instead of the new profile which I'd expected.  So now I have 2 profiles, standard (which contains my changes) and pokytree, which is empty. And if I leave my drop down box with pokytree and click on new button again, I'll get this pop window telling me I need to specify toolchain, etc. but after I dismiss the error message box, the "create a new target profile" dialog will show.  IMHO this can be very confusing to people, esp. those new to the whole thing.  So I'd suggest that we change the logic, instead of new button, can we change it to "Save as..." which brings up the dialog for entering the profile name.  But we use the existing logic of validate the entries before it's allowed to be saved as new profile.  So to that extend, the behavior is the same as "Apply" except Apply will apply all the changes to the selected Profile?  And I'd also suggest we move the "Save as" button on the same line with Apply if possible.

Make sense?

Thanks,
Jessica

-----Original Message-----
From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of Timo Mueller
Sent: Thursday, January 24, 2013 7:12 AM
To: yocto at yoctoproject.org
Cc: Timo Mueller
Subject: [yocto] [RFC 00/17][eclipse-poky] Storing yocto settings as target profiles

From: Timo Mueller <timo.mueller at bmw-carit.de>

Hi,

currently the yocto settings can be changed globally through eclipse's preferences or locally in the project properties. But the standard configuration stored in the global preferences sometimes changes, e.g. if a new version of the toolchain or the sysroot is released.
If you change the global settings to the updated toolchain or sysroot your old working configuration is gone. If you want to reuse this configuration at a later point in time you have to (remember and) re-enter everthing.
This patch set introduces the possiblity to store a configuration under a unique name, a so called target profile, and be able to select the default target profile that is used for new projects.
Building upon this change the target profiles could later also be used in the project settings and be able to quickly build and debug your software for different hard- and software combinations.

Best regards,
Timo

Atanas Gegov (4):
  plugins/sdk.ide: Extract labels to private members
  plugins/sdk.ide: Add method to enable and disable form
  plugins/sdk.ide: Set value of target array on input change
  plugins/sdk.ide: Create UI element for managing target profiles.

Timo Mueller (13):
  plugins/sdk.ide: Removed unused message
  plugins/sdk.ide: Changed method signature to be more consistent
  plugins/sdk.ide: Modified preferences storage to support profiles.
  plugins/sdk.ide: Set profile on selection change
  plugins/sdk.ide: Add method to allow storing the current settings
  plugins/sdk.ide: Add UI method to create a new profile
  plugins/sdk.ide: Add UI method to delete a profile
  plugins/sdk.ide: Add UI method to rename a profile
  plugins/sdk.ide: Add method to change values of the preference page
  plugins/sdk.ide: Add method to rename a profile and its preference
    store
  plugins/sdk.ide: Add method to delete a profile
  plugins/sdk.ide: Use profiles for the preference page
  plugins/sdk.ide: Added profile UI to the preference page

 .../src/org/yocto/sdk/ide/YoctoProfileElement.java | 105 +++++++++  .../src/org/yocto/sdk/ide/YoctoProfileSetting.java | 244 +++++++++++++++++++++  .../org/yocto/sdk/ide/YoctoSDKMessages.properties  |  19 +-
 .../src/org/yocto/sdk/ide/YoctoSDKPlugin.java      |  15 ++
 .../org/yocto/sdk/ide/YoctoSDKProjectNature.java   |  10 +-
 .../src/org/yocto/sdk/ide/YoctoSDKUtils.java       |  62 ++++--
 .../src/org/yocto/sdk/ide/YoctoUISetting.java      |  61 +++++-
 .../sdk/ide/preferences/PreferenceConstants.java   |   5 +
 .../sdk/ide/preferences/PreferenceInitializer.java |  22 +-  .../ide/preferences/ProfileNameInputValidator.java |  73 ++++++
 .../ide/preferences/YoctoSDKPreferencePage.java    |  80 ++++---
 .../preferences/YoctoSDKProjectPropertyPage.java   |   6 +-
 12 files changed, 637 insertions(+), 65 deletions(-)  create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoProfileElement.java
 create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoProfileSetting.java
 create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/ProfileNameInputValidator.java

--
1.7.11.7

_______________________________________________
yocto mailing list
yocto at yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list