Bug 192329 - [Schema][Editors] "Translatable" field should be disabled if the element specifies element content
Summary: [Schema][Editors] "Translatable" field should be disabled if the element spec...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-06-13 00:34 EDT by Mike Pawlowski CLA
Modified: 2007-07-12 09:38 EDT (History)
1 user (show)

See Also:
mike.pawlowski: review+


Attachments
patch (1.86 KB, patch)
2007-07-11 16:16 EDT, Adam Archer CLA
mike.pawlowski: review+
Details | Diff
patch that meets the additional requirement in comment 3 (1.72 KB, patch)
2007-07-12 00:10 EDT, Adam Archer CLA
mike.pawlowski: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Pawlowski CLA 2007-06-13 00:34:04 EDT
PDE allows an element to declare either element content or character content; but,
not mixed content (both element and character content).

Element content is declared for an element by specifying compositors and element references (children) on it.

Character content is declared for an element by NOT specifying any compositors or element references (no children) on it.

The "Translatable" field in the "Element Details" section should be disabled (and false) if the element specifies element content.

If any children are added to an element, then the field should be disabled and set to false.

If all children are removed from an element, then the field should be enabled.
Comment 1 Adam Archer CLA 2007-07-11 16:16:02 EDT
Created attachment 73600 [details]
patch
Comment 2 Mike Pawlowski CLA 2007-07-11 18:39:45 EDT
Comment on attachment 73600 [details]
patch

Great patch, Adam.  Thanks.
Comment 3 Mike Pawlowski CLA 2007-07-11 18:45:40 EDT
Patch applied to HEAD.

Target:  3.4 M1

Adam, I just realized I forgot a requirement in Comment # 0:

If an element defines an attribute then the field should be disabled and
set to false as well.

If all children and attributes are removed from an element, then the field should be enabled.

So, essentially the field should be enabled only when the DTD approximation is (#PCDATA).

Sorry about that.
Comment 4 Adam Archer CLA 2007-07-12 00:10:56 EDT
Created attachment 73623 [details]
patch that meets the additional requirement in comment 3
Comment 5 Mike Pawlowski CLA 2007-07-12 09:37:31 EDT
Comment on attachment 73623 [details]
patch that meets the additional requirement in comment 3

Thanks Adam.
Comment 6 Mike Pawlowski CLA 2007-07-12 09:38:18 EDT
Patch applied to HEAD.