Re: [yocto] [PATCH 0/5][eclipse-poky] Refactor handling of SDK check errors
Comments below... Thanks, Jessica -Original Message- From: Timo Müller [mailto:m...@timomueller.eu] Sent: Friday, March 01, 2013 1:37 AM To: Zhang, Jessica Cc: yocto@yoctoproject.org; Timo Mueller Subject: Re: [yocto] [PATCH 0/5][eclipse-poky] Refactor handling of SDK check errors Hi Jessica, Zhang, Jessica wrote, On 27.02.2013 23:04: Hi Timo, Thanks for initiating the cleanup in this area that I agree definitely need some work. There're couple issues I'm seeing with your patch set that probably need some refinements: 1. After seeing the error message, if I go into the field correct the error, I have to explicit click on Apply to make it revalidate, probably we should track the fields change and do automatic re-validation Yes, I agree it can be confusing. I already played around with enabling Listeners on the YoctoUISetting element but stopped because I thought that rechecking the SDK everytime you type in a new character will slow down the ui to much. [JZ] yeah that's my concern too One idea I have in mind is, if the settings are changed (on type) we delete the error message and show a message telling the user that the new settings have to be revalidated again. Do you think that would be sufficient? [JZ] this sounds reasonable Nevertheless I will extend the YoctoUISetting to be able to notify registered listeners on change. Then we can decide on how we want to react to this change. 2. For a scenario that I have 2 toolchains (for different arch, e.g. arm and x86) installed under same directory, which means there're 2 environment setup scripts under the same directory. In this case, the Target Architecture drop down list will contain 2 entries for the arches. In this case, I'm getting an error message for missing environment script file which is not true. By looking at the code, the logic basically checking the elem's target architecture setting, if there's none, report missing environment script. I think for this case, we do need to check the size of the target arch option list to see whether it's empty or not. True, this calls for a separate error message. 3. For the case of Poky.Env.Script.Nonexist, there's Poky.Env.ScriptNoexist.Advise which is more meaningful to user what to do if running into the error. But I don't see that Advice is posted and by looking at code, it seems it's not being used as well? I'll try to rephrase the error message. Regarding the advice I'm not quite sure if I follow correctly. If you choose Build system derived toolchain and the location doesn't contain a toolchain (so the drop-down is empty) the SDK check fails with ENV_SETUP_SCRIPT_NONEXIST. If a dialog pops up showing the error, the advice will also be used and added to the message. [JZ] Yes, only for build tree derived toolchain, the mechanism for build the toolchain thus having the environment setup script is via bitbake meta-ide-support so we need to explicitly tell people what to do if they run into this error. Thanks, Jessica -Original Message- From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Timo Mueller Sent: Wednesday, February 27, 2013 6:37 AM To: yocto@yoctoproject.org Cc: Timo Mueller Subject: [yocto] [PATCH 0/5][eclipse-poky] Refactor handling of SDK check errors From: Timo Mueller timo.muel...@bmw-carit.de Hi, I tried to display the messages resulting from validating the YoctoUISettings in the message area of the properties/preference pages instead of showing a dialog. This led to some refactoring of the validation functionality and also the messages. If for example the user entered a SDK toolchain directory that doesn't exist in the global preferences a dialog will show up showing the error and telling him how he can do IDE-wide settings. As he is currently trying to do IDE-wide settings this advice is not really necessary and the dialog can be really annoying. I split up the messages into a one line error message and an advice. This message can be shown in the page's message area instead of opening a dialog with every configuration error. The advice can still be used when we want to show a dialog to help the user, e.g. when creating a new project. On a side note I reactivated the YoctoSDKChecker class and moved all the validation code from the utils, getting rid of some duplicated and inconsistent code. Best regards, Timo PS: This patch set is based on plugins/sdk.ide: Remove profile edit buttons from property page Best regards Timo ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] [PATCH 0/5][eclipse-poky] Refactor handling of SDK check errors
Hi Jessica, Zhang, Jessica wrote, On 27.02.2013 23:04: Hi Timo, Thanks for initiating the cleanup in this area that I agree definitely need some work. There're couple issues I'm seeing with your patch set that probably need some refinements: 1. After seeing the error message, if I go into the field correct the error, I have to explicit click on Apply to make it revalidate, probably we should track the fields change and do automatic re-validation Yes, I agree it can be confusing. I already played around with enabling Listeners on the YoctoUISetting element but stopped because I thought that rechecking the SDK everytime you type in a new character will slow down the ui to much. One idea I have in mind is, if the settings are changed (on type) we delete the error message and show a message telling the user that the new settings have to be revalidated again. Do you think that would be sufficient? Nevertheless I will extend the YoctoUISetting to be able to notify registered listeners on change. Then we can decide on how we want to react to this change. 2. For a scenario that I have 2 toolchains (for different arch, e.g. arm and x86) installed under same directory, which means there're 2 environment setup scripts under the same directory. In this case, the Target Architecture drop down list will contain 2 entries for the arches. In this case, I'm getting an error message for missing environment script file which is not true. By looking at the code, the logic basically checking the elem's target architecture setting, if there's none, report missing environment script. I think for this case, we do need to check the size of the target arch option list to see whether it's empty or not. True, this calls for a separate error message. 3. For the case of Poky.Env.Script.Nonexist, there's Poky.Env.ScriptNoexist.Advise which is more meaningful to user what to do if running into the error. But I don't see that Advice is posted and by looking at code, it seems it's not being used as well? I'll try to rephrase the error message. Regarding the advice I'm not quite sure if I follow correctly. If you choose Build system derived toolchain and the location doesn't contain a toolchain (so the drop-down is empty) the SDK check fails with ENV_SETUP_SCRIPT_NONEXIST. If a dialog pops up showing the error, the advice will also be used and added to the message. Thanks, Jessica -Original Message- From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Timo Mueller Sent: Wednesday, February 27, 2013 6:37 AM To: yocto@yoctoproject.org Cc: Timo Mueller Subject: [yocto] [PATCH 0/5][eclipse-poky] Refactor handling of SDK check errors From: Timo Mueller timo.muel...@bmw-carit.de Hi, I tried to display the messages resulting from validating the YoctoUISettings in the message area of the properties/preference pages instead of showing a dialog. This led to some refactoring of the validation functionality and also the messages. If for example the user entered a SDK toolchain directory that doesn't exist in the global preferences a dialog will show up showing the error and telling him how he can do IDE-wide settings. As he is currently trying to do IDE-wide settings this advice is not really necessary and the dialog can be really annoying. I split up the messages into a one line error message and an advice. This message can be shown in the page's message area instead of opening a dialog with every configuration error. The advice can still be used when we want to show a dialog to help the user, e.g. when creating a new project. On a side note I reactivated the YoctoSDKChecker class and moved all the validation code from the utils, getting rid of some duplicated and inconsistent code. Best regards, Timo PS: This patch set is based on plugins/sdk.ide: Remove profile edit buttons from property page Best regards Timo ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCH 0/5][eclipse-poky] Refactor handling of SDK check errors
From: Timo Mueller timo.muel...@bmw-carit.de Hi, I tried to display the messages resulting from validating the YoctoUISettings in the message area of the properties/preference pages instead of showing a dialog. This led to some refactoring of the validation functionality and also the messages. If for example the user entered a SDK toolchain directory that doesn't exist in the global preferences a dialog will show up showing the error and telling him how he can do IDE-wide settings. As he is currently trying to do IDE-wide settings this advice is not really necessary and the dialog can be really annoying. I split up the messages into a one line error message and an advice. This message can be shown in the page's message area instead of opening a dialog with every configuration error. The advice can still be used when we want to show a dialog to help the user, e.g. when creating a new project. On a side note I reactivated the YoctoSDKChecker class and moved all the validation code from the utils, getting rid of some duplicated and inconsistent code. Best regards, Timo PS: This patch set is based on plugins/sdk.ide: Remove profile edit buttons from property page Timo Mueller (5): plugins/sdk.ide: Move SDK check functionality to separate class plugins/sdk.ide: Refactored the construction of mesages with SDKCheckResults plugins/sdk.ide: Show SDK check errors in message area plugins/sdk.ide: Removed validation from setCurrentInput plugins/sdk.ide: Use standard error dialog to show SDK check errors .../src/org/yocto/sdk/ide/YoctoSDKChecker.java | 372 +++-- .../org/yocto/sdk/ide/YoctoSDKMessages.properties | 42 ++- .../org/yocto/sdk/ide/YoctoSDKProjectNature.java | 9 +- .../src/org/yocto/sdk/ide/YoctoSDKUtils.java | 255 -- .../src/org/yocto/sdk/ide/YoctoUISetting.java | 47 +-- .../ide/preferences/YoctoSDKPreferencePage.java| 84 +++-- .../preferences/YoctoSDKProjectPropertyPage.java | 87 +++-- .../sdk/ide/wizard/NewYoctoCProjectTemplate.java | 18 +- 8 files changed, 344 insertions(+), 570 deletions(-) -- 1.7.11.7 ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto