Thursday, November 6, 2014

Announcing Sapphire 8.1 Release

On behalf of all who contributed, I am very proud to announce the availability of the Sapphire 8.1 release. This releases includes lazy loading of editor pages, an improvement to drag-n-drop in forms and all of the bug fixes from the 8.0.2 release.

Announcing Sapphire 8.0.2 Release

On behalf of all who contributed, I am very proud to announce the availability of the Sapphire 8.0.2 release.

Thursday, June 26, 2014

Announcing Sapphire 8 Release

On behalf of all who contributed, I am very proud to announce the availability of the Sapphire 8 release. With this release, Sapphire has exited incubation and is considered a mature project by Eclipse Foundation. Everyone involved with the project should be very proud of what we have accomplished in the last few years.

Enhancements
Migration Guide
Developer Guide
Downloads

Thursday, April 10, 2014

Wednesday, March 26, 2014

Java Language Puzzle 4

How does one access the Class object associated with a primitive type? This can be necessary when using reflection.

Wednesday, March 19, 2014

Sapphire 8 : Outline Decorations

Multiple text decorations can now be added to the nodes in the master-details editor page outline in order to show additional information in a way that is set apart from the main node label.

OutlineDecorations

A definition of a text decoration is composed of text and an optional color. Both of these properties support Sapphire EL. When text is null, the decoration is not shown. Multiple decorations can be specified for one node.

<node-factory>
    <property>Categories</property>
    <case>
        <label>${ Name == null ? "Uncategorized" : Name }</label>
        <text-decoration>
            <text>${ ( Items.Size == 0 ? null : Concat( "(", Items.Size, ")" ) ) }</text>
        </text-decoration>
    </case>
</node-factory>

The framework API has changed accordingly.

@Label( standard = "text decoration" )
@XmlBinding( path = "text-decoration" )

public interface TextDecorationDef extends Element
{
    ElementType TYPE = new ElementType( TextDecorationDef.class );
    
    // *** Text ***
    
    @Type( base = Function.class )
    @Label( standard = "text" )
    @Required
    @XmlBinding( path = "text" )
    
    ValueProperty PROP_TEXT = new ValueProperty( TYPE, "Text" );
    
    Value<Function> getText();
    void setText( String value );
    void setText( Function value );
    
    // *** Color ***
    
    @Type( base = Function.class )
    @Label( standard = "color" )
    @DefaultValue( text = "#957D47")
    @XmlBinding( path = "color" )
    
    ValueProperty PROP_COLOR = new ValueProperty( TYPE, "Color" );
    
    Value<Function> getColor();
    void setColor( String value );
    void setColor( Function value );
}
public interface MasterDetailsContentNodeDef
{
    // *** Decorations ***
    
    @Type( base = TextDecorationDef.class )
    @Label( standard = "decorations" )
    @XmlListBinding( path = "" )
    
    ListProperty PROP_DECORATIONS = new ListProperty( TYPE, "Decorations" );
    
    ElementList<TextDecorationDef> getDecorations();
}
public final class TextDecoration
{
    public String text()
    public Color color()
}
public final class MasterDetailsContentNodePart
{
    public List<TextDecoration> decorations()
}

Friday, March 7, 2014

Sapphire 8 : Check Box Group

Sapphire already includes a slush bucket and a check box list presentation alternatives for a possible values list.

SlushBucket

CheckBoxList

However, in some cases where the set of possible values is known to always be small, a more compact presentation is desired. The new check box group presentation fills this need.

The check boxes can be arranged either horizontally or vertically.

CheckBoxGroup-Horizontal-1

CheckBoxGroup-Vertical-1

The presentation will utilize ValueImageService and ValueLabelService, if present on the list entry's value property. The services must be attached to the value property's global service context.

CheckBoxGroup-Horizontal-2

CheckBoxGroup-Vertical-2

Applicability

  1. The property is a list property
  2. The list property has a PossibleValuesService
  3. There is exactly one possible member type
  4. The member type has exactly one property and that property is a value property
  5. The value property has @Unique annotation

Automatic Activation

This presentation does not activate automatically.

Manual Activation

The following style codes will activate this presentation as long as the applicability conditions are met.

  • Sapphire.PropertyEditor.CheckBoxGroup - produces horizontal presentation
  • Sapphire.PropertyEditor.CheckBoxGroup.Horizontal
  • Sapphire.PropertyEditor.CheckBoxGroup.Vertical
<property-editor>
    <property>Colors</property>
    <style>Sapphire.PropertyEditor.CheckBoxGroup.Vertical</style>
</property-editor>