Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2014-09-23 11:43:47 +0000
committerAnton Leherbauer2014-09-30 12:44:04 +0000
commitfc7b695c5ba063dea27fae58f0726488d4f5fcd2 (patch)
tree9f7b7dcdf51f200a31e13590dde5efdad8851402 /plugins/org.eclipse.tcf.cdt.ui
parent9405319247794b3f712479475b4839173a02668f (diff)
downloadorg.eclipse.tcf-fc7b695c5ba063dea27fae58f0726488d4f5fcd2.tar.gz
org.eclipse.tcf-fc7b695c5ba063dea27fae58f0726488d4f5fcd2.tar.xz
org.eclipse.tcf-fc7b695c5ba063dea27fae58f0726488d4f5fcd2.zip
Bug 444598 - Conflicting breakpoint type field editors
- disable breakpoint type contribution if o.e.cdt.debug.ui >= 7.4 - remove some obsolete NLS strings
Diffstat (limited to 'plugins/org.eclipse.tcf.cdt.ui')
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/CBreakpointTypeFieldEditorFactory.java32
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java8
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties8
3 files changed, 26 insertions, 22 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/CBreakpointTypeFieldEditorFactory.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/CBreakpointTypeFieldEditorFactory.java
index a06958fd8..c9e634fce 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/CBreakpointTypeFieldEditorFactory.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/CBreakpointTypeFieldEditorFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems and others.
+ * Copyright (c) 2012, 2014 Wind River Systems 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,13 +12,16 @@ package org.eclipse.tcf.internal.cdt.ui.breakpoints;
import org.eclipse.cdt.debug.core.model.ICBreakpointType;
import org.eclipse.cdt.debug.ui.breakpoints.IFieldEditorFactory;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.tcf.services.IBreakpoints;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
/**
- * HardwareFieldEditorFactory - Create the field editor for hardware breakpoint support.
+ * CBreakpointTypeFieldEditorFactory - Create the field editor for hardware breakpoint support.
*/
public class CBreakpointTypeFieldEditorFactory implements IFieldEditorFactory {
@@ -28,14 +31,31 @@ public class CBreakpointTypeFieldEditorFactory implements IFieldEditorFactory {
public final static String LABEL_HARDWARE = "Hardware";
public final static String LABEL_TEMPORARY = "Temporary";
+ private final static boolean fgNeedContribution = needContribution();
+
public FieldEditor createFieldEditor(String name, String labelText, Composite parent) {
- if (NAME_HARDWARE.equals(name)) {
- return new CBreakpointTypeFieldEditor (parent, LABEL_HARDWARE, ICBreakpointType.HARDWARE, IBreakpoints.CAPABILITY_BREAKPOINT_TYPE);
- } else if (NAME_TEMPORARY.equals(name)) {
- return new CBreakpointTypeFieldEditor (parent, LABEL_TEMPORARY, ICBreakpointType.TEMPORARY, IBreakpoints.CAPABILITY_TEMPORARY);
+ if (fgNeedContribution) {
+ if (NAME_HARDWARE.equals(name)) {
+ return new CBreakpointTypeFieldEditor (parent, LABEL_HARDWARE, ICBreakpointType.HARDWARE, IBreakpoints.CAPABILITY_BREAKPOINT_TYPE);
+ } else if (NAME_TEMPORARY.equals(name)) {
+ return new CBreakpointTypeFieldEditor (parent, LABEL_TEMPORARY, ICBreakpointType.TEMPORARY, IBreakpoints.CAPABILITY_TEMPORARY);
+ }
}
return null;
}
+ private static boolean needContribution() {
+ Bundle cdtDebugUi = Platform.getBundle("org.eclipse.cdt.debug.ui");
+ if (cdtDebugUi != null) {
+ int state = cdtDebugUi.getState();
+ if (state == Bundle.ACTIVE || state == Bundle.RESOLVED || state == Bundle.STARTING) {
+ Version version = cdtDebugUi.getVersion();
+ // if cdt.debug.ui version is at least 7.4 (CDT 8.4) we don't need the contribution
+ if (version.compareTo(Version.valueOf("7.4")) >= 0)
+ return false;
+ }
+ }
+ return true;
+ }
}
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
index fddfa8cfa..3abd2586d 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
@@ -15,11 +15,6 @@ public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.tcf.internal.cdt.ui.breakpoints.messages"; //$NON-NLS-1$
public static String TCFThreadFilterQueryExpressionStore;
- public static String TCFThreadFilterQueryModeButtonState;
- public static String TCFThreadUseDefaultTriggerScoping;
- public static String TCFThreadDefaultTriggerScope;
- public static String TCFThreadFilterQueryButtonBasic;
- public static String TCFThreadFilterQueryButtonAdvanced;
public static String TCFThreadFilterQueryButtonEdit;
public static String TCFThreadFilterQueryAdvancedLabel;
public static String TCFThreadFilterQueryTreeViewLabel;
@@ -34,13 +29,10 @@ public class Messages extends NLS {
public static String TCFThreadFilterEditorFormatError;
public static String TCFThreadFilterEditorUnbalancedParameters;
public static String TCFThreadFilterEditorNoOpenChannel;
- public static String TCFThreadFileterEditorInvalidQuery;
public static String TCFBreakpointPreferencesEnableDefaultTriggerScope;
public static String TCFBreakpointPreferencesTriggerScopeExpression;
public static String TCFBreakpointPreferencesDescription;
public static String TCFBreakpointToggle;
- public static String TCFBreakpointToggleCannotFindMemory;
- public static String TCFBreakpointToggleError;
public static String TCFBreakpointPrefrencesError;
public static String BreakpointScopeCategory_filter_label;
public static String BreakpointScopeCategory_contexts_label;
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties
index db2f678c5..1e06211dd 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/messages.properties
@@ -8,11 +8,6 @@
# Wind River Systems - initial API and implementation
###############################################################################
TCFThreadFilterQueryExpressionStore=TCFThreadFilter.ScopedExpressionList
-TCFThreadFilterQueryModeButtonState=TCFThreadFilter.radioBasic.Selection
-TCFThreadUseDefaultTriggerScoping=TCFThreadFilter.enableDefaulTriggerScopeCheckBox.Selection
-TCFThreadDefaultTriggerScope=Default Trigger Scope
-TCFThreadFilterQueryButtonBasic=Scope Settings
-TCFThreadFilterQueryButtonAdvanced=Default Settings
TCFThreadFilterQueryButtonEdit=Edit
TCFThreadFilterQueryAdvancedLabel=Breakpoint Scoping Expression:
TCFThreadFilterQueryTreeViewLabel=Restrict to Selected Contexts:
@@ -23,14 +18,11 @@ TCFThreadFilterEditor_defaultScopePrefsLink=<a>Breakpoint Default Scope Preferen
TCFThreadFilterEditorUnbalancedParameters=Parameters must be name value pairs
TCFThreadFilterEditorFormatError=Unquoted text must contain alphanumeric characters or '_'
TCFThreadFilterEditorNoOpenChannel=No open connection to target
-TCFThreadFileterEditorInvalidQuery=Invalid context query syntax:
TCFBreakpointPreferencesEnableDefaultTriggerScope=Apply scope to new breakpoints
TCFBreakpointPreferencesTriggerScopeExpression=Default Scope Expression
TCFBreakpointPreferencesDescription=Breakpoint settings for debuggers using Target Communication Framework (TCF)
TCFBreakpointPrefrencesError=TCF Breakpoint Types must be selected for these options
TCFBreakpointToggle=C/C++ Breakpoints ( Scope: {0} )
-TCFBreakpointToggleCannotFindMemory=Could not find a memory context. Please double check context selection, or change scoping rules
-TCFBreakpointToggleError=Error In Processing Breakpoint
BreakpointScopeCategory_filter_label=Filter: {0}
BreakpointScopeCategory_contexts_label=Contexts: {0}

Back to the top