1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 346215: Allow Tracepoints commands to have a comma in their name

This commit is contained in:
Marc Khouzam 2011-06-27 14:10:28 -04:00
parent ba8c7362d1
commit 9b697ac5a0
3 changed files with 9 additions and 3 deletions

View file

@ -132,7 +132,9 @@ public class TracepointActionsList extends Composite {
TableItem[] currentItems = table.getItems();
for (int i = 0; i < currentItems.length; i++) {
if (i > 0) {
result.append(',');
// Keep a delimiter between the different action strings
// so we can separate them again.
result.append(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
}
result.append(((ITracepointAction) currentItems[i].getData()).getName());
}
@ -179,7 +181,7 @@ public class TracepointActionsList extends Composite {
public void setNames(String actionNames) {
table.removeAll();
String[] names = actionNames.split(","); //$NON-NLS-1$
String[] names = actionNames.split(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
for (String actionName : names) {
ITracepointAction action = TracepointActionManager.getInstance().findAction(actionName);

View file

@ -39,6 +39,10 @@ public class TracepointActionManager {
private static final String TRACEPOINT_ACTION_DATA = "TracepointActionManager.actionData"; //$NON-NLS-1$
private static final TracepointActionManager fTracepointActionManager = new TracepointActionManager();
// We need a delimiter that the user won't type directly.
// Bug 346215
public static final String TRACEPOINT_ACTION_DELIMITER = "%_#"; //$NON-NLS-1$
private ArrayList<ITracepointAction> tracepointActions = null;
private TracepointActionManager() {

View file

@ -325,7 +325,7 @@ public class GDBBreakpoints_7_0 extends MIBreakpoints
}
private ITracepointAction[] generateGdbCommands(String actionStr) {
String[] actionNames = actionStr.split(","); //$NON-NLS-1$
String[] actionNames = actionStr.split(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
ITracepointAction[] actions = new ITracepointAction[actionNames.length];
TracepointActionManager actionManager = TracepointActionManager.getInstance();