diff options
author | nitind | 2005-12-07 15:48:05 +0000 |
---|---|---|
committer | nitind | 2005-12-07 15:48:05 +0000 |
commit | 6c927f34b0ac0f4df3deba4a0bfce999ff0ffa98 (patch) | |
tree | c9c0f8abd45f04685431f8f395ee85e8d7457707 /bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java | |
parent | 5160d934b842281b43e7cd8b8fa237dc606d22f8 (diff) | |
download | webtools.sourceediting-20051207_1050.tar.gz webtools.sourceediting-20051207_1050.tar.xz webtools.sourceediting-20051207_1050.zip |
This commit was manufactured by cvs2svn to create tag 'v20051207_1050'.v20051207_1050
Diffstat (limited to 'bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java')
-rw-r--r-- | bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java b/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java deleted file mode 100644 index 3d6142f38f..0000000000 --- a/bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.css.core.internal.document; - - - -import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument; -import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode; -import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration; - -public abstract class CSSStyleDeclarationFactoryContext { - - protected ICSSDocument fOwnerDocument = null; - - /** - * - */ - protected void cloneChildNodes(ICSSNode src, ICSSNode dest) { - if (fOwnerDocument == null) { - return; - } - if (!(dest instanceof CSSNodeImpl)) { - return; - } - - CSSNodeImpl container = (CSSNodeImpl) dest; - container.removeChildNodes(); - - for (ICSSNode child = src.getFirstChild(); child != null; child = child.getNextSibling()) { - if (child instanceof CSSStyleDeclItemImpl) { - // extract shorthand property .. - // --> Temp - ICSSNode cloned = child.cloneNode(false); - if (cloned instanceof CSSNodeImpl) { - ((CSSNodeImpl) cloned).setOwnerDocument(fOwnerDocument); - container.appendChild((CSSNodeImpl) cloned); - cloneChildNodes(child, cloned); - } - // <-- Temp - } - else { - ICSSNode cloned = child.cloneNode(false); - if (cloned instanceof CSSNodeImpl) { - ((CSSNodeImpl) cloned).setOwnerDocument(fOwnerDocument); - container.appendChild((CSSNodeImpl) cloned); - cloneChildNodes(child, cloned); - } - } - } - } - - /** - * @return org.eclipse.wst.css.core.model.interfaces.ICSSStyleDeclaration - */ - public ICSSStyleDeclaration createStyleDeclaration() { - CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(true); - decl.setOwnerDocument(decl); - return decl; - } - -}
\ No newline at end of file |