Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351984 - Product editor should reject product files that it cannot handle
Summary: Product editor should reject product files that it cannot handle
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 325622
  Show dependency tree
 
Reported: 2011-07-13 10:52 EDT by Holger Oehm CLA
Modified: 2019-08-25 13:09 EDT (History)
3 users (show)

See Also:


Attachments
Reject product files that contain the attribute contentType on the top level node product. (5.97 KB, patch)
2011-07-13 10:56 EDT, Holger Oehm CLA
no flags Details | Diff
Reject product files that contain the attribute "type" on the top level node product (5.99 KB, patch)
2011-07-20 07:18 EDT, Holger Oehm CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.