| Summary: | Support tree option style in managed build options | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Mohamed Hussein <mohamed_hussein> | ||||||||||||||
| Component: | cdt-build-managed | Assignee: | Doug Schaefer <cdtdoug> | ||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | Chris Recoskie <recoskie> | ||||||||||||||
| Severity: | enhancement | ||||||||||||||||
| Priority: | P3 | CC: | cdtdoug, malaperle, yevshif | ||||||||||||||
| Version: | 8.0 | ||||||||||||||||
| Target Milestone: | 8.1.0 | ||||||||||||||||
| Hardware: | All | ||||||||||||||||
| OS: | All | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
Created attachment 207978 [details]
Proposed implementation of tree options
Created attachment 207979 [details]
Tree field editor and popup dialog
Created attachment 207980 [details]
Show filter in action
Created attachment 207981 [details]
Sample order
Created attachment 207982 [details]
Sample plugin.xml for shown images
plugin.xml for org.eclipse.cdt.managedbuilder.gnu.ui modified to include dummy tree option, represents data shown in previously attached images.
Created attachment 208801 [details]
Update1: Proposal to implement tree build option
Update to expose TreeRoot and TreeSelectionDialog to allow using in other contexts
Pushed change to Gerrit @ https://git.eclipse.org/r/5556 Patch applied: https://git.eclipse.org/r/5558 Hi, ManagedBuildCoreTests.testTreeOptions is failing. Mohamed, can you take a look? https://hudson.eclipse.org/hudson/job/cdt-nightly/1076/testReport/ Hi Mark, This is so weird, as it stands, this test should never pass, though I am sure I ran it and it was passing, and I guess Doug did so as well. The fix is simple, we should just change the order of couple of statements in the method as below. Shall I send an updated patch on gerrit? From 97e4c2ad9acda603261cef3c9b1889d6aee5b26c Tue, 8 May 2012 10:37:14 +0300 From: mhussein <mohamed_hussein@mentor.com> Date: Tue, 8 May 2012 10:36:23 +0300 Subject: [PATCH] Make code consistent with JavaDoc and unit test to throw exception if the type of the node is not a tree. diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java index 07d69fe..fd06364 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java @@ -2975,6 +2975,10 @@ @Override public ITreeRoot getTreeRoot() throws BuildException { + if (getValueType() != TREE) { + throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$ + } + if (treeRoot == null) { if (superClass != null) { return superClass.getTreeRoot(); @@ -2982,10 +2986,6 @@ return null; } } - if (getValueType() != TREE) { - throw new BuildException(ManagedMakeMessages.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$ - } - return treeRoot; } } (In reply to comment #10) > Shall I send an updated patch on gerrit? Thanks. Can you add the patch as an attachment to this this bug so I can enter it in the iplog? I can't use Gerrit right now :( (bug 379338) Or put it in Gerrit and I'll apply it. I didn't actually run the test, I was just using the build def to see the UI in action. Pushed as https://git.eclipse.org/r/5969 |
Build Identifier: 20110615-0604 Managed build options in tools provide several styles for option type, for example: string, boolean, libPaths, enumerated, ... The enumerated type allows the user to select from a pre-defined list of values. A usability problem might happen if the list of possible values is Huge, in this case the simple drop-box wouldn't be sufficient for the user to properly and easily select the needed option. In most of those cases the huge list of options can be organized in some hierarchy that allows the user to easily pick the needed option. The attached patch attempts to support this by doing the following: 1- Adding support of a new option valueType "tree" - Adding schema for treeOption - Adding support for tree type similar to enumerated option type 2- Provide UI to easily select items from this tree - Provide a field editor with a text box and browse button - Provide popup tree picker with filtered search - Each item in the tree can optionally provide an icon, and specify its relative order among its peers. Reproducible: Always