Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Ptaszkiewicz2014-11-17 10:25:37 +0000
committerSzymon Ptaszkiewicz2014-11-17 10:25:37 +0000
commita815daa5c69d96456f62d9fb088f0ef2f2feda80 (patch)
tree2cee158dc49cd6505c06da48168c863975258dc8
parent1d8aca23ea32306beacb5e95249cd38c0116bac7 (diff)
downloadeclipse.platform.team-a815daa5c69d96456f62d9fb088f0ef2f2feda80.tar.gz
eclipse.platform.team-a815daa5c69d96456f62d9fb088f0ef2f2feda80.tar.xz
eclipse.platform.team-a815daa5c69d96456f62d9fb088f0ef2f2feda80.zip
Bug 451741 - Add org.eclipse.team.cvs.ui plugin to General > Tracing preference page
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.properties4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml13
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java19
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java23
4 files changed, 42 insertions, 17 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.properties b/bundles/org.eclipse.team.cvs.ui/plugin.properties
index 85b0de671..bece733cf 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.properties
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2012 IBM Corporation and others.
+# Copyright (c) 2000, 2014 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
@@ -276,3 +276,5 @@ newLocation.description = Add a new CVS repository location
newLocation.name = Add Repository Location
PasteConnectionaction.label=&Paste Connection
+
+TraceComponentLabel=Platform Team CVS UI
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index d2b580614..8f66d979b 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2001, 2012 IBM Corporation and others.
+ Copyright (c) 2001, 2014 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
@@ -2078,6 +2078,17 @@
page="org.eclipse.team.internal.ccvs.ui.wizards.CVSScmUrlImportWizardPage">
</scmUrlImportPage>
</extension>
+ <extension
+ point="org.eclipse.ui.trace.traceComponents">
+ <component
+ id="org.eclipse.team.cvs.ui.trace"
+ label="%TraceComponentLabel">
+ <bundle
+ consumed="false"
+ name="org.eclipse.team.cvs.ui">
+ </bundle>
+ </component>
+ </extension>
<!-- Commented out awaiting menu support from UI
<extension
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
index 0112f1453..9a84b24c3 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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,8 @@ import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.osgi.service.debug.DebugOptions;
+import org.eclipse.osgi.service.debug.DebugOptionsListener;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
@@ -47,6 +49,7 @@ import org.eclipse.team.internal.ui.*;
import org.eclipse.ui.*;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
/**
* UI Plugin for CVS provider-specific workbench functionality.
@@ -62,7 +65,8 @@ public class CVSUIPlugin extends AbstractUIPlugin {
* Property constant indicating the decorator configuration has changed.
*/
public static final String P_DECORATORS_CHANGED = CVSUIPlugin.ID + ".P_DECORATORS_CHANGED"; //$NON-NLS-1$
-
+
+ private ServiceRegistration debugRegistration;
private Hashtable imageDescriptors = new Hashtable(20);
private static List propertyChangeListeners = new ArrayList(5);
@@ -679,7 +683,12 @@ public class CVSUIPlugin extends AbstractUIPlugin {
*/
public void start(BundleContext context) throws Exception {
super.start(context);
-
+
+ // register debug options listener
+ Hashtable properties = new Hashtable(2);
+ properties.put(DebugOptions.LISTENER_SYMBOLICNAME, ID);
+ debugRegistration = context.registerService(DebugOptionsListener.class, Policy.DEBUG_OPTIONS_LISTENER, properties);
+
initializeImages();
CVSAdapterFactory factory = new CVSAdapterFactory();
@@ -714,6 +723,10 @@ public class CVSUIPlugin extends AbstractUIPlugin {
*/
public void stop(BundleContext context) throws Exception {
try {
+ // unregister debug options listener
+ debugRegistration.unregister();
+ debugRegistration = null;
+
try {
if (repositoryManager != null)
repositoryManager.shutdown();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
index 99b06e53c..6201a9953 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -10,14 +10,11 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui;
-
import java.util.ResourceBundle;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.service.debug.DebugOptions;
+import org.eclipse.osgi.service.debug.DebugOptionsListener;
import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
public class Policy {
@@ -28,11 +25,13 @@ public class Policy {
public static boolean DEBUG_CONSOLE_BUFFERING = false;
public static boolean DEBUG_HISTORY = false;
- static {
- //init debug options
- DEBUG_CONSOLE_BUFFERING= "true".equalsIgnoreCase(Platform.getDebugOption(CVSUIPlugin.ID + "/consolebuffering")); //$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_HISTORY= "true".equalsIgnoreCase(Platform.getDebugOption(CVSUIPlugin.ID + "/history")); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ static final DebugOptionsListener DEBUG_OPTIONS_LISTENER = new DebugOptionsListener() {
+ public void optionsChanged(DebugOptions options) {
+ boolean DEBUG = options.getBooleanOption(CVSUIPlugin.ID + "/debug", false); //$NON-NLS-1$
+ DEBUG_CONSOLE_BUFFERING = DEBUG && options.getBooleanOption(CVSUIPlugin.ID + "/consolebuffering", false); //$NON-NLS-1$
+ DEBUG_HISTORY = DEBUG && options.getBooleanOption(CVSUIPlugin.ID + "/history", false); //$NON-NLS-1$
+ }
+ };
/**
* Progress monitor helpers

Back to the top