Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370536 - Creating a product for a plugin -> Extension tab is still empty until editor is closed an re-opened
Summary: Creating a product for a plugin -> Extension tab is still empty until editor ...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 major with 2 votes (vote)
Target Milestone: 3.8 M7   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 05:11 EST by Lars Vogel CLA
Modified: 2012-05-09 10:32 EDT (History)
10 users (show)

See Also:


Attachments
Project for bugreport (2.08 KB, application/zip)
2012-04-04 09:24 EDT, Lars Vogel CLA
no flags Details
Picture (41.16 KB, image/png)
2012-04-04 10:13 EDT, Dani Megert CLA
no flags Details
TestScript (350.34 KB, application/vnd.oasis.opendocument.text)
2012-04-04 10:25 EDT, Lars Vogel CLA
no flags Details
TestScript as PDF in case odt does not work for someone (336.40 KB, application/pdf)
2012-04-04 10:26 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2012-02-03 05:11:35 EST
If I create a plug-in without extensions and add a product to it, this action will create the plugin.xml file and add a contribution to the "org.eclipse.core.runtime.products" extension point.

If I had the MANIFEST.MF editor open and if I switch the Extension tab, this tab appears empty

Error:

I have to close and reopen the the editor to see the new extension.

How-to reproduce:

I have created a detailed descrition how to reproduce this.

First create a plug-in as described here: http://www.vogella.de/articles/Eclipse4RCP/article.html#e4_plugin

Aftrwards perform the following: http://www.vogella.de/articles/Eclipse4RCP/article.html#plugin_creatinge4

Stop after the "Create Product configuration" step and validate that the extension point is not visible.
Comment 1 Curtis Windatt CLA 2012-02-03 09:57:09 EST
I've ended up in cases where the manifest editor is open without any extension tabs at all. Then once the plugin.xml is created, double clicking on it will only open the existing manifest editor with no extension tabs.  Definitely annoying.
Comment 2 Lars Vogel CLA 2012-02-03 10:00:26 EST
@Curtis, thanks for the confirmation of this behavior. 

Especially as this way is not more likely to happen as its the standard way to convert a plug-in into an Eclipse 4 application.
Comment 3 Lars Vogel CLA 2012-04-04 06:31:02 EDT
This happens every time you create an Eclipse 4 application from scratch. I think the priority of this bug should be increased as this might affect the Eclipse 4 adapter. 

To reproduce this please follow the following description:http://www.vogella.de/articles/Eclipse4RCP/article.html#plugin_creatinge4

This setup only takes a few minutes. I think the problem is if the plugin.xml does not contain extension and the product creates the extension the plugin.xml editor does not see this change.
Comment 4 Dani Megert CLA 2012-04-04 06:55:58 EDT
Lars, is this a regression compared to 4.1? Does it work in 3.7.2?
Comment 5 Lars Vogel CLA 2012-04-04 07:02:24 EDT
Hi Dani,

no, in Eclipse 3.7 its the same behavior. 

But you rarely see this issue, as the process of creating applications is different, you usually don't have an empty plugin.xml before creating the "org.eclipse.core.runtime.products" extension point via the product configuration file.

You might want to lower the priority if my classification was incorrect. I think that one will affect almost everyone how creates an Eclipse 4 RCP app but I'm not really familiar with the bug classification approach in Bugzilla.

Best regards, Lars
Comment 6 Dani Megert CLA 2012-04-04 09:17:25 EDT
(In reply to comment #5)
Lars, steps/examples from comment 0 and comment 3 start at different locations. Could you attach a starting point/project and then the steps to reproduce the problem? That would simplify it on our side.
Comment 7 Lars Vogel CLA 2012-04-04 09:24:39 EDT
Created attachment 213578 [details]
Project for bugreport
Comment 8 Lars Vogel CLA 2012-04-04 09:35:17 EDT
Sorry, attached project does NOT work.

Here is a simple way to reproduce it:

1.) Create new (simple) plug-in (no activator, not an RCP, no contribution to the UI)
2.) Right mouse click on project -> Create product configuration with basic settings. File name "todo.product"
3.) In the "Product Definition" on the "Overview" tab press new. Enter "todo" as name, Product ID: "product" and select "org.eclipse.e4.ui.workbench.swt.E4Application" as application.

Press Finish and open the "MANIFEST.MF", tab "Extensions". It is empty. Open "plugin.xml" in a text editor and validate that the file contains entries.
Comment 9 Dani Megert CLA 2012-04-04 10:13:27 EDT
(In reply to comment #8)
> Sorry, attached project does NOT work.
> 
> Here is a simple way to reproduce it:
> 
> 1.) Create new (simple) plug-in (no activator, not an RCP, no contribution to
> the UI)
> 2.) Right mouse click on project -> Create product configuration with basic
> settings. File name "todo.product"
> 3.) In the "Product Definition" on the "Overview" tab press new. Enter "todo"
> as name, Product ID: "product" and select
> "org.eclipse.e4.ui.workbench.swt.E4Application" as application.
> 
> Press Finish and open the "MANIFEST.MF", tab "Extensions". It is empty. Open
> "plugin.xml" in a text editor and validate that the file contains entries.


I followed your steps using 3.8 M6 and latest 4.2 build and to me it seems to work (or we're talking about a different bug). Even without saving after step 3, I see the extensions. See attached picture. Did I not get the point?
Comment 10 Dani Megert CLA 2012-04-04 10:13:52 EDT
Created attachment 213582 [details]
Picture
Comment 11 Lars Vogel CLA 2012-04-04 10:24:48 EDT
Thanks Dani for testing. Strange, I can easily reproduce that with Eclipse 4.2M6.

I have created a small step to step description (attached ad .odf and pdf). I never pressed Ctrl+S in the whole process.
Comment 12 Lars Vogel CLA 2012-04-04 10:25:20 EDT
Created attachment 213583 [details]
TestScript
Comment 13 Lars Vogel CLA 2012-04-04 10:26:01 EDT
Created attachment 213584 [details]
TestScript as PDF in case odt does not work for someone
Comment 14 Dani Megert CLA 2012-04-04 11:24:57 EDT
OK, I can reproduce now. The key is that the manifest editor must already be open, otherwise all works fine.
Comment 16 Lars Vogel CLA 2012-04-04 15:25:30 EDT
Awesome. Thanks Dani!
Comment 17 Curtis Windatt CLA 2012-05-08 14:23:27 EDT
Testing on I20120503-1800 Ubuntu, the plugin.xml tab is added to the editor correctly, but the extensions and extension points tabs are not.  Closing and reopening the editor solves the issue.
Comment 18 Dani Megert CLA 2012-05-09 06:56:21 EDT
(In reply to comment #17)
> Testing on I20120503-1800 Ubuntu, the plugin.xml tab is added to the editor
> correctly, but the extensions and extension points tabs are not.  Closing and
> reopening the editor solves the issue.

I'm not able to open the Manifest editor without getting the 'Extensions' and 'Extension Points' tab. Even if I open a completely empty 'MANIFEST.MF'. I think the original bug, namely the missing 'plugin.xml' tab and the entry in the 'Extensions' tab, is fixed.

Please file a new bug with exact steps to reproduce if it doesn't work for you.
Comment 19 Lars Vogel CLA 2012-05-09 06:59:46 EDT
I'm also unable to reproduce this issue any more on Ubuntu 11.10. I agree with Dani, "my" bug seem to be fixed.
Comment 20 Lars Vogel CLA 2012-05-09 07:01:38 EDT
FYI - Also my currently running Eclipse 4 with M7 training (12 people), I have not seen this issue. :-)
Comment 21 Dani Megert CLA 2012-05-09 07:04:33 EDT
Thanks for the feedback Lars!
Comment 22 Lars Vogel CLA 2012-05-09 07:09:26 EDT
Thanks for the fix, Dani!
Comment 23 Curtis Windatt CLA 2012-05-09 10:32:07 EDT
(In reply to comment #18)
> (In reply to comment #17)
> > Testing on I20120503-1800 Ubuntu, the plugin.xml tab is added to the editor
> > correctly, but the extensions and extension points tabs are not.  Closing and
> > reopening the editor solves the issue.
> 
> I'm not able to open the Manifest editor without getting the 'Extensions' and
> 'Extension Points' tab. Even if I open a completely empty 'MANIFEST.MF'. I
> think the original bug, namely the missing 'plugin.xml' tab and the entry in
> the 'Extensions' tab, is fixed.
> 
> Please file a new bug with exact steps to reproduce if it doesn't work for you.

The reason why my behaviour is different is that I am starting with an OSGi bundle project, not a plug-in project (select OSGi Framework: Equinox in the new wizard).  This turns off the project property 'always show extensions/extension points tabs'.  When the product is created, the plugin.xml tab is added to the editor, but not the extensions tabs.

While I find the plugin.xml tab showing up a little odd, I don't think it warrants a new bug as a product developer shouldn't be creating a non-plugin project.

I agree the original bug is fixed.