Change-Id: I5f6c6c1cdbd1a5e2d5e070ca377da62e0d2af6a4
String prefix;
String postfix;
String prefix;
String postfix;
ColorDescriptor foregroundColor;
ColorDescriptor backgroundColor;
int style;
public ConstantLabelDecorationRule(String format,
ColorDescriptor foregroundColor, ColorDescriptor backgroundColor,
ColorDescriptor foregroundColor;
ColorDescriptor backgroundColor;
int style;
public ConstantLabelDecorationRule(String format,
ColorDescriptor foregroundColor, ColorDescriptor backgroundColor,
+ String style, String column) {
if(format != null) {
String[] split = format.split("%s", 2);
if(split.length == 1) {
if(format != null) {
String[] split = format.split("%s", 2);
if(split.length == 1) {
}
this.foregroundColor = foregroundColor;
this.backgroundColor = backgroundColor;
}
this.foregroundColor = foregroundColor;
this.backgroundColor = backgroundColor;
this.style = SWT.NORMAL;
if(style != null)
for(char c : style.toCharArray())
this.style = SWT.NORMAL;
if(style != null)
for(char c : style.toCharArray())
ColorDescriptor backgroundColor = getPossibleRelatedColor(g, r, vr.ConstantLabelDecorationRule_HasBackgroundColor);
String style = g.getPossibleRelatedValue(r, vr.ConstantLabelDecorationRule_HasStyle, Bindings.STRING);
ColorDescriptor backgroundColor = getPossibleRelatedColor(g, r, vr.ConstantLabelDecorationRule_HasBackgroundColor);
String style = g.getPossibleRelatedValue(r, vr.ConstantLabelDecorationRule_HasStyle, Bindings.STRING);
+ String column = g.getPossibleRelatedValue(r, vr.ConstantLabelDecorationRule_HasColumn, Bindings.STRING);
return new ConstantLabelDecorationRule(
format,
foregroundColor,
backgroundColor,
return new ConstantLabelDecorationRule(
format,
foregroundColor,
backgroundColor,
@Override
public String decorateLabel(String label, String column, int itemIndex) {
@Override
public String decorateLabel(String label, String column, int itemIndex) {
+ if(this.column != null)
+ if(!this.column.equals(column))
+ return label;
if(postfix == null)
return label;
else
if(postfix == null)
return label;
else
@SuppressWarnings("unchecked")
public <Color> Color decorateForeground(Color color, String column, int itemIndex) {
@SuppressWarnings("unchecked")
public <Color> Color decorateForeground(Color color, String column, int itemIndex) {
+ if(this.column != null)
+ if(!this.column.equals(column))
+ return color;
if(foregroundColor == null)
return color;
else
if(foregroundColor == null)
return color;
else
@SuppressWarnings("unchecked")
public <Color> Color decorateBackground(Color color, String column, int itemIndex) {
@SuppressWarnings("unchecked")
public <Color> Color decorateBackground(Color color, String column, int itemIndex) {
+ if(this.column != null)
+ if(!this.column.equals(column))
+ return color;
if(backgroundColor == null)
return color;
else
if(backgroundColor == null)
return color;
else
@SuppressWarnings("unchecked")
public <Font> Font decorateFont(Font font, String column, int itemIndex) {
@SuppressWarnings("unchecked")
public <Font> Font decorateFont(Font font, String column, int itemIndex) {
+ if(this.column != null)
+ if(!this.column.equals(column))
+ return font;
if(style == 0)
return font;
else {
if(style == 0)
return font;
else {
VP.ConstantLabelDecorationRule.HasStyle <R L0.HasProperty : L0.FunctionalRelation
L0.HasDomain VP.ConstantLabelDecorationRule
L0.HasRange L0.String
VP.ConstantLabelDecorationRule.HasStyle <R L0.HasProperty : L0.FunctionalRelation
L0.HasDomain VP.ConstantLabelDecorationRule
L0.HasRange L0.String
+VP.ConstantLabelDecorationRule.HasColumn <R L0.HasProperty : L0.FunctionalRelation
+ L0.HasDomain VP.ConstantLabelDecorationRule
+ L0.HasRange L0.String
VP.FlatNodeRule : VP.VisualsRule
VP.FlatNodeRule : VP.VisualsRule