1
/*******************************************************************************
2
* Copyright (c) 2008 Wind River Systems and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* Wind River Systems - initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.examples.dsf.pda.service.commands;
13
import java.util.ArrayList;
14
import java.util.List;
15
import java.util.StringTokenizer;
17
import org.eclipse.cdt.dsf.concurrent.Immutable;
24
public class PDAListResult extends PDACommandResult {
26
final public String[] fValues;
28
PDAListResult(String response) {
30
StringTokenizer st = new StringTokenizer(response, "|");
31
List<String> valuesList = new ArrayList<String>();
33
while (st.hasMoreTokens()) {
34
String token = st.nextToken();
35
if (token.length() != 0) {
36
valuesList.add(token);
40
fValues = new String[valuesList.size()];
41
for (int i = 0; i < valuesList.size(); i++) {
42
fValues[i] = valuesList.get(i);