Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Thienel2010-10-19 19:55:59 +0000
committerFlorian Thienel2010-10-19 19:59:39 +0000
commiteff77ae3cf2599a3ed4ed5b3822c77f054365111 (patch)
tree4301b33aa6f28d061238b2efc7956c8e224defb0
parent027ea0ec3138fc26bc2443a6a0e316550689c7f8 (diff)
downloadorg.eclipse.mylyn.docs.vex-eff77ae3cf2599a3ed4ed5b3822c77f054365111.tar.gz
org.eclipse.mylyn.docs.vex-eff77ae3cf2599a3ed4ed5b3822c77f054365111.tar.xz
org.eclipse.mylyn.docs.vex-eff77ae3cf2599a3ed4ed5b3822c77f054365111.zip
bug 324927 removed unneccessary serializability
Signed-off-by: Florian Thienel <florian@thienel.org>
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/PropertyDecl.java6
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/RelativeLength.java5
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/Rule.java5
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/SacFactory.java524
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheet.java5
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheetReader.java34
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/dom/DocumentFragment.java2
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/ConfigItem.java3
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/DocumentType.java2
-rw-r--r--sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/Style.java3
-rw-r--r--sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/css/SerializationTest.java46
-rw-r--r--[-rwxr-xr-x]sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/tests/VEXCoreTestSuite.java1
12 files changed, 20 insertions, 616 deletions
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/PropertyDecl.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/PropertyDecl.java
index bd7d326d..e28b9226 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/PropertyDecl.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/PropertyDecl.java
@@ -12,16 +12,12 @@
*******************************************************************************/
package org.eclipse.wst.xml.vex.core.internal.css;
-import java.io.Serializable;
-
import org.w3c.css.sac.LexicalUnit;
/**
* Represents a particular CSS property declaration.
*/
-public class PropertyDecl implements Serializable {
-
- private static final long serialVersionUID = 1L;
+public class PropertyDecl {
private final Rule rule;
private final String property;
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/RelativeLength.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/RelativeLength.java
index 0f965104..d88f4cc9 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/RelativeLength.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/RelativeLength.java
@@ -10,14 +10,11 @@
*******************************************************************************/
package org.eclipse.wst.xml.vex.core.internal.css;
-import java.io.Serializable;
/**
* A length that may be expressed as an absolute or relative value.
*/
-public class RelativeLength implements Serializable {
-
- private static final long serialVersionUID = 1L;
+public class RelativeLength {
private float percentage;
private int absolute;
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/Rule.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/Rule.java
index d8b588e2..9bf7dfb8 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/Rule.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/Rule.java
@@ -14,7 +14,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.vex.core.internal.css;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -45,9 +44,7 @@ import org.w3c.css.sac.SiblingSelector;
* <code>java.util</code> package, unless a suitable <code>Comparator</code> is
* also used.
*/
-public class Rule implements Serializable {
-
- private static final long serialVersionUID = 1L;
+public class Rule {
private final Selector selector;
private final List<PropertyDecl> propertyDecls = new ArrayList<PropertyDecl>();
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/SacFactory.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/SacFactory.java
deleted file mode 100644
index 4c44a6ac..00000000
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/SacFactory.java
+++ /dev/null
@@ -1,524 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 John Krasnay and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * John Krasnay - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.vex.core.internal.css;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.w3c.css.sac.AttributeCondition;
-import org.w3c.css.sac.CharacterDataSelector;
-import org.w3c.css.sac.CombinatorCondition;
-import org.w3c.css.sac.Condition;
-import org.w3c.css.sac.ConditionalSelector;
-import org.w3c.css.sac.ContentCondition;
-import org.w3c.css.sac.DescendantSelector;
-import org.w3c.css.sac.ElementSelector;
-import org.w3c.css.sac.LangCondition;
-import org.w3c.css.sac.LexicalUnit;
-import org.w3c.css.sac.NegativeCondition;
-import org.w3c.css.sac.NegativeSelector;
-import org.w3c.css.sac.PositionalCondition;
-import org.w3c.css.sac.ProcessingInstructionSelector;
-import org.w3c.css.sac.Selector;
-import org.w3c.css.sac.SiblingSelector;
-import org.w3c.css.sac.SimpleSelector;
-
-/**
- * Factory for producing serializable Conditions, LexicalUnits, and Selectors.
- * The SAC parser creates instances of these that may not be serializable (and
- * in fact, those from Flute aren't). To serialize StyleSheets, which contain
- * references to these SAC objects, we must clone the objects into our own
- * serializable ones.
- */
-public class SacFactory {
-
- /**
- * Clone the given condition, returning one that is serializable.
- *
- * @param condition
- * Condition to clone.
- */
- public Condition cloneCondition(Condition condition) {
- Condition clone = null;
- if (condition == null) {
- return null;
- } else if (condition instanceof AttributeCondition) {
- clone = new AttributeConditionImpl((AttributeCondition) condition);
- } else if (condition instanceof CombinatorCondition) {
- clone = new CombinatorConditionImpl(
- (CombinatorCondition) condition, this);
- } else if (condition instanceof ContentCondition) {
- clone = new ContentConditionImpl((ContentCondition) condition);
- } else if (condition instanceof LangCondition) {
- clone = new LangConditionImpl((LangCondition) condition);
- } else if (condition instanceof NegativeCondition) {
- clone = new NegativeConditionImpl((NegativeCondition) condition,
- this);
- } else if (condition instanceof PositionalCondition) {
- clone = new PositionalConditionImpl((PositionalCondition) condition);
- } else {
- throw new IllegalArgumentException("Unsupported condition type: "
- + condition.getClass());
- }
- return clone;
- }
-
- /**
- * Clone the given lexical unit, returning one that is serializable.
- *
- * @param lexicalUnit
- * LexicalUnit to clone.
- */
- public LexicalUnit cloneLexicalUnit(LexicalUnit lexicalUnit) {
- if (lexicalUnit == null) {
- return null;
- } else if (this.cache.containsKey(lexicalUnit)) {
- return this.cache.get(lexicalUnit);
- } else {
- return new LexicalUnitImpl(lexicalUnit, this);
- }
- }
-
- /**
- * Clone the given selector, returning one that is serializable.
- */
- public Selector cloneSelector(Selector selector) {
- Selector clone = null;
- if (selector == null) {
- return null;
- } else if (selector instanceof CharacterDataSelector) {
- clone = new CharacterDataSelectorImpl(
- (CharacterDataSelector) selector);
- } else if (selector instanceof ConditionalSelector) {
- clone = new ConditionalSelectorImpl((ConditionalSelector) selector,
- this);
- } else if (selector instanceof DescendantSelector) {
- clone = new DescendantSelectorImpl((DescendantSelector) selector,
- this);
- } else if (selector instanceof ElementSelector) {
- clone = new ElementSelectorImpl((ElementSelector) selector);
- } else if (selector instanceof NegativeSelector) {
- clone = new NegativeSelectorImpl((NegativeSelector) selector, this);
- } else if (selector instanceof ProcessingInstructionSelector) {
- clone = new ProcessingInstructionSelectorImpl(
- (ProcessingInstructionSelector) selector);
- } else if (selector instanceof SiblingSelector) {
- clone = new SiblingSelectorImpl((SiblingSelector) selector, this);
- } else {
- throw new IllegalArgumentException("Unsupported selector type: "
- + selector.getClass());
- }
- return clone;
- }
-
- // ===================================================== PRIVATE
-
- private Map<LexicalUnit, LexicalUnit> cache = new HashMap<LexicalUnit, LexicalUnit>();
-
- private static class ConditionImpl implements Condition, Serializable {
- private static final long serialVersionUID = 1L;
-
- public ConditionImpl(Condition condition) {
- this.type = condition.getConditionType();
- }
-
- public short getConditionType() {
- return this.type;
- }
-
- private short type;
- }
-
- private static class AttributeConditionImpl extends ConditionImpl implements
- AttributeCondition {
- private static final long serialVersionUID = 1L;
-
- public AttributeConditionImpl(AttributeCondition condition) {
- super(condition);
- this.namespaceURI = condition.getNamespaceURI();
- this.localName = condition.getLocalName();
- this.specified = condition.getSpecified();
- this.value = condition.getValue();
- }
-
- public String getNamespaceURI() {
- return this.namespaceURI;
- }
-
- public String getLocalName() {
- return this.localName;
- }
-
- public boolean getSpecified() {
- return this.specified;
- }
-
- public String getValue() {
- return this.value;
- }
-
- private String namespaceURI;
- private String localName;
- private boolean specified;
- private String value;
- }
-
- private static class CombinatorConditionImpl extends ConditionImpl
- implements CombinatorCondition {
- private static final long serialVersionUID = 1L;
-
- public CombinatorConditionImpl(CombinatorCondition condition,
- SacFactory factory) {
- super(condition);
- this.firstCondition = factory.cloneCondition(condition
- .getFirstCondition());
- this.secondCondition = factory.cloneCondition(condition
- .getSecondCondition());
- }
-
- public Condition getFirstCondition() {
- return this.firstCondition;
- }
-
- public Condition getSecondCondition() {
- return this.secondCondition;
- }
-
- private Condition firstCondition;
- private Condition secondCondition;
- }
-
- private static class ContentConditionImpl extends ConditionImpl implements
- ContentCondition {
- private static final long serialVersionUID = 1L;
-
- public ContentConditionImpl(ContentCondition condition) {
- super(condition);
- this.data = condition.getData();
- }
-
- public String getData() {
- return this.data;
- }
-
- private String data;
- }
-
- private static class LangConditionImpl extends ConditionImpl implements
- LangCondition {
- private static final long serialVersionUID = 1L;
-
- public LangConditionImpl(LangCondition condition) {
- super(condition);
- this.lang = condition.getLang();
- }
-
- public String getLang() {
- return this.lang;
- }
-
- private String lang;
- }
-
- private static class NegativeConditionImpl extends ConditionImpl implements
- NegativeCondition {
- private static final long serialVersionUID = 1L;
-
- public NegativeConditionImpl(NegativeCondition condition,
- SacFactory factory) {
- super(condition);
- this.condition = factory.cloneCondition(condition.getCondition());
- }
-
- public Condition getCondition() {
- return this.condition;
- }
-
- private Condition condition;
- }
-
- private static class PositionalConditionImpl extends ConditionImpl
- implements PositionalCondition {
- private static final long serialVersionUID = 1L;
-
- public PositionalConditionImpl(PositionalCondition condition) {
- super(condition);
- this.position = condition.getPosition();
- this.typeNode = condition.getTypeNode();
- this.type = condition.getType();
- }
-
- public int getPosition() {
- return this.position;
- }
-
- public boolean getTypeNode() {
- return this.typeNode;
- }
-
- public boolean getType() {
- return this.type;
- }
-
- private int position;
- private boolean typeNode;
- private boolean type;
- }
-
- private static class LexicalUnitImpl implements LexicalUnit, Serializable {
- private static final long serialVersionUID = 1L;
-
- public LexicalUnitImpl(LexicalUnit lu, SacFactory factory) {
- factory.cache.put(lu, this);
- this.type = lu.getLexicalUnitType();
- this.s = lu.getStringValue();
- this.i = lu.getIntegerValue();
- this.f = lu.getFloatValue();
- this.functionName = lu.getFunctionName();
- this.next = factory.cloneLexicalUnit(lu.getNextLexicalUnit());
- this.prev = factory.cloneLexicalUnit(lu.getPreviousLexicalUnit());
- this.parameters = factory.cloneLexicalUnit(lu.getParameters());
- if (this.type == SAC_PERCENTAGE || this.type == SAC_EM
- || this.type == SAC_EX || this.type == SAC_PIXEL
- || this.type == SAC_CENTIMETER
- || this.type == SAC_MILLIMETER || this.type == SAC_INCH
- || this.type == SAC_POINT || this.type == SAC_PICA
- || this.type == SAC_DEGREE || this.type == SAC_RADIAN
- || this.type == SAC_GRADIAN || this.type == SAC_MILLISECOND
- || this.type == SAC_SECOND || this.type == SAC_HERTZ
- || this.type == SAC_KILOHERTZ || this.type == SAC_DIMENSION) {
- this.dimensionText = lu.getDimensionUnitText();
- }
- }
-
- public short getLexicalUnitType() {
- return this.type;
- }
-
- public LexicalUnit getNextLexicalUnit() {
- return this.next;
- }
-
- public LexicalUnit getPreviousLexicalUnit() {
- return this.prev;
- }
-
- public int getIntegerValue() {
- return this.i;
- }
-
- public float getFloatValue() {
- return this.f;
- }
-
- public String getDimensionUnitText() {
- return this.dimensionText;
- }
-
- public String getFunctionName() {
- return this.functionName;
- }
-
- public LexicalUnit getParameters() {
- return this.parameters;
- }
-
- public String getStringValue() {
- return this.s;
- }
-
- public LexicalUnit getSubValues() {
- return this.parameters;
- }
-
- private short type;
- private LexicalUnit next;
- private LexicalUnit prev;
- private LexicalUnit parameters;
- private String s;
- private int i;
- private float f;
- private String functionName;
- private String dimensionText;
- }
-
- private static class SelectorImpl implements Selector, Serializable {
- private static final long serialVersionUID = 1L;
-
- public SelectorImpl(Selector selector) {
- this.type = selector.getSelectorType();
- }
-
- public short getSelectorType() {
- return this.type;
- }
-
- private short type;
- }
-
- private static class CharacterDataSelectorImpl extends SelectorImpl
- implements CharacterDataSelector {
- private static final long serialVersionUID = 1L;
-
- public CharacterDataSelectorImpl(CharacterDataSelector selector) {
- super(selector);
- this.data = selector.getData();
- }
-
- public String getData() {
- return this.data;
- }
-
- private String data;
- }
-
- private static class ConditionalSelectorImpl extends SelectorImpl implements
- ConditionalSelector {
- private static final long serialVersionUID = 1L;
-
- public ConditionalSelectorImpl(ConditionalSelector selector,
- SacFactory factory) {
- super(selector);
- this.condition = factory.cloneCondition(selector.getCondition());
- this.simpleSelector = (SimpleSelector) factory
- .cloneSelector(selector.getSimpleSelector());
- }
-
- public SimpleSelector getSimpleSelector() {
- return this.simpleSelector;
- }
-
- public Condition getCondition() {
- return this.condition;
- }
-
- private Condition condition;
- private SimpleSelector simpleSelector;
- }
-
- private static class DescendantSelectorImpl extends SelectorImpl implements
- DescendantSelector {
- private static final long serialVersionUID = 1L;
-
- public DescendantSelectorImpl(DescendantSelector selector,
- SacFactory factory) {
- super(selector);
- this.ancestor = factory.cloneSelector(selector
- .getAncestorSelector());
- this.simpleSelector = (SimpleSelector) factory
- .cloneSelector(selector.getSimpleSelector());
- }
-
- public Selector getAncestorSelector() {
- return this.ancestor;
- }
-
- public SimpleSelector getSimpleSelector() {
- return this.simpleSelector;
- }
-
- private Selector ancestor;
- private SimpleSelector simpleSelector;
- }
-
- private static class ElementSelectorImpl extends SelectorImpl implements
- ElementSelector {
- private static final long serialVersionUID = 1L;
-
- public ElementSelectorImpl(ElementSelector selector) {
- super(selector);
- this.namespaceURI = selector.getNamespaceURI();
- this.localName = selector.getLocalName();
- }
-
- public String getNamespaceURI() {
- return this.namespaceURI;
- }
-
- public String getLocalName() {
- return this.localName;
- }
-
- private String namespaceURI;
- private String localName;
- }
-
- private static class NegativeSelectorImpl extends SelectorImpl implements
- NegativeSelector {
- private static final long serialVersionUID = 1L;
-
- public NegativeSelectorImpl(NegativeSelector selector,
- SacFactory factory) {
- super(selector);
- this.simpleSelector = (SimpleSelector) factory
- .cloneSelector(selector.getSimpleSelector());
- }
-
- public SimpleSelector getSimpleSelector() {
- return this.simpleSelector;
- }
-
- private SimpleSelector simpleSelector;
- }
-
- private static class ProcessingInstructionSelectorImpl extends SelectorImpl
- implements ProcessingInstructionSelector {
- private static final long serialVersionUID = 1L;
-
- public ProcessingInstructionSelectorImpl(
- ProcessingInstructionSelector selector) {
- super(selector);
- this.target = selector.getTarget();
- this.data = selector.getData();
- }
-
- public String getTarget() {
- return this.target;
- }
-
- public String getData() {
- return this.data;
- }
-
- private String target;
- private String data;
- }
-
- private static class SiblingSelectorImpl extends SelectorImpl implements
- SiblingSelector {
- private static final long serialVersionUID = 1L;
-
- private SiblingSelectorImpl(SiblingSelector selector, SacFactory factory) {
- super(selector);
- this.nodeType = selector.getNodeType();
- this.selector = factory.cloneSelector(selector.getSelector());
- this.siblingSelector = (SimpleSelector) factory
- .cloneSelector(selector.getSiblingSelector());
- }
-
- public short getNodeType() {
- return this.nodeType;
- }
-
- public Selector getSelector() {
- return this.selector;
- }
-
- public SimpleSelector getSiblingSelector() {
- return this.siblingSelector;
- }
-
- private short nodeType;
- private Selector selector;
- private SimpleSelector siblingSelector;
- }
-}
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheet.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheet.java
index eda172a5..b29623b7 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheet.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheet.java
@@ -16,7 +16,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.vex.core.internal.css;
-import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collection;
@@ -34,10 +33,8 @@ import org.w3c.css.sac.LexicalUnit;
/**
* Represents a CSS style sheet.
*/
-public class StyleSheet implements Serializable {
+public class StyleSheet {
- private static final long serialVersionUID = -7309907170251446189L;
-
private static final Comparator<PropertyDecl> PROPERTY_CASCADE_ORDERING =
new Comparator<PropertyDecl>() {
public int compare(PropertyDecl propertyDecl1,
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheetReader.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheetReader.java
index b66b1e29..59c347e1 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheetReader.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/css/StyleSheetReader.java
@@ -102,9 +102,6 @@ public class StyleSheetReader {
// May be null!
private final URL url;
- // Factory for creating serializable clones of SAC objects
- SacFactory factory = new SacFactory();
-
public StyleSheetBuilder(List<Rule> rules, URL url) {
this.rules = rules;
this.url = url;
@@ -159,35 +156,30 @@ public class StyleSheetReader {
}
public void property(String name, LexicalUnit value, boolean important) {
-
- // Create a serializable clone of the value for storage in our
- // stylesheet.
- final LexicalUnit clonedValue = factory.cloneLexicalUnit(value);
-
if (name.equals(CSS.BORDER)) {
- this.expandBorder(clonedValue, important);
+ this.expandBorder(value, important);
} else if (name.equals(CSS.BORDER_BOTTOM)) {
- this.expandBorder(clonedValue, CSS.BORDER_BOTTOM, important);
+ this.expandBorder(value, CSS.BORDER_BOTTOM, important);
} else if (name.equals(CSS.BORDER_LEFT)) {
- this.expandBorder(clonedValue, CSS.BORDER_LEFT, important);
+ this.expandBorder(value, CSS.BORDER_LEFT, important);
} else if (name.equals(CSS.BORDER_RIGHT)) {
- this.expandBorder(clonedValue, CSS.BORDER_RIGHT, important);
+ this.expandBorder(value, CSS.BORDER_RIGHT, important);
} else if (name.equals(CSS.BORDER_TOP)) {
- this.expandBorder(clonedValue, CSS.BORDER_TOP, important);
+ this.expandBorder(value, CSS.BORDER_TOP, important);
} else if (name.equals(CSS.BORDER_COLOR)) {
- this.expandBorderColor(clonedValue, important);
+ this.expandBorderColor(value, important);
} else if (name.equals(CSS.BORDER_STYLE)) {
- this.expandBorderStyle(clonedValue, important);
+ this.expandBorderStyle(value, important);
} else if (name.equals(CSS.BORDER_WIDTH)) {
- this.expandBorderWidth(clonedValue, important);
+ this.expandBorderWidth(value, important);
} else if (name.equals(CSS.FONT)) {
- this.expandFont(clonedValue, important);
+ this.expandFont(value, important);
} else if (name.equals(CSS.MARGIN)) {
- this.expandMargin(clonedValue, important);
+ this.expandMargin(value, important);
} else if (name.equals(CSS.PADDING)) {
- this.expandPadding(clonedValue, important);
+ this.expandPadding(value, important);
} else {
- this.addDecl(name, clonedValue, important);
+ this.addDecl(name, value, important);
}
}
@@ -206,7 +198,7 @@ public class StyleSheetReader {
public void startSelector(SelectorList selectors) {
this.currentRules = new ArrayList<Rule>();
for (int i = 0; i < selectors.getLength(); i++) {
- final Selector selector = factory.cloneSelector(selectors.item(i));
+ final Selector selector = selectors.item(i);
this.currentRules.add(new Rule(selector));
}
}
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/dom/DocumentFragment.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/dom/DocumentFragment.java
index d15d808d..97c996e2 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/dom/DocumentFragment.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.core/src/org/eclipse/wst/xml/vex/core/internal/dom/DocumentFragment.java
@@ -31,6 +31,8 @@ import org.eclipse.wst.xml.vex.core.internal.provisional.dom.impl.VEXDocumentFra
*/
public class DocumentFragment extends VEXDocumentFragmentImpl implements Serializable, VEXDocumentFragment {
+ private static final long serialVersionUID = 1L;
+
/**
* Mime type representing document fragments: "text/x-vex-document-fragment"
* @model
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/ConfigItem.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/ConfigItem.java
index 2b0dd8ae..6eb1adec 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/ConfigItem.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/ConfigItem.java
@@ -11,14 +11,13 @@
*******************************************************************************/
package org.eclipse.wst.xml.vex.ui.internal.config;
-import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Base class of all configurtion items such as document types and styles.
*/
-public abstract class ConfigItem implements Comparable<ConfigItem>, Serializable {
+public abstract class ConfigItem implements Comparable<ConfigItem> {
/**
* Class constructor.
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/DocumentType.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/DocumentType.java
index 3959239c..9831d13e 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/DocumentType.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/DocumentType.java
@@ -18,8 +18,6 @@ import org.eclipse.wst.xml.vex.core.internal.provisional.dom.I.Validator;
*/
public class DocumentType extends ConfigItem {
- private static final long serialVersionUID = 1L;
-
public static final String EXTENSION_POINT = "org.eclipse.wst.xml.vex.ui.doctypes"; //$NON-NLS-1$
public DocumentType(final ConfigSource config) {
diff --git a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/Style.java b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/Style.java
index b060e40a..11e8cf95 100644
--- a/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/Style.java
+++ b/sourceediting/plugins/org.eclipse.wst.xml.vex.ui/src/org/eclipse/wst/xml/vex/ui/internal/config/Style.java
@@ -11,10 +11,8 @@
*******************************************************************************/
package org.eclipse.wst.xml.vex.ui.internal.config;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import org.eclipse.wst.xml.vex.core.internal.css.StyleSheet;
@@ -26,7 +24,6 @@ import org.eclipse.wst.xml.vex.core.internal.layout.BoxFactory;
*/
public class Style extends ConfigItem {
- private static final long serialVersionUID = 1L;
public static final String EXTENSION_POINT = "org.eclipse.wst.xml.vex.ui.styles"; //$NON-NLS-1$
public Style(final ConfigSource config) {
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/css/SerializationTest.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/css/SerializationTest.java
deleted file mode 100644
index fa51bbda..00000000
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/internal/css/SerializationTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 John Krasnay and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * John Krasnay - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.xml.vex.core.internal.css;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.URL;
-
-import org.eclipse.wst.xml.vex.core.internal.css.StyleSheet;
-import org.eclipse.wst.xml.vex.core.internal.css.StyleSheetReader;
-
-import junit.framework.TestCase;
-
-public class SerializationTest extends TestCase {
-
- public void testSerialization() throws Exception {
- // serialize("test1.css");
- // serialize("test2.css");
- serialize("testLexicalUnits.css");
- // serialize("testRules.css");
- }
-
- private void serialize(String resource) throws Exception {
-
- URL url = this.getClass().getResource(resource);
- StyleSheetReader reader = new StyleSheetReader();
- StyleSheet ss = reader.read(url);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(ss);
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- ObjectInputStream ois = new ObjectInputStream(bais);
- ois.readObject();
- }
-}
diff --git a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/tests/VEXCoreTestSuite.java b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/tests/VEXCoreTestSuite.java
index 5d9e245f..f9a97927 100755..100644
--- a/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/tests/VEXCoreTestSuite.java
+++ b/sourceediting/tests/org.eclipse.wst.xml.vex.core.tests/src/org/eclipse/wst/xml/vex/core/tests/VEXCoreTestSuite.java
@@ -30,7 +30,6 @@ public class VEXCoreTestSuite extends TestSuite {
addTestSuite(CssTest.class);
addTestSuite(PropertyTest.class);
addTestSuite(RuleTest.class);
- addTestSuite(SerializationTest.class);
addTestSuite(BlockElementBoxTest.class);
addTestSuite(DocumentWriterTest.class);
addTestSuite(DomTest.class);

Back to the top