summaryrefslogtreecommitdiffstats
path: root/theme-compiler
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-10-01 11:28:38 +0300
committerMarc Englund <marc@vaadin.com>2012-10-01 11:28:38 +0300
commitd2db8f9054376b9b817f170426ef6a9f27990b0f (patch)
treed963a73ef5dd2eab335b3a146d871511bf14af1d /theme-compiler
parentd2d5bace48009de6e2ad46a9c73ce367eecd9bf1 (diff)
parentea179b1a676a12d153878860a74055fac5dc6922 (diff)
downloadvaadin-framework-d2db8f9054376b9b817f170426ef6a9f27990b0f.tar.gz
vaadin-framework-d2db8f9054376b9b817f170426ef6a9f27990b0f.zip
Merge branch 'master' into sass
Conflicts: WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java
Diffstat (limited to 'theme-compiler')
-rw-r--r--theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java1
-rw-r--r--theme-compiler/src/com/vaadin/sass/tree/VariableNode.java2
-rw-r--r--theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java5
-rw-r--r--theme-compiler/src/com/vaadin/sass/util/ColorUtil.java30
4 files changed, 16 insertions, 22 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java
index 626969b827..f9778af419 100644
--- a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java
+++ b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java
@@ -197,6 +197,7 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler {
property(name, (LexicalUnitImpl) value, important, null);
}
+ @Override
public void property(String name, LexicalUnitImpl value, boolean important,
String comment) {
RuleNode node = new RuleNode(name, value, important, comment);
diff --git a/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java b/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java
index d18ff54138..8c360c4a56 100644
--- a/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java
+++ b/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java
@@ -71,7 +71,7 @@ public class VariableNode extends Node implements IVariableNode {
@Override
public void replaceVariables(ArrayList<VariableNode> variables) {
for (final VariableNode node : variables) {
- if (!this.equals(node)) {
+ if (!equals(node)) {
if (name.equals(node.getName())) {
expr = (LexicalUnitImpl) DeepCopy.copy(node.getExpr());
diff --git a/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java b/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java
index f75d5ed7b5..cb209273cb 100644
--- a/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java
+++ b/theme-compiler/src/com/vaadin/sass/tree/controldirective/EachDefNode.java
@@ -67,7 +67,7 @@ public class EachDefNode extends Node implements IVariableNode {
for (final VariableNode var : variables) {
if (listVariable.equals(var.getName())) {
- LexicalUnitImpl current = (LexicalUnitImpl) var.getExpr();
+ LexicalUnitImpl current = var.getExpr();
list = new ArrayList<String>();
while (current != null) {
@@ -75,8 +75,7 @@ public class EachDefNode extends Node implements IVariableNode {
&& current.getLexicalUnitType() != LexicalUnitImpl.SAC_OPERATOR_COMMA) {
list.add(current.getValue().toString());
}
- current = (LexicalUnitImpl) current
- .getNextLexicalUnit();
+ current = current.getNextLexicalUnit();
}
listVariable = null;
break;
diff --git a/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java b/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java
index 25e29ff9a2..7377b202ab 100644
--- a/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java
+++ b/theme-compiler/src/com/vaadin/sass/util/ColorUtil.java
@@ -40,12 +40,11 @@ public class ColorUtil {
LexicalUnitImpl hslParams = createHslParameters(hsl[0], hsl[1], hsl[2],
hexColor.getLineNumber(), hexColor.getColumnNumber(),
- (LexicalUnitImpl) hexColor.getPreviousLexicalUnit());
+ hexColor.getPreviousLexicalUnit());
return LexicalUnitImpl.createFunction(hexColor.getLineNumber(),
- hexColor.getColumnNumber(),
- (LexicalUnitImpl) hexColor.getPreviousLexicalUnit(), "hsl",
- hslParams);
+ hexColor.getColumnNumber(), hexColor.getPreviousLexicalUnit(),
+ "hsl", hslParams);
}
public static LexicalUnitImpl hslToHexColor(LexicalUnitImpl hsl, int lengh) {
@@ -64,8 +63,7 @@ public class ColorUtil {
builder.append(color);
}
return LexicalUnitImpl.createIdent(hsl.getLineNumber(),
- hsl.getColumnNumber(),
- (LexicalUnitImpl) hsl.getPreviousLexicalUnit(),
+ hsl.getColumnNumber(), hsl.getPreviousLexicalUnit(),
builder.toString());
}
@@ -90,7 +88,7 @@ public class ColorUtil {
case 3:
break;
}
- hslParam = (LexicalUnitImpl) hslParam.getNextLexicalUnit();
+ hslParam = hslParam.getNextLexicalUnit();
i++;
}
float h = ((hue.getIntegerValue() % 360) + 360) % 360 / 360f;
@@ -127,7 +125,7 @@ public class ColorUtil {
case 3:
break;
}
- rgbParam = (LexicalUnitImpl) rgbParam.getNextLexicalUnit();
+ rgbParam = rgbParam.getNextLexicalUnit();
i++;
}
@@ -138,11 +136,10 @@ public class ColorUtil {
LexicalUnitImpl hslParams = createHslParameters(hsl[0], hsl[1], hsl[2],
rgbParam.getLineNumber(), rgbParam.getColumnNumber(),
- (LexicalUnitImpl) rgbParam.getPreviousLexicalUnit());
+ rgbParam.getPreviousLexicalUnit());
return LexicalUnitImpl.createFunction(rgb.getLineNumber(),
- rgb.getColumnNumber(),
- (LexicalUnitImpl) rgb.getPreviousLexicalUnit(), "hsl",
+ rgb.getColumnNumber(), rgb.getPreviousLexicalUnit(), "hsl",
hslParams);
}
@@ -192,11 +189,10 @@ public class ColorUtil {
LexicalUnitImpl hslParam = hsl.getParameters();
LexicalUnitImpl rgbParams = createRgbParameters(rgb[0], rgb[1], rgb[2],
hslParam.getLineNumber(), hslParam.getColumnNumber(),
- (LexicalUnitImpl) hslParam.getPreviousLexicalUnit());
+ hslParam.getPreviousLexicalUnit());
return LexicalUnitImpl.createFunction(hsl.getLineNumber(),
- hsl.getColumnNumber(),
- (LexicalUnitImpl) hsl.getPreviousLexicalUnit(), "rgb",
+ hsl.getColumnNumber(), hsl.getPreviousLexicalUnit(), "rgb",
rgbParams);
}
@@ -246,8 +242,7 @@ public class ColorUtil {
public static LexicalUnitImpl darken(LexicalUnitImpl darkenFunc) {
LexicalUnitImpl color = darkenFunc.getParameters();
float amount = getAmountValue(color);
- LexicalUnitImpl pre = (LexicalUnitImpl) darkenFunc
- .getPreviousLexicalUnit();
+ LexicalUnitImpl pre = darkenFunc.getPreviousLexicalUnit();
return adjust(color, amount, ColorOperation.Darken, pre);
}
@@ -293,8 +288,7 @@ public class ColorUtil {
public static LexicalUnitImpl lighten(LexicalUnitImpl lightenFunc) {
LexicalUnitImpl color = lightenFunc.getParameters();
float amount = getAmountValue(color);
- LexicalUnitImpl pre = (LexicalUnitImpl) lightenFunc
- .getPreviousLexicalUnit();
+ LexicalUnitImpl pre = lightenFunc.getPreviousLexicalUnit();
return adjust(color, amount, ColorOperation.Lighten, pre);
}