diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
index 7a00cbd08cc..5650256d7e3 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true
-Bundle-Version: 2.4.0.qualifier
+Bundle-Version: 2.5.0.qualifier
Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml
index 1245c0bfea0..a4f792244cb 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml
@@ -11,7 +11,7 @@
../../pom.xml
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
org.eclipse.cdt.dsf.gdb.ui
eclipse-plugin
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsList.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsList.java
index e4184e7bddc..83f2e7cb554 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsList.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsList.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Nokia and others.
+ * Copyright (c) 2007, 2015 Nokia 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
@@ -203,4 +203,22 @@ public class TracepointActionsList extends Composite {
downButton.setEnabled(selectedItems.length == 1 && selectedItems[0] < (table.getItemCount() - 1));
upButton.setEnabled(selectedItems.length == 1 && selectedItems[0] > 0);
}
+
+ /**
+ * Update the appearance of given action.
+ * @param action
+ */
+ void updateAction(ITracepointAction action) {
+ TableItem[] currentItems = table.getItems();
+ for (int i = 0; i < currentItems.length; i++) {
+ if (((ITracepointAction) currentItems[i].getData()).equals(action)) {
+ TableItem tableItem = currentItems[i];
+ tableItem.setText(0, action.getName());
+ tableItem.setText(1, action.getTypeName());
+ tableItem.setText(2, action.getSummary());
+ break;
+ }
+ }
+ updateButtons();
+ }
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java
index c12fbafec95..c1cb9443b9c 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Nokia and others.
+ * Copyright (c) 2010, 2015 Nokia 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
@@ -84,6 +84,9 @@ public class TracepointActionsPropertyPage extends PropertyPage {
String actionNames = tracepointMarker.getAttribute(BreakpointActionManager.BREAKPOINT_ACTION_ATTRIBUTE, ""); //$NON-NLS-1$
actionsList.setNames(actionNames);
+ // connect attached actions list to global list
+ globalActionsList.setClientList(actionsList);
+
globalActionsList.getAttachButton().addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -115,13 +118,8 @@ public class TracepointActionsPropertyPage extends PropertyPage {
* @since 7.0
*/
protected void HandleDeleteButton() {
+ // attached actions are now handled by the GlobalActionsList
- // First remove any attached action that was just deleted
- ITracepointAction[] selectedActions = globalActionsList.getSelectedActions();
- for (int i = 0; i < selectedActions.length; i++) {
- actionsList.removeAction(selectedActions[i]);
- }
- // Now cleanup the global action list
globalActionsList.HandleDeleteButton();
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointGlobalActionsList.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointGlobalActionsList.java
index c7c3142579c..7116d927b0b 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointGlobalActionsList.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointGlobalActionsList.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Ericsson and others.
+ * Copyright (c) 2010, 2015 Ericsson 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
@@ -38,6 +38,7 @@ public class TracepointGlobalActionsList extends Composite {
private Button editButton;
private Button newButton;
private Table table;
+ private TracepointActionsList clientList;
private boolean isSubAction;
public TracepointGlobalActionsList(Composite parent, int style, boolean useAttachButton, boolean isSub) {
@@ -149,6 +150,9 @@ public class TracepointGlobalActionsList extends Composite {
TableItem[] selectedItems = table.getSelection();
for (int i = 0; i < selectedItems.length; i++) {
ITracepointAction action = (ITracepointAction) selectedItems[i].getData();
+ if (clientList != null) {
+ clientList.removeAction(action);
+ }
TracepointActionManager.getInstance().deleteAction(action);
}
table.remove(table.getSelectionIndices());
@@ -170,6 +174,9 @@ public class TracepointGlobalActionsList extends Composite {
selectedItems[0].setText(0, action.getName());
selectedItems[0].setText(1, action.getTypeName());
selectedItems[0].setText(2, action.getSummary());
+ if (clientList != null) {
+ clientList.updateAction(action);
+ }
}
}
@@ -199,5 +206,12 @@ public class TracepointGlobalActionsList extends Composite {
deleteButton.setEnabled(selectedItems.length > 0);
editButton.setEnabled(selectedItems.length == 1);
}
-
+
+ /**
+ * Register client list to be notified of changes to actions.
+ * @param actionsList
+ */
+ void setClientList(TracepointActionsList actionsList) {
+ clientList = actionsList;
+ }
}