Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351984

Summary: Product editor should reject product files that it cannot handle
Product: [Eclipse Project] PDE Reporter: Holger Oehm <holger.oehm>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, mariya.yordanova, t-oberlies
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 325622    
Attachments:
Description Flags
Reject product files that contain the attribute contentType on the top level node product.
none
Reject product files that contain the attribute "type" on the top level node product none

Description Holger Oehm CLA 2011-07-13 10:52:11 EDT
Build Identifier: I20110613-1736

The solution for bug 325622 would introduce a new attribute "contentType" for *.product files. Currently the product editor would overwrite product files that contain this attribute. Bug 325614 request proper handling for this new attribute. 
A minimal solution could be to just reject to open the editor for product files that contain the attribute "contentType".

Reproducible: Always

Steps to Reproduce:
1. Edit a example.product file with the text editor and add the attribute contentType="mixed" to the top level element product.
2. Open the example.product with the product editor.
3. Change something in the product editor to make it dirty and save it.
4. Look at the file contents in the text editor: The attribute contentType="mixed" has been deleted.
Comment 1 Holger Oehm CLA 2011-07-13 10:56:45 EDT
Created attachment 199591 [details]
Reject product files that contain the attribute contentType on the top level node product.

The patch also makes the editor to refuse to open files that it cannot parse.
Comment 2 Curtis Windatt CLA 2011-07-18 17:20:31 EDT
We will try to look at this early in 3.8, but there are a lot of other priorities at the moment.
Comment 3 Holger Oehm CLA 2011-07-20 07:18:12 EDT
Created attachment 199975 [details]
Reject product files that contain the attribute "type" on the top level node product

Renamed the attribute from "contentType" to "type" (as was proposed in 325622) and improved the error message.
Comment 4 Tobias Oberlies CLA 2011-07-22 03:30:02 EDT
(In reply to comment #3)
> Created attachment 199975 [details]
I've seen the patched product editor - the patch is a great improvement!
Comment 5 Tobias Oberlies CLA 2011-07-22 11:01:13 EDT
(In reply to comment #2)
> We will try to look at this early in 3.8, but there are a lot of other
> priorities at the moment.

This would be very much appreciated. The p2 publishers in version M1 will support a "type" attribute in product definitions (see bug 325622) - and while there is no full support for this yet in the editor (cf bug 325614), we should be nice and tell people who want to use the "type" attribute that they can't use the editor.

The warning is what is being introduced with the patch. As a side effect, the product editor also rejects files which are malformed XML instead of opening empty. IMHO just for this, it is worth accepting the patch.
Comment 6 Eclipse Genie CLA 2019-08-25 13:09:38 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.