Bug 209841 - [spy] could turn the "contributing plugin" section into a link to plugin manifest
Summary: [spy] could turn the "contributing plugin" section into a link to plugin mani...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Willian Mitsuda CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed, noteworthy
Depends on:
Blocks:
 
Reported: 2007-11-14 12:59 EST by Willian Mitsuda CLA
Modified: 2007-12-11 12:38 EST (History)
2 users (show)

See Also:


Attachments
Proposed patch (4.71 KB, patch)
2007-11-14 16:45 EST, Willian Mitsuda CLA
no flags Details | Diff
mylyn/context/zip (102.09 KB, application/octet-stream)
2007-11-14 16:45 EST, Willian Mitsuda CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Willian Mitsuda CLA 2007-11-14 12:59:07 EST
The plugin spy has a section called "The contributing plug-in:", that shows the plugin ID.

It could be turned into a link, and when clicked, open the plugin manifest.
Comment 1 Chris Aniszczyk CLA 2007-11-14 14:00:36 EST
you're getting spoiled Willian ;d
Comment 2 Willian Mitsuda CLA 2007-11-14 14:05:35 EST
I can provide a patch for this if you like, but I need to know if there is some API to open the plugin manifest editor (and handle all dirty things, like checking if it is already opened, etc...) given a bundle ID.

After some little research, it sounds like org.eclipse.pde.internal.ui.editor.plugin.ManifestEditor.openPluginEditor(String id) do exactly what I want, but I cannot use it because it is on org.eclipse.pde.ui, while spy is on org.eclipse.pde.runtime (BTW, is not more appropriate to host spy on UI plugin?).
Comment 3 Chris Aniszczyk CLA 2007-11-14 14:19:34 EST
Check out SpyIDEUtil, I'd envision you adding a new method there to open an editor.

Also, the reason it's in pde.runtime is because we want the spy to work without PDE UI/JDT etc... this is the case currently as if you don't have PDE UI / JDT available, the spy won't offer hyperlinks and instead just the full class qualified name.

We'll have to create a fancier HyperLinkAdapter in SpyFormToolkit than we have now to handle the case of manifests ;)

I definitely appreciate the contribution.

Let me know if you need any help.
Comment 4 Willian Mitsuda CLA 2007-11-14 15:00:46 EST
Yes, I already took care from the hyperlink stuff. That was the easy part.

What is the relationship between pde.ui and pde.runtime? Who depends on what? I was initially thinking pde.ui was dependent on runtime, but it looks runtime is some kind of superset of core/ui.

I'm thinking about introducing an optional dependency on pde.ui in pde.runtime, so I can use Manifest.openPluginEditor. Is that the right approach?
Comment 5 Chris Aniszczyk CLA 2007-11-14 15:08:01 EST
PDE runtime is an independent piece from PDE UI. PDE UI doesn't depend on runtime. PDE Runtime was meant as something you can drop in your RCP application or other applications to aid developers.

Since we're only opening an editor here, can we do a:

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(editorInput, "org.eclipse.pde.ui.manifestEditor")

That would avoid the extra dependency.
Comment 6 Willian Mitsuda CLA 2007-11-14 15:47:40 EST
Chris, are you sure it is so simple?

I'm taking a look at ManifestEditor.open(Object object, boolean source), and openExternalPlugin() and it handles a lot of cases just to get at the proper IEditorInput. Isn't it better to reuse all this logic?
Comment 7 Chris Aniszczyk CLA 2007-11-14 15:50:19 EST
Ok, make sure to add PDE UI as an optional dependency and also make sure the check  in PDERuntimePlugin.HAS_IDE_BUNDLES includes PDE UI.
Comment 8 Willian Mitsuda CLA 2007-11-14 16:45:17 EST
Created attachment 82913 [details]
Proposed patch
Comment 9 Willian Mitsuda CLA 2007-11-14 16:45:22 EST
Created attachment 82914 [details]
mylyn/context/zip
Comment 10 Chris Aniszczyk CLA 2007-11-14 16:46:44 EST
Thanks Willian, will look at this for 3.4M4 inclusion.
Comment 11 Chris Aniszczyk CLA 2007-11-15 15:12:20 EST
Thanks Willian. I made a few small changes and released the patch into HEAD.
Comment 12 Willian Mitsuda CLA 2007-11-15 15:15:09 EST
Good! Thanks for your help, Chris!
Comment 13 Brian Bauman CLA 2007-12-11 12:38:27 EST
verified on I20071211-0010