Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-12-20 08:35:55 +0000
committerLars Vogel2016-12-20 14:46:45 +0000
commit336125f0120c95255bb58d8a60fe82d38cd84d65 (patch)
tree6f1cc7bfe28fd9776af8e3fb9904290f2b76dfba /bundles/org.eclipse.e4.tools.css.spy
parenta2199b1f5246a3c35efeee0574c3305fbee1b44c (diff)
downloadorg.eclipse.e4.tools-336125f0120c95255bb58d8a60fe82d38cd84d65.tar.gz
org.eclipse.e4.tools-336125f0120c95255bb58d8a60fe82d38cd84d65.tar.xz
org.eclipse.e4.tools-336125f0120c95255bb58d8a60fe82d38cd84d65.zip
Bug 509506 - Move Activator of org.eclipse.e4.tools.css.spy to Util
method Change-Id: I495fff27a0ebe3aff398f96c2b20db339b5420ad Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'bundles/org.eclipse.e4.tools.css.spy')
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java12
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/Util.java (renamed from bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/Activator.java)27
3 files changed, 9 insertions, 31 deletions
diff --git a/bundles/org.eclipse.e4.tools.css.spy/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.css.spy/META-INF/MANIFEST.MF
index cac01f27..f4f99385 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.tools.css.spy/META-INF/MANIFEST.MF
@@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: CSS Spy
Bundle-SymbolicName: org.eclipse.e4.tools.css.spy;singleton:=true
Bundle-Version: 0.18.0.qualifier
-Bundle-Activator: org.eclipse.e4.tools.css.spy.Activator
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0",
org.eclipse.e4.ui.workbench;bundle-version="0.9.0";resolution:=optional,
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
index c3e7f3e6..4ee955cb 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
@@ -265,7 +265,7 @@ public class CssSpyPart {
if (element.getCSSStyle() != null) {
sb.append("\nCSS Inline Style(s):\n ");
- Activator.join(sb, element.getCSSStyle().split(";"), ";\n ");
+ Util.join(sb, element.getCSSStyle().split(";"), ";\n ");
}
if (decl != null) {
@@ -280,22 +280,22 @@ public class CssSpyPart {
}
if (element.getStaticPseudoInstances().length > 0) {
sb.append("\n\nStatic Pseudoinstances:\n ");
- Activator.join(sb, element.getStaticPseudoInstances(), "\n ");
+ Util.join(sb, element.getStaticPseudoInstances(), "\n ");
}
if (element.getCSSClass() != null) {
sb.append("\n\nCSS Classes:\n ");
- Activator.join(sb, element.getCSSClass().split(" +"), "\n ");
+ Util.join(sb, element.getCSSClass().split(" +"), "\n ");
}
if (element.getCSSId() != null) {
sb.append("\n\nCSS ID:\n ");
- Activator.join(sb, element.getCSSId().split(" +"), "\n ");
+ Util.join(sb, element.getCSSId().split(" +"), "\n ");
}
if (element.getAttribute("style") != null) {
sb.append("\n\nSWT Style Bits:\n ");
- Activator.join(sb, element.getAttribute("style").split(" +"), "\n ");
+ Util.join(sb, element.getAttribute("style").split(" +"), "\n ");
}
sb.append("\n\nCSS Class Element:\n ").append(element.getClass().getName());
@@ -483,7 +483,7 @@ public class CssSpyPart {
sb.append(element.getLocalName()).append(" (").append(element.getNamespaceURI()).append(")");
if (element.getCSSClass() != null) {
sb.append("\nClasses:\n ");
- Activator.join(sb, element.getCSSClass().split(" +"), "\n ");
+ Util.join(sb, element.getCSSClass().split(" +"), "\n ");
}
return sb.toString();
}
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/Activator.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/Util.java
index 650eb72e..f6f8c8b7 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/Activator.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/Util.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Manumitting Technologies, Inc.
+ * Copyright (c) 2011, 2016 Manumitting Technologies, Inc.
* 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
@@ -7,31 +7,11 @@
*
* Contributors:
* Brian de Alwis (MT) - initial API and implementation
+ * Lars Vogel <Lars.Vogel@vogella.com> - Bug 509506
*******************************************************************************/
package org.eclipse.e4.tools.css.spy;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
- public static String join(String[] elements, String glue) {
- StringBuilder sb = new StringBuilder();
- join(sb, elements, glue);
- return sb.toString();
- }
+public class Util {
public static void join(StringBuilder sb, String[] elements, String glue) {
for (int i = 0; i < elements.length; i++) {
@@ -41,5 +21,4 @@ public class Activator implements BundleActivator {
}
}
}
-
}

Back to the top