diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-30 17:02:08 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-30 17:02:08 +0300 |
commit | 8941056349e302e687e40e94c13709e75f256d73 (patch) | |
tree | 34e0d95656ddb607792c849a203c4da6ead06421 /sass | |
parent | c6112a24777ce7f6b708039e16909ed939014ca4 (diff) | |
download | vaadin-framework-8941056349e302e687e40e94c13709e75f256d73.tar.gz vaadin-framework-8941056349e302e687e40e94c13709e75f256d73.zip |
Reformatted project
Diffstat (limited to 'sass')
-rw-r--r-- | sass/src/com/vaadin/sass/parser/LocatorImpl.java | 120 | ||||
-rw-r--r-- | sass/src/com/vaadin/sass/resolver/ScssStylesheetResolver.java | 9 | ||||
-rw-r--r-- | sass/src/com/vaadin/sass/tree/BlockNode.java | 6 | ||||
-rw-r--r-- | sass/src/com/vaadin/sass/util/DeepCopy.java | 34 |
4 files changed, 83 insertions, 86 deletions
diff --git a/sass/src/com/vaadin/sass/parser/LocatorImpl.java b/sass/src/com/vaadin/sass/parser/LocatorImpl.java index 77e7543061..d481459f17 100644 --- a/sass/src/com/vaadin/sass/parser/LocatorImpl.java +++ b/sass/src/com/vaadin/sass/parser/LocatorImpl.java @@ -12,119 +12,117 @@ import org.w3c.css.sac.Locator; /** * @version $Revision: 1.2 $ - * @author Philippe Le Hegaret + * @author Philippe Le Hegaret */ public class LocatorImpl implements Locator { // W3C DEBUG mode private static boolean W3CDebug; static { - try { - W3CDebug = (Boolean.getBoolean("debug") - || Boolean.getBoolean("org.w3c.flute.parser.LocatorImpl.debug") - || Boolean.getBoolean("org.w3c.flute.parser.debug") - || Boolean.getBoolean("org.w3c.flute.debug") - || Boolean.getBoolean("org.w3c.debug") - || Boolean.getBoolean("org.debug")); - } catch (Exception e) { - // nothing - } + try { + W3CDebug = (Boolean.getBoolean("debug") + || Boolean + .getBoolean("org.w3c.flute.parser.LocatorImpl.debug") + || Boolean.getBoolean("org.w3c.flute.parser.debug") + || Boolean.getBoolean("org.w3c.flute.debug") + || Boolean.getBoolean("org.w3c.debug") || Boolean + .getBoolean("org.debug")); + } catch (Exception e) { + // nothing + } } - + String uri; - int line; - int column; + int line; + int column; public String getURI() { - return uri; + return uri; } public int getLineNumber() { - return line; + return line; } public int getColumnNumber() { - return column; + return column; } /** * Creates a new LocatorImpl */ public LocatorImpl(Parser p) { - if (W3CDebug) { - System.err.println( "LocatorImpl::newLocator(" + p + ");"); - } + if (W3CDebug) { + System.err.println("LocatorImpl::newLocator(" + p + ");"); + } uri = p.source.getURI(); - line = p.token.beginLine; - column = p.token.beginColumn; + line = p.token.beginLine; + column = p.token.beginColumn; } - + /** * Reinitializes a LocatorImpl */ public LocatorImpl(Parser p, Token tok) { - if (W3CDebug) { - System.err.println( "LocatorImpl::newLocator(" + p - + ", " + tok + ");"); - } + if (W3CDebug) { + System.err.println("LocatorImpl::newLocator(" + p + ", " + tok + + ");"); + } uri = p.source.getURI(); - line = tok.beginLine; - column = tok.beginColumn; + line = tok.beginLine; + column = tok.beginColumn; } - + /** * Reinitializes a LocatorImpl */ public LocatorImpl(Parser p, int line, int column) { - if (W3CDebug) { - System.err.println( "LocatorImpl::newLocator(" + p - + ", " + line - + ", " + column + ");"); - } + if (W3CDebug) { + System.err.println("LocatorImpl::newLocator(" + p + ", " + line + + ", " + column + ");"); + } uri = p.source.getURI(); - this.line = line; - this.column = column; + this.line = line; + this.column = column; } - + /** * Reinitializes a LocatorImpl */ public LocatorImpl reInit(Parser p) { - if (W3CDebug) { - System.err.println( "LocatorImpl::reInit(" + p + ");" ); - } + if (W3CDebug) { + System.err.println("LocatorImpl::reInit(" + p + ");"); + } uri = p.source.getURI(); - line = p.token.beginLine; - column = p.token.beginColumn; - return this; + line = p.token.beginLine; + column = p.token.beginColumn; + return this; } - + /** * Reinitializes a LocatorImpl */ public LocatorImpl reInit(Parser p, Token tok) { - if (W3CDebug) { - System.err.println( "LocatorImpl::reInit(" + p - + ", " + tok + ");"); - } + if (W3CDebug) { + System.err.println("LocatorImpl::reInit(" + p + ", " + tok + ");"); + } uri = p.source.getURI(); - line = tok.beginLine; - column = tok.beginColumn; - return this; + line = tok.beginLine; + column = tok.beginColumn; + return this; } - + /** * Reinitializes a LocatorImpl */ public LocatorImpl reInit(Parser p, int line, int column) { - if (W3CDebug) { - System.err.println("LocatorImpl::reInit(" + p - + ", " + line - + ", " + column + ");"); - } + if (W3CDebug) { + System.err.println("LocatorImpl::reInit(" + p + ", " + line + ", " + + column + ");"); + } uri = p.source.getURI(); - this.line = line; - this.column = column; - return this; + this.line = line; + this.column = column; + return this; } } diff --git a/sass/src/com/vaadin/sass/resolver/ScssStylesheetResolver.java b/sass/src/com/vaadin/sass/resolver/ScssStylesheetResolver.java index acb17612b3..c3b0e75979 100644 --- a/sass/src/com/vaadin/sass/resolver/ScssStylesheetResolver.java +++ b/sass/src/com/vaadin/sass/resolver/ScssStylesheetResolver.java @@ -4,17 +4,16 @@ import org.w3c.css.sac.InputSource; public interface ScssStylesheetResolver { /** - * Called with the "identifier" of a stylesheet that the resolver should - * try to find. The identifier is basically a filename, like "runo.scss" - * or "addon/styles.scss", but might exclude ".scss". The resolver must + * Called with the "identifier" of a stylesheet that the resolver should try + * to find. The identifier is basically a filename, like "runo.scss" or + * "addon/styles.scss", but might exclude ".scss". The resolver must * {@link InputSource#setURI(String)} to the final location where the * stylesheet was found, e.g "runo.scss" might result in a URI like * "VAADIN/themes/runo/runo.scss". * * @param identifier * used fo find stylesheet - * @return InputSource for stylesheet (with URI set) or null if not - * found + * @return InputSource for stylesheet (with URI set) or null if not found */ public InputSource resolve(String identifier); }
\ No newline at end of file diff --git a/sass/src/com/vaadin/sass/tree/BlockNode.java b/sass/src/com/vaadin/sass/tree/BlockNode.java index 685c3ac3f0..e255b2a3e5 100644 --- a/sass/src/com/vaadin/sass/tree/BlockNode.java +++ b/sass/src/com/vaadin/sass/tree/BlockNode.java @@ -70,10 +70,10 @@ public class BlockNode extends Node implements Clonable { if (selectorList != null) { clonedSelectorList = new SelectorListImpl(); - for (int i = 0; i < selectorList.getLength(); i++) { - clonedSelectorList.addSelector(selectorList.item(i)); + for (int i = 0; i < selectorList.getLength(); i++) { + clonedSelectorList.addSelector(selectorList.item(i)); + } } - } final BlockNode clone = new BlockNode(clonedSelectorList); for (Node child : getChildren()) { clone.getChildren().add((Node) DeepCopy.copy(child)); diff --git a/sass/src/com/vaadin/sass/util/DeepCopy.java b/sass/src/com/vaadin/sass/util/DeepCopy.java index 23f8386714..5d4e43c477 100644 --- a/sass/src/com/vaadin/sass/util/DeepCopy.java +++ b/sass/src/com/vaadin/sass/util/DeepCopy.java @@ -38,26 +38,26 @@ public class DeepCopy { Object obj = null; if (!(orig instanceof Clonable)) { - try { - // Write the object out to a byte array - FastByteArrayOutputStream fbos = new FastByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(fbos); - out.writeObject(orig); - out.flush(); - out.close(); + try { + // Write the object out to a byte array + FastByteArrayOutputStream fbos = new FastByteArrayOutputStream(); + ObjectOutputStream out = new ObjectOutputStream(fbos); + out.writeObject(orig); + out.flush(); + out.close(); - // Retrieve an input stream from the byte array and read - // a copy of the object back in. + // Retrieve an input stream from the byte array and read + // a copy of the object back in. ObjectInputStream in = new ObjectInputStream( fbos.getInputStream()); - obj = in.readObject(); - in.close(); - } catch (IOException e) { - e.printStackTrace(); - } catch (ClassNotFoundException cnfe) { - cnfe.printStackTrace(); - } - return obj; + obj = in.readObject(); + in.close(); + } catch (IOException e) { + e.printStackTrace(); + } catch (ClassNotFoundException cnfe) { + cnfe.printStackTrace(); + } + return obj; } else { try { obj = ((Clonable) orig).clone(); |