summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Bateman2013-08-16 18:26:24 (EDT)
committerCameron Bateman2013-08-16 18:26:24 (EDT)
commit765c9bc4c4826bc8f6d80a73c9f56fd94f34b01f (patch)
tree29ed207efad9097cea7bda5494d43711125de667
parentebded28855ee370151ed017f57424f98e4f7b061 (diff)
downloadwebtools.jsf-765c9bc4c4826bc8f6d80a73c9f56fd94f34b01f.zip
webtools.jsf-765c9bc4c4826bc8f6d80a73c9f56fd94f34b01f.tar.gz
webtools.jsf-765c9bc4c4826bc8f6d80a73c9f56fd94f34b01f.tar.bz2
Address changes in Luna that make OSGI FrameworkTraceOptions internal.v201308280918
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/JSFCoreTraceOptions.java43
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java34
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java20
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner/META-INF/MANIFEST.MF3
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/PageDesignerTraceOptions.java50
5 files changed, 78 insertions, 72 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/JSFCoreTraceOptions.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/JSFCoreTraceOptions.java
index 4beb9e3..08fcf90 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/JSFCoreTraceOptions.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/JSFCoreTraceOptions.java
@@ -10,8 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.jsf.core.internal;
-import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
-import org.eclipse.osgi.service.debug.DebugOptions;
+import org.eclipse.core.runtime.Platform;
/**
* Defines that standard runtime trace options for debugging. See .options file
@@ -84,28 +83,25 @@ public final class JSFCoreTraceOptions
static
{
- final DebugOptions debugOptions = FrameworkDebugOptions.getDefault();
-
- ENABLED = debugOptions != null
- && debugOptions.getBooleanOption(JSFCorePlugin.PLUGIN_ID
- + KEY_DEBUG_ENABLED, false);
+ ENABLED = getBooleanOption(JSFCorePlugin.PLUGIN_ID
+ + KEY_DEBUG_ENABLED);
if (ENABLED)
{
- TRACE_JSPTAGINTROSPECTOR = debugOptions.getBooleanOption(
- JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGINTROSPECTOR, false);
- TRACE_JSPTAGREGISTRY = debugOptions.getBooleanOption(
- JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY, false);
- TRACE_JSPTAGREGISTRY_CHANGES = debugOptions.getBooleanOption(
- JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY_CHANGES, false);
- TRACE_TLDREGISTRYMANAGER = debugOptions.getBooleanOption(
- JSFCorePlugin.PLUGIN_ID + KEY_VIEW_TLDREGISTRYMANAGER, false);
- TRACE_JSPTAGREGISTRY_PERF = debugOptions.getBooleanOption(
- JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY_PERF, false);
- TRACE_JSPTAGINTROSPECTOR_PERF = debugOptions.getBooleanOption(
- JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGINTROSPECTOR_PERF, false);
- TRACE_JSPTAGPERSISTENCE = debugOptions.getBooleanOption(
- JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGPERSISTENCE, false);
+ TRACE_JSPTAGINTROSPECTOR = getBooleanOption(
+ JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGINTROSPECTOR);
+ TRACE_JSPTAGREGISTRY = getBooleanOption(
+ JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY);
+ TRACE_JSPTAGREGISTRY_CHANGES = getBooleanOption(
+ JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY_CHANGES);
+ TRACE_TLDREGISTRYMANAGER = getBooleanOption(
+ JSFCorePlugin.PLUGIN_ID + KEY_VIEW_TLDREGISTRYMANAGER);
+ TRACE_JSPTAGREGISTRY_PERF = getBooleanOption(
+ JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGREGISTRY_PERF);
+ TRACE_JSPTAGINTROSPECTOR_PERF = getBooleanOption(
+ JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGINTROSPECTOR_PERF);
+ TRACE_JSPTAGPERSISTENCE = getBooleanOption(
+ JSFCorePlugin.PLUGIN_ID + KEY_VIEW_JSPTAGPERSISTENCE);
}
else
{
@@ -119,6 +115,11 @@ public final class JSFCoreTraceOptions
}
}
+ private static boolean getBooleanOption(String key)
+ {
+ Boolean enabled = Boolean.valueOf(Platform.getDebugOption(key));
+ return enabled != null ? enabled.booleanValue() : false;
+ }
/**
* @param message
*/
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java
index 70250cc..b0434c2 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java
@@ -1,7 +1,6 @@
package org.eclipse.jst.jsf.facelet.core.internal;
-import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
-import org.eclipse.osgi.service.debug.DebugOptions;
+import org.eclipse.core.runtime.Platform;
/**
* Defines that standard runtime trace options for debugging. See .options file
@@ -47,22 +46,19 @@ public final class FaceletCoreTraceOptions
static
{
- final DebugOptions debugOptions = FrameworkDebugOptions.getDefault();
+ ENABLED = getBooleanOption(FaceletCorePlugin.PLUGIN_ID
+ + KEY_DEBUG_ENABLED);
- ENABLED = debugOptions != null
- && debugOptions.getBooleanOption(FaceletCorePlugin.PLUGIN_ID
- + KEY_DEBUG_ENABLED, false);
-
- if (ENABLED && debugOptions != null)
+ if (ENABLED)
{
- TRACE_REGISTRYMANAGER = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_VIEW_REGISTRYMANAGER, false);
- TRACE_FACETINSTALLDELEGATE = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_FACETINSTALLDELEGATE, false);
- TRACE_FACETUNINSTALLDELEGATE = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_FACETUNINSTALLDELEGATE, false);
- TRACE_FACETCHANGEDELEGATE = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_FACETCHANGEDELEGATE, false);
+ TRACE_REGISTRYMANAGER = getBooleanOption(
+ FaceletCorePlugin.PLUGIN_ID + KEY_VIEW_REGISTRYMANAGER);
+ TRACE_FACETINSTALLDELEGATE = getBooleanOption(
+ FaceletCorePlugin.PLUGIN_ID + KEY_FACETINSTALLDELEGATE);
+ TRACE_FACETUNINSTALLDELEGATE = getBooleanOption(
+ FaceletCorePlugin.PLUGIN_ID + KEY_FACETUNINSTALLDELEGATE);
+ TRACE_FACETCHANGEDELEGATE = getBooleanOption(
+ FaceletCorePlugin.PLUGIN_ID + KEY_FACETCHANGEDELEGATE);
}
else
{
@@ -72,6 +68,12 @@ public final class FaceletCoreTraceOptions
TRACE_FACETCHANGEDELEGATE = false;
}
}
+
+ private static boolean getBooleanOption(String key)
+ {
+ Boolean enabled = Boolean.valueOf(Platform.getDebugOption(key));
+ return enabled != null ? enabled.booleanValue() : false;
+ }
/**
* @param message
diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java
index 8c78cd5..338c0f0 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java
@@ -1,7 +1,6 @@
package org.eclipse.jst.jsf.ui.internal;
-import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
-import org.eclipse.osgi.service.debug.DebugOptions;
+import org.eclipse.core.runtime.Platform;
/**
* Defines that standard runtime trace options for debugging. See .options file
@@ -29,16 +28,13 @@ public final class JSFUITraceOptions
static
{
- final DebugOptions debugOptions = FrameworkDebugOptions.getDefault();
-
- ENABLED = debugOptions != null
- && debugOptions.getBooleanOption(JSFUiPlugin.PLUGIN_ID
- + KEY_DEBUG_ENABLED, false);
+ ENABLED = getBooleanOption(JSFUiPlugin.PLUGIN_ID
+ + KEY_DEBUG_ENABLED);
if (ENABLED)
{
- TRACE_METADATAGEN = debugOptions.getBooleanOption(
- JSFUiPlugin.PLUGIN_ID + KEY_DESIGNTIME, false);
+ TRACE_METADATAGEN = getBooleanOption(
+ JSFUiPlugin.PLUGIN_ID + KEY_DESIGNTIME);
}
else
{
@@ -46,6 +42,12 @@ public final class JSFUITraceOptions
}
}
+ private static boolean getBooleanOption(String key)
+ {
+ Boolean enabled = Boolean.valueOf(Platform.getDebugOption(key));
+ return enabled != null ? enabled.booleanValue() : false;
+ }
+
/**
* @param message
*/
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/META-INF/MANIFEST.MF b/jsf/plugins/org.eclipse.jst.pagedesigner/META-INF/MANIFEST.MF
index e40028a..abf1cfa 100644
--- a/jsf/plugins/org.eclipse.jst.pagedesigner/META-INF/MANIFEST.MF
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner/META-INF/MANIFEST.MF
@@ -33,7 +33,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.wst.sse.core;bundle-version="[1.1.0,1.2.0)",
org.eclipse.ui.views.properties.tabbed;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.0,3.5.0]",
- org.eclipse.jst.jsf.common.runtime;bundle-version="[1.0.201,2.0.0)"
+ org.eclipse.jst.jsf.common.runtime;bundle-version="[1.0.201,2.0.0)",
+ org.eclipse.osgi
Bundle-ActivationPolicy: lazy
Bundle-ManifestVersion: 2
Export-Package: org.eclipse.jst.pagedesigner;x-internal:=true,
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/PageDesignerTraceOptions.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/PageDesignerTraceOptions.java
index 5bcf32a..1c0cf87 100644
--- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/PageDesignerTraceOptions.java
+++ b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/PageDesignerTraceOptions.java
@@ -10,8 +10,7 @@
*******************************************************************************/
package org.eclipse.jst.pagedesigner;
-import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
-import org.eclipse.osgi.service.debug.DebugOptions;
+import org.eclipse.core.runtime.Platform;
/**
* Defines that standard runtime trace options for debugging. See .options file
@@ -59,32 +58,33 @@ public final class PageDesignerTraceOptions
static
{
- final DebugOptions debugOptions = FrameworkDebugOptions.getDefault();
final String pluginId = PDPlugin.getPluginId();
- ENABLED = debugOptions != null
- && debugOptions.getBooleanOption(pluginId
- + KEY_DEBUG_ENABLED, false);
-
- if (ENABLED)
- {
- TRACE_CONVERTERLOAD = debugOptions.getBooleanOption(
- pluginId + KEY_CONVERTER_LOAD, false);
- TRACE_CONVERTERSELECT = debugOptions.getBooleanOption(
- pluginId + KEY_CONVERTER_SELECTION, false);
- TRACE_ELEMENTEDITLOAD = debugOptions.getBooleanOption(
- pluginId + KEY_ELEMENTEDIT_LOAD, false);
- TRACE_ELEMENTEDITSELECTION = debugOptions.getBooleanOption(
- pluginId + KEY_ELEMENTEDIT_SELECTION, false);
- }
- else
- {
- TRACE_CONVERTERLOAD = false;
- TRACE_CONVERTERSELECT = false;
- TRACE_ELEMENTEDITLOAD = false;
- TRACE_ELEMENTEDITSELECTION = false;
- }
+
+ ENABLED = getBooleanOption(pluginId
+ + KEY_DEBUG_ENABLED);
+ if (ENABLED) {
+ TRACE_CONVERTERLOAD = getBooleanOption(pluginId
+ + KEY_CONVERTER_LOAD);
+ TRACE_CONVERTERSELECT = getBooleanOption(pluginId
+ + KEY_CONVERTER_SELECTION);
+ TRACE_ELEMENTEDITLOAD = getBooleanOption(pluginId
+ + KEY_ELEMENTEDIT_LOAD);
+ TRACE_ELEMENTEDITSELECTION = getBooleanOption(pluginId
+ + KEY_ELEMENTEDIT_SELECTION);
+ } else {
+ TRACE_CONVERTERLOAD = false;
+ TRACE_CONVERTERSELECT = false;
+ TRACE_ELEMENTEDITLOAD = false;
+ TRACE_ELEMENTEDITSELECTION = false;
+ }
}
+ private static boolean getBooleanOption(String key)
+ {
+ Boolean enabled = Boolean.valueOf(Platform.getDebugOption(key));
+ return enabled != null ? enabled.booleanValue() : false;
+ }
+
/**
* @param message
*/