Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353260 - Move away from using hints (part 1)
Summary: Move away from using hints (part 1)
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-07-27 19:38 EDT by Konstantin Komissarchik CLA
Modified: 2021-11-19 09:21 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Komissarchik CLA 2011-07-27 19:38:51 EDT
Using a generic bag of hints in sdef language to control important aspects of presentation hurts usability. It would be desirable to move away from using hints in favor of explicit properties. This is part 1 of that work. Also included here is general cleanup of API inconsistency issues.

Covered hints:

show.label
show.label.above
width
height
margin.left

===================

The original "show.label = false" semantic was both to remove the label and cause the property editor body to stretch across both columns. In the new syntax, those two aspects are handled by separate switches. As such the following are equivalent:

<hint>
    <name>show.label</name>
    <value>false</value>
</hint>

<show-label>false</show-label>
<span>true</span>

The new span property has the semantics of forcing the label above the property editor body, so a separate property for the old show.label.above hint is not required. The following are equivalent:

<hint>
    <name>show.label.above</name>
    <value>true</value>
</hint>

<span>true</span>

===================

The width and height hints are used for both property editors and composites, but with different units. In particular, the height hint in the context of a property editor was interpreted as 1 = 15 pixels. This inconsistency should be resolved by making all usage (regardless of context) be pixel based.

For instance, the following are equivalent:

<hint>
    <name>height</name>
    <value>5</value>
</hint>

<height>75</height>  // 5 * 15 (only for property editor)

===================

The margin.left hint used unit suffixes "px" (for pixel) and "u" (for unit - 20 pixels). This system should be dropped in favor of a basic number of pixels used elsewhere.

The following are equivalent:

<hint>
    <name>margin.left</name>
    <value>1u</value>
</hint>

<margin-left>20</margin-left>

===================
Comment 1 Konstantin Komissarchik CLA 2011-07-27 20:15:04 EDT
Implemented.
Comment 2 Shenxue Zhou CLA 2011-11-28 16:41:26 EST
Verified the new properties using the purchase order sample. Used sdef editor. Closing.