Community
Participate
Working Groups
The new target platform preference page needs the following enhancements: * The view of target definitions should be a table with 2 columns. The first column should be "Name" (as shown currently), and the second column should be the "Location". Definitions stored in the workspace will show their workspace path in this column. Definitions stored with metadata will leave this column blank. * The table should allow sorting on either column (by pressing the column header). Sort order should be persisted (as a preference, perhaps), so that the order is consistent when the page is later re-opened. * An image overlay should be used for definitions stored in the workspace - to visually distinguish them. There is a project overlay available (ask Curtis for this...) * A "Move..." action shold be added to the buttons on the right that enables when a metadata definition is selected, allowing the definition to be moved to the workspace. A dialog should open to allow the user to specify a file location for the definition in the workspace (there should be a standard dialog for this). Note that the preference page displays in memory copies of all workspace target definitions. This allows all operations on the page to be canceled. In this spirit, moving a target definition to the workspace is also cancelable (this is just copying a meta target def to ws target def that have different handles - the ITargetPlatformService provdies a copy method).
Assigning to Ankur. Please ask questions as needed.
The "active" target platform should be displayed in bold (similar to the checked/active API baseline in the "Plug-in Development > API Baselines" preference page).
I will be assigning the Work In Progress patch little later today. Feel free to commit your changes to TargetPlatformPreferencePage2. I'll merge it in my patch to be in sync.
Created attachment 126495 [details] Patch with table, styling, icon image and sorting Work in Progress. Please review 1. the icon images and overlays 2. styling for target location 3. sorting
(In reply to comment #4) > Please review > 1. the icon images and overlays I can't say they look great. Maybe for now keep the project overlay for the workspace ones and don't put an overlay on te metadata ones. Perhaps we'll want to get separate icons in the future. > 2. styling for target location The brown colour is looking pretty good. We may want to improve the project location string later. The bolding doesn't update when you change the check and hit update. I was also reminded by Mike today that instead of having check boxes we are supposed to have the current platform be bold and have a button to "Set as platform". The API Baselines page has the same issue. However, checkboxes are easy to use and are working well for the moment. Something to keep in mind. > 3. sorting I like it, but that doesn't mean everyone will :)
Minor detail, please change the double click listener to open the edit wizard instead of changing the check state.
>The bolding doesn't update when you change the check and hit update. I couldn't see the "Update" button. I could not reproduce this as the bolding happens as soon checkbox is checked. Can explain it bit more. > ... instead of having check boxes we are supposed > to have the current platform be bold and have a button to "Set as platform". I am adding this button. We can take out the check box or the button (whichever we decide for) later on > Move... button 1. I shall reuse NewTargetDefinitiionWizard or shall design a new dialog like it? 2. When the target is moved to workspace, the corresponding local target is deleted? If not, Should we name the button "Copy..." instead? 3. The use case for Move button functionality will be like this? User selects a Local Target Clicks Move New File dialog opens, user provides the target file location User clicks Finish The new target file is created with all attributes copied from that Local Target If User OKays the pref page, the Local Target is deleted, on Cancel, the new target file is deleted.
(In reply to comment #7) > I couldn't see the "Update" button I think Curtis mean the "Apply" button. > > Move... button > 1. I shall reuse NewTargetDefinitiionWizard or shall design a new dialog like > it? Yes - similar to that wizard without the group at the bottom for initializing contents of the target. > 2. When the target is moved to workspace, the corresponding local target is > deleted? If not, Should we name the button "Copy..." instead? I think we should keep it as "Move..." (we could add a copy or duplicate if people want this in the future). Yes, the local target should be deleted. Note that this only happens once OK is pressed. So the local target would be added to the preference page's "fRemove" list (to properly support cancelation). This means that the wizard will also be creating handles to targets in the workspace, that only get saved when OK is pressed. This also means we need additional checking to ensure that a user does not move two local targets to the same workspace location. > 3. The use case for Move button functionality will be like this? > User selects a Local Target > Clicks Move > New File dialog opens, user provides the target file location > User clicks Finish > The new target file is created with all attributes copied from that Local > Target > If User OKays the pref page, the Local Target is deleted, on Cancel, the > new target file is deleted. Yes - except the deletion/creation are delayed until OK is pressed.
*** Bug 266020 has been marked as a duplicate of this bug. ***
Created attachment 126843 [details] Full Patch You might want to refine the icon images.
Created attachment 126871 [details] Full patch with Del key listner Also made the sorting case insensitive.
Darn, I was in the middle of changing some things so it could be applied. Ankur, are the sorting change and the delete key the only changes? If so I'll look through the patch to find them and included them.
yes. that's the only 2 diff between Full Patch and "Full Patch with del key listner" for case insensitivity one word change here public int compare(Viewer viewer, Object e1, Object e2) { int returnValue = ((TargetDefinition) e1).getName().compareToIgnoreCase((((TargetDefinition) e2).getName())); if (direction == SWT.DOWN) { returnValue = returnValue * -1; } return returnValue; } And for Del Key table.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { if (e.character == SWT.DEL) { IStructuredSelection selection = (IStructuredSelection) fTableViewer.getSelection(); List selected = selection.toList(); fRemoved.addAll(selected); fTargets.removeAll(selected); fTableViewer.refresh(); } } });
Fixed in HEAD, I changed a couple things from the patch, and added some bug fixes in (the restore defaults and apply buttons could do some bad things). Ankur, note that if you create any Images they must be disposed explicitly. So whenever possible use the PDELabelProvider.get or SharedLabelProvider as then then the image lifecycle is managed for you. I will file bugs for two outstanding issues.
Comment on attachment 126871 [details] Full patch with Del key listner Added to iplog, keep up the good work Ankur.
>I will file bugs for two outstanding issues. Please assign them to me. I'll fix them. >Added to iplog, keep up the good work Ankur. Thanks. Quick question - Whats iplog?
(In reply to comment #16) > >I will file bugs for two outstanding issues. > > Please assign them to me. I'll fix them. > Bug 266548 has been assigned to you, but you may need to wait for a day, as I'm going to work on the other bug (bug 266546) to integrate it with Darin's latest work. > >Added to iplog, keep up the good work Ankur. > > Thanks. Quick question - Whats iplog? > It is part of the Eclipse IP Policy, which tracks where contributed code comes from and tries to ensure that we can legally use it. http://www.eclipse.org/projects/dev_process/project-log.php As you are not a committer on the Eclipse project, we track your contributions. For small patches we just mark the iplog flag on the attachment, for larger contributions a Contribution Questionaire (CQ).