[116171] dtd core has eclipse.ui dependancies
diff --git a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
index b9f6f6b..cdc55cb 100644
--- a/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF
@@ -35,8 +35,6 @@
Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
org.eclipse.wst.common.uriresolver;bundle-version="[1.1.301,1.2.0)",
org.eclipse.wst.sse.core;bundle-version="[1.1.300,1.2.0)",
org.eclipse.wst.xml.core;bundle-version="[1.1.300,1.2.0)",
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java
index b3c2449..9388699 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -14,7 +14,6 @@
import java.util.Hashtable;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -111,8 +110,8 @@
return enumList;
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ATTRIBUTEICON);
+ public String getImagePath() {
+ return DTDResource.ATTRIBUTEICON;
}
public ITextRegion getNameRegion() {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java
index 242057c..666efdf 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -15,7 +15,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -30,7 +29,7 @@
super(file, flatNode);
}
- public Image getImage() {
+ public String getImagePath() {
// never exposed in tree
return null;
}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java
index 1d22456..c8c78b1 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -14,7 +14,6 @@
import java.util.ArrayList;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -44,8 +43,8 @@
endRecording(this);
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ATTRIBUTELISTICON);
+ public String getImagePath() {
+ return DTDResource.ATTRIBUTELISTICON;
}
public void insertIntoModel(Object requestor, Attribute reference, Attribute node, boolean isAfter) {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java
index f99aa3e..e74334d 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -34,25 +33,25 @@
super(file, flatNode);
}
- public Image getImage() {
+ public String getImagePath() {
final String name = getName();
ITextRegion pcdata = getNextRegion(iterator(), DTDRegionTypes.CONTENT_PCDATA);
if (pcdata != null) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.PCDATAICON);
+ return DTDResource.PCDATAICON;
}
if (isRootElementContent()) {
if (name.equals(EMPTY)) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.EMPTYICON);
+ return DTDResource.EMPTYICON;
}
else if (name.equals(ANY)) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ANYICON);
+ return DTDResource.ANYICON;
}
}
// Otherwise this is just an element reference node. Just return
// what CMRepeatableNode would give us
- return super.getImage();
+ return super.getImagePath();
}
public ITextRegion getNameRegion() {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java
index 06d5385..a5401da 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -14,7 +14,6 @@
import java.util.List;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.dtd.core.internal.util.DTDUniqueNameHelper;
@@ -121,11 +120,10 @@
return connector;
}
- public Image getImage() {
- DTDCorePlugin resourcePlugin = DTDCorePlugin.getInstance();
+ public String getImagePath() {
switch (getConnector()) {
case SEQUENCE :
- return resourcePlugin.getImage(DTDResource.ONESEQUENCEICON);
+ return DTDResource.ONESEQUENCEICON;
/*
* switch (getOccurrence()) { case ONCE : return
* resourcePlugin.getImage(DTDResource.ONESEQUENCEICON); case
@@ -137,7 +135,7 @@
* resourcePlugin.getImage(DTDResource.ZEROORMORESEQUENCEICON); }
*/
case CHOICE :
- return resourcePlugin.getImage(DTDResource.ONECHOICEICON);
+ return DTDResource.ONECHOICEICON;
/*
* switch (getOccurrence()) { case ONCE : return
* resourcePlugin.getImage(DTDResource.ONECHOICEICON); case OPTIONAL :
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java
index 14a8bfe..df41c63 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
@@ -30,9 +29,8 @@
super(file, flatNode);
}
- public Image getImage() {
- DTDCorePlugin resourcePlugin = DTDCorePlugin.getInstance();
- return resourcePlugin.getImage(DTDResource.ELEMENTREFICON);
+ public String getImagePath() {
+ return DTDResource.ELEMENTREFICON;
}
public char getOccurrence() {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java
index d4e8253..d132b32 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -29,8 +28,8 @@
super(file, flatNode, DTDRegionTypes.COMMENT_START);
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.COMMENTICON);
+ public String getImagePath() {
+ return DTDResource.COMMENTICON;
}
public String getName() {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java
index ff55620..13d7052 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,23 +12,11 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.Plugin;
-public class DTDCorePlugin extends AbstractUIPlugin {
+public class DTDCorePlugin extends Plugin {
private static DTDCorePlugin instance;
- public static Image getDTDImage(String iconName) {
- return getInstance().getImage(iconName);
- }
-
- public static ImageDescriptor getDTDImageDescriptor(String iconName) {
- String thisID = getInstance().getBundle().getSymbolicName();
- return AbstractUIPlugin.imageDescriptorFromPlugin(thisID, iconName);
- }
-
public synchronized static DTDCorePlugin getInstance() {
return instance;
}
@@ -42,16 +30,4 @@
instance = this;
}
- public Image getImage(String iconName) {
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get(iconName);
-
- if (image == null) {
- String thisID = getInstance().getBundle().getSymbolicName();
- imageRegistry.put(iconName, imageDescriptorFromPlugin(thisID, iconName));
- image = imageRegistry.get(iconName);
- }
-
- return image;
- }
}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java
index 615d1ed..3ee60a6 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -19,7 +19,6 @@
import java.util.Iterator;
import java.util.List;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
import org.eclipse.wst.dtd.core.internal.event.IDTDFileListener;
import org.eclipse.wst.dtd.core.internal.event.NodesEvent;
@@ -275,10 +274,6 @@
return entityList;
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.DTDFILEICON);
- }
-
public int getInsertOffset(DTDNode node, boolean isAfter) {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java
index bea5c7a..0bc2838 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -16,7 +16,6 @@
import java.util.Collections;
import java.util.List;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.document.DTDModelImpl;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
@@ -178,7 +177,7 @@
return text;
}
- abstract public Image getImage();
+ abstract public String getImagePath();
public String getName() {
ITextRegion region = getNameRegion();
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
index 3c10322..eca244f 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -16,7 +16,6 @@
import java.util.Iterator;
import java.util.List;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -121,8 +120,8 @@
return attributes;
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ELEMENTICON);
+ public String getImagePath() {
+ return DTDResource.ELEMENTICON;
}
public short getNodeType() {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java
index 45f7c3e..dae8da4 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -32,8 +31,8 @@
super(file, flatNode, DTDRegionTypes.ENTITY_TAG);
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ENTITYICON);
+ public String getImagePath() {
+ return DTDResource.ENTITYICON;
}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java
index df45a2a..b0026d7 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -15,7 +15,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
@@ -31,24 +30,24 @@
this.dtdFile = dtdFile;
}
- public Image getImage() {
+ public String getImagePath() {
if (listType == DTDRegionTypes.ELEMENT_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_EL);
+ return DTDResource.FLDR_EL;
}
else if (listType == DTDRegionTypes.ENTITY_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ENT);
+ return DTDResource.FLDR_ENT;
}
else if (listType == DTDRegionTypes.NOTATION_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_NOT);
+ return DTDResource.FLDR_NOT;
}
else if (listType == DTDRegionTypes.COMMENT_START) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_COMM);
+ return DTDResource.FLDR_COMM;
}
else if (listType == DTDRegionTypes.ATTLIST_TAG) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_ATTLIST);
+ return DTDResource.FLDR_ATTLIST;
}
else if (listType == DTDRegionTypes.UNKNOWN_CONTENT) {
- return DTDCorePlugin.getInstance().getImage(DTDResource.FLDR_UNREC);
+ return DTDResource.FLDR_UNREC;
}
else
return null;
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java
index 96abd74..0410b7c 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -23,7 +22,7 @@
super(file, flatNode, DTDRegionTypes.NOTATION_TAG);
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.NOTATIONICON);
+ public String getImagePath() {
+ return DTDResource.NOTATIONICON;
}
}
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java
index 490053a..73bbbdc 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -14,7 +14,6 @@
import java.util.List;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.parser.DTDRegionTypes;
import org.eclipse.wst.dtd.core.internal.text.RegionIterator;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -57,8 +56,8 @@
return cachedEntity;
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.ENTITYREFERENCEICON);
+ public String getImagePath() {
+ return DTDResource.ENTITYREFERENCEICON;
}
public String getName() {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java
index fe348a6..a7e8f3a 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
@@ -22,8 +21,8 @@
super(file, flatNode);
}
- public Image getImage() {
- return DTDCorePlugin.getInstance().getImage(DTDResource.UNRECOGNIZEDICON);
+ public String getImagePath() {
+ return DTDResource.UNRECOGNIZEDICON;
}
public String getName() {
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java
index 35b8cf6..d347afa 100644
--- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java
+++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -12,7 +12,7 @@
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal.util;
-import org.eclipse.jface.util.Assert;
+import org.eclipse.core.runtime.Assert;
public class LabelValuePair {
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/any.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/any.gif
new file mode 100644
index 0000000..7017d91
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/any.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute.gif
new file mode 100644
index 0000000..00bb7b4
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute_list.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute_list.gif
new file mode 100644
index 0000000..795eb5e
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute_list.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/comment.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/comment.gif
new file mode 100644
index 0000000..28c2ccb
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/comment.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element.gif
new file mode 100644
index 0000000..01f4889
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element_ref.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element_ref.gif
new file mode 100644
index 0000000..749acfc
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element_ref.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/emptycontent.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/emptycontent.gif
new file mode 100644
index 0000000..bc8e66c
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/emptycontent.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity.gif
new file mode 100644
index 0000000..6a91888
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity_reference.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity_reference.gif
new file mode 100644
index 0000000..d30b26b
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity_reference.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_el.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_el.gif
new file mode 100644
index 0000000..801c133
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_el.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_ent.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_ent.gif
new file mode 100644
index 0000000..2fb2ca7
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_ent.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_not.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_not.gif
new file mode 100644
index 0000000..5909668
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_not.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_unrec.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_unrec.gif
new file mode 100644
index 0000000..6fd82e6
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_unrec.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_attlist_obj.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_attlist_obj.gif
new file mode 100644
index 0000000..f849c75
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_attlist_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_comments_obj.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_comments_obj.gif
new file mode 100644
index 0000000..c9f0945
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_comments_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/genhtmform_wiz.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/genhtmform_wiz.gif
new file mode 100644
index 0000000..5f54702
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/genhtmform_wiz.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/notation.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/notation.gif
new file mode 100644
index 0000000..ce9df98
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/notation.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/one.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/one.gif
new file mode 100644
index 0000000..694c26f
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/one.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onechoice.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onechoice.gif
new file mode 100644
index 0000000..d13ba2e
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onechoice.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormore.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormore.gif
new file mode 100644
index 0000000..8b2b357
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormore.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormorechoice.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormorechoice.gif
new file mode 100644
index 0000000..96398c0
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormorechoice.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormoresequence.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormoresequence.gif
new file mode 100644
index 0000000..041db27
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormoresequence.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onesequence.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onesequence.gif
new file mode 100644
index 0000000..5f9658e
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onesequence.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optional.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optional.gif
new file mode 100644
index 0000000..e7422d7
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optional.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalchoice.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalchoice.gif
new file mode 100644
index 0000000..fb4f9bd
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalchoice.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalsequence.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalsequence.gif
new file mode 100644
index 0000000..f8d5289
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalsequence.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/txtext.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/txtext.gif
new file mode 100644
index 0000000..efa7a38
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/txtext.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/unrecognized_content.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/unrecognized_content.gif
new file mode 100644
index 0000000..358997d
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/unrecognized_content.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormore.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormore.gif
new file mode 100644
index 0000000..daf514d
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormore.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormorechoice.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormorechoice.gif
new file mode 100644
index 0000000..a1ac131
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormorechoice.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormoresequence.gif b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormoresequence.gif
new file mode 100644
index 0000000..8ed4cb7
--- /dev/null
+++ b/bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormoresequence.gif
Binary files differ
diff --git a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java
index 4bd37ac..c8ac984 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 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
@@ -29,6 +29,7 @@
import org.eclipse.wst.dtd.core.internal.Notation;
import org.eclipse.wst.dtd.core.internal.ParameterEntityReference;
import org.eclipse.wst.dtd.ui.internal.DTDPropertiesMessages;
+import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
public class DTDSectionLabelProvider extends LabelProvider {
@@ -52,7 +53,8 @@
else if (selected instanceof DTDNode) {
if (selected instanceof ParameterEntityReference)
return null;
- return ((DTDNode) selected).getImage();
+ final String imgPath = ((DTDNode) selected).getImagePath();
+ return imgPath != null ? DTDUIPlugin.getDefault().getImage(imgPath) : null;
}
else if (selected instanceof org.w3c.dom.Element) {
return null;
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
index e76e6db..0041cd7 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java
@@ -16,8 +16,11 @@
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
import org.eclipse.jface.text.templates.persistence.TemplateStore;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -96,4 +99,26 @@
return fContextTypeRegistry;
}
+
+ public Image getImage(String iconName) {
+ ImageRegistry imageRegistry = getImageRegistry();
+ Image image = imageRegistry.get(iconName);
+
+ if (image == null) {
+ String thisID = getDefault().getBundle().getSymbolicName();
+ imageRegistry.put(iconName, imageDescriptorFromPlugin(thisID, iconName));
+ image = imageRegistry.get(iconName);
+ }
+
+ return image;
+ }
+
+ public static Image getDTDImage(String iconName) {
+ return getDefault().getImage(iconName);
+ }
+
+ public static ImageDescriptor getDTDImageDescriptor(String iconName) {
+ String thisID = getDefault().getBundle().getSymbolicName();
+ return AbstractUIPlugin.imageDescriptorFromPlugin(thisID, iconName);
+ }
}
diff --git a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java
index 6c7fb1f..f3b6135 100644
--- a/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java
+++ b/bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2005 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 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
@@ -16,7 +16,9 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.dtd.core.internal.DTDFile;
import org.eclipse.wst.dtd.core.internal.DTDNode;
+import org.eclipse.wst.dtd.core.internal.DTDResource;
import org.eclipse.wst.dtd.core.internal.NodeList;
+import org.eclipse.wst.dtd.ui.internal.DTDUIPlugin;
class DTDLabelProvider extends LabelProvider {
@@ -35,13 +37,15 @@
public Image getImage(Object element) {
Image image = null;
if (element instanceof DTDNode) {
- image = ((DTDNode) element).getImage();
+ final String imgPath = ((DTDNode) element).getImagePath();
+ image = imgPath != null ? DTDUIPlugin.getDefault().getImage(imgPath) : null;
}
else if (element instanceof NodeList) {
- image = ((NodeList) element).getImage();
+ final String imgPath = ((NodeList) element).getImagePath();
+ image = imgPath != null ? DTDUIPlugin.getDefault().getImage(imgPath) : null;
}
else if (element instanceof DTDFile) {
- image = ((DTDFile) element).getImage();
+ image = DTDUIPlugin.getDefault().getImage(DTDResource.DTDFILEICON);
}
else {
image = super.getImage(element);