aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-07-29 12:13:50 -0700
committerTor Norbye <tnorbye@google.com>2011-07-29 12:13:50 -0700
commit9d55f912a382d780f29c18d440a125742a19556e (patch)
treec5e6e01e659182966983bfedcd88527e2bfcb70d
parent10c57481594874a11a2e387b6854a84172ed2aeb (diff)
downloadsdk-9d55f912a382d780f29c18d440a125742a19556e.zip
sdk-9d55f912a382d780f29c18d440a125742a19556e.tar.gz
sdk-9d55f912a382d780f29c18d440a125742a19556e.tar.bz2
Back out quick-outline customization: Requires Eclipse 3.6
Change-Id: I7c529c81dd53c8ff0ad12ada78de2961910aa336
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml3
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidQuickOutlineConfiguration.java76
2 files changed, 0 insertions, 79 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml b/eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml
index d46392c..32442b6 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml
@@ -598,9 +598,6 @@
class="com.android.ide.eclipse.adt.internal.editors.color.ColorSourceViewerConfig"
target="com.android.ide.eclipse.editors.color.ColorEditor">
</sourceViewerConfiguration>
- <quickOutlineConfiguration
- class="com.android.ide.eclipse.adt.internal.editors.AndroidQuickOutlineConfiguration"
- target="com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor,com.android.ide.eclipse.adt.internal.editors.resources.ResourcesEditor" />
<provisionalConfiguration
type="org.eclipse.jface.text.quickassist.IQuickAssistProcessor"
class="com.android.ide.eclipse.adt.internal.build.AaptQuickFix"
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidQuickOutlineConfiguration.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidQuickOutlineConfiguration.java
deleted file mode 100644
index 7b8b2ac..0000000
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidQuickOutlineConfiguration.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Eclipse Public License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/org/documents/epl-v10.php
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.ide.eclipse.adt.internal.editors;
-
-import static com.android.ide.common.layout.LayoutConstants.ANDROID_URI;
-import static com.android.ide.common.layout.LayoutConstants.ATTR_ID;
-import static com.android.ide.common.layout.LayoutConstants.ATTR_NAME;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeLabelProvider;
-import org.eclipse.wst.xml.ui.internal.quickoutline.XMLQuickOutlineConfiguration;
-import org.w3c.dom.Element;
-
-/**
- * Custom version of {@link XMLQuickOutlineConfiguration} which adds in icons and
- * details such as id or name, to the labels.
- */
-@SuppressWarnings("restriction")
-public class AndroidQuickOutlineConfiguration extends XMLQuickOutlineConfiguration {
- public AndroidQuickOutlineConfiguration() {
- }
-
- @Override
- public ILabelProvider getLabelProvider() {
- return new JFaceNodeLabelProvider() {
- @Override
- public Image getImage(Object element) {
- if (element instanceof Element) {
- Element e = (Element) element;
- String tagName = e.getTagName();
- IconFactory factory = IconFactory.getInstance();
- Image img = factory.getIcon(tagName);
- if (img != null) {
- return img;
- }
- }
- return super.getImage(element);
- }
-
- @Override
- public String getText(Object element) {
- String text = super.getText(element);
- if (element instanceof Element) {
- Element e = (Element) element;
- String id = e.getAttributeNS(ANDROID_URI, ATTR_ID);
- if (id == null || id.length() == 0) {
- id = e.getAttributeNS(ANDROID_URI, ATTR_NAME);
- }
- if (id == null || id.length() == 0) {
- id = e.getAttribute(ATTR_NAME);
- }
- if (id != null && id.length() > 0) {
- return text + ": " + id; //$NON-NLS-1$
- }
- }
- return text;
- }
- };
- }
-
-}