Bug 172716 - [Manifest Editor] Add run, debug, and export buttons to form header
Summary: [Manifest Editor] Add run, debug, and export buttons to form header
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
: 172531 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-02 16:04 EST by Chris Aniszczyk CLA
Modified: 2007-08-15 16:07 EDT (History)
3 users (show)

See Also:
agarcher: review? (baumanbr)
caniszczyk: review? (caniszczyk)
agarcher: review? (mike.pawlowski)


Attachments
fix for this and bug 172531 (53.16 KB, patch)
2007-08-10 11:23 EDT, Adam Archer CLA
no flags Details | Diff
improved patch for both bugs (61.63 KB, patch)
2007-08-10 16:42 EDT, Adam Archer CLA
no flags Details | Diff
optimized patch (49.88 KB, patch)
2007-08-15 11:36 EDT, Adam Archer CLA
no flags Details | Diff
patch with additional editor support (89.73 KB, patch)
2007-08-15 15:21 EDT, Adam Archer CLA
no flags Details | Diff
icon for build all button (366 bytes, image/gif)
2007-08-15 15:24 EDT, Adam Archer CLA
no flags Details
mylyn/context/zip (2.17 KB, application/octet-stream)
2007-08-15 16:07 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2007-02-02 16:04:24 EST
run,debug,export = sexy
Comment 1 Brian Bauman CLA 2007-02-02 17:36:32 EST
+1 for sexiness
Comment 2 Mike Pawlowski CLA 2007-04-10 15:27:18 EDT
+1

Gonna use images instead of hyperlinks for this one.
Comment 3 Mike Pawlowski CLA 2007-04-10 16:00:04 EDT
Under advisement from a higher source, I'm told that Brian would be better suited for this task due to his work synchronizing the product and manifest editor overview pages.

Brian, if you need to punt this one back, no worries.
Comment 4 Brian Bauman CLA 2007-04-12 16:33:24 EDT
I am up for suggestions on how to do the run/debug/(profile?) icons actions.  Should we default to our run/debug methods for simplicity, or open a dialog (if more than open option is found) for the user to select which option they want?

I guess my vote would be for #2, but wanted to get other's opinions before I got too far and had to redo it.
Comment 5 Wassim Melhem CLA 2007-04-12 16:36:41 EDT
along the lines of #2

If we have more than one, can we show the launch config "types" in a drop-down menu like in the toolbar.  If there is only one, then we only show the icon.
Comment 6 Wassim Melhem CLA 2007-04-12 16:38:04 EDT
This enhancement was supposed to be easy, but then you went all fancy on us with this extensibility thing :)

If comment 5 is too hard, then do the default.  I think having a selection dialog would be too much.
Comment 7 Brian Bauman CLA 2007-04-12 16:38:58 EDT
Leave it to Wassim to solve complicated problems with the snap of his fingers :)
Comment 8 Adam Archer CLA 2007-08-10 11:23:38 EDT
Created attachment 75858 [details]
fix for this and bug 172531

This patch implements the sexiness as suggested in comment 5.

For the purpose of code reuse, a fix for bug 172531 is included as well.
Comment 9 Brian Bauman CLA 2007-08-10 13:22:23 EDT
Looking really promising.  Just a few things we need to fix up.
Comment 10 Adam Archer CLA 2007-08-10 16:42:50 EDT
Created attachment 75888 [details]
improved patch for both bugs

Cleaned up some of my mess. Eliminated static methods. Fixed a problem with the build editor (in which it didn't work at all). Added export button sexiness to feature editor and build editor.

But most importantly, added an overwritable method, PDEFormEditor#contributeToToolbar(IToolBarManager) that allows any PDEFormEditor to add whatever wants to all of its PDEFormPage's toolbars without the pages having to do anything. By default the method does nothing.
Comment 11 Brian Bauman CLA 2007-08-14 17:26:02 EDT
I like this patch ALOT.  Very creative and an excellent solution!  

Originally we were going to open an enhancement request for slightly better memory management, but with the structure of the code this should be relatively simple.  With that little bit of last improvement, I think this will be awesome!
Comment 12 Adam Archer CLA 2007-08-15 11:36:42 EDT
Created attachment 76128 [details]
optimized patch

This patch is ashamed of its vastly inferior predecessor.

Removed PDELauncherFormPage and added PDELauncherFormEditor. Pages now know nothing of their header buttons. All toolbar contributions are left up to the editor.

All created actions are also cached in the editor so they are only created once and then provided to each page as they are opened.
Comment 13 Chris Aniszczyk CLA 2007-08-15 12:39:07 EDT
ok, looks much better :)

Can you modify AbstractTargetEditor to work with this new uber cool stuff?

Also, can you modify the Update Site editor to include this functionality too (or you can open a separate bug for that).

Once you have a new patch, I will review and commit it.

Thanks Adam!
Comment 14 Adam Archer CLA 2007-08-15 15:21:22 EDT
Created attachment 76147 [details]
patch with additional editor support

Added a build all button to the site editor. Icon for this to follow as another attachment.

Refactored the cheat sheet editors so that the register link in the form header is provided by the editor (adding Mike as a reviewer for this).

Refactored the target editor so the set as target platform link in the form header is provided by the editor.
Comment 15 Adam Archer CLA 2007-08-15 15:24:08 EDT
Created attachment 76151 [details]
icon for build all button

icon is to be placed in "org.eclipse.pde.ui/icons/etool16"
Comment 16 Adam Archer CLA 2007-08-15 15:26:52 EDT
*** Bug 172531 has been marked as a duplicate of this bug. ***
Comment 17 Chris Aniszczyk CLA 2007-08-15 16:07:20 EDT
looks great Adam. You missed a copyright on CSAbstractEditor that I added.

Looks sexy indeed!
Comment 18 Chris Aniszczyk CLA 2007-08-15 16:07:25 EDT
Created attachment 76156 [details]
mylyn/context/zip