Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornitind2008-04-10 05:30:31 +0000
committernitind2008-04-10 05:30:31 +0000
commit3b5d8e2a0675687b0a87f6235a46d174239066ca (patch)
tree23c08a11b6717f4af9202cf8a97529a90f1a45c4 /bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui
parent60c7a2e32e2e309669714135060dc501ba3a8a62 (diff)
downloadwebtools.sourceediting-3b5d8e2a0675687b0a87f6235a46d174239066ca.tar.gz
webtools.sourceediting-3b5d8e2a0675687b0a87f6235a46d174239066ca.tar.xz
webtools.sourceediting-3b5d8e2a0675687b0a87f6235a46d174239066ca.zip
[130039] Cannot remove property in Properties View
Diffstat (limited to 'bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui')
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java
index 2fa5f0d596..5060e8bd41 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2008 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
@@ -33,13 +33,14 @@ import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
import org.eclipse.wst.css.core.internal.provisional.document.ICSSNodeList;
import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
import org.eclipse.wst.css.ui.internal.CSSUIMessages;
+import org.eclipse.wst.sse.ui.views.properties.IPropertySourceExtension;
import org.w3c.dom.css.CSSStyleDeclaration;
/**
* A IPropertySource implementation for a JFace viewer used to display
* properties of CSS nodes.
*/
-public class CSSPropertySource implements IPropertySource {
+public class CSSPropertySource implements IPropertySource, IPropertySourceExtension {
protected ICSSNode fNode = null;
// for performance...
final static Class ADAPTER_KEY = IPropertySource.class;
@@ -335,4 +336,20 @@ public class CSSPropertySource implements IPropertySource {
return declaration;
}
+
+ // Bug 130039 - Implement IPropertySourceExtension
+
+ public boolean isPropertyRemovable(Object name) {
+ return true;
+ }
+
+ public void removeProperty(Object name) {
+ if(name == null)
+ return;
+
+ CSSStyleDeclaration declaration = getDeclarationNode();
+
+ if(declaration != null)
+ declaration.removeProperty(name.toString());
+ }
}

Back to the top