~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAListResult.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
7
 
 * 
8
 
 * Contributors:
9
 
 *     Wind River Systems - initial API and implementation
10
 
 *******************************************************************************/
11
 
package org.eclipse.cdt.examples.dsf.pda.service.commands;
12
 
 
13
 
import java.util.ArrayList;
14
 
import java.util.List;
15
 
import java.util.StringTokenizer;
16
 
 
17
 
import org.eclipse.cdt.dsf.concurrent.Immutable;
18
 
 
19
 
 
20
 
/**
21
 
 * @see PDADataCommand
22
 
 */
23
 
@Immutable
24
 
public class PDAListResult extends PDACommandResult {
25
 
    
26
 
    final public String[] fValues;
27
 
    
28
 
    PDAListResult(String response) {
29
 
        super(response);
30
 
        StringTokenizer st = new StringTokenizer(response, "|");
31
 
        List<String> valuesList = new ArrayList<String>();
32
 
        
33
 
        while (st.hasMoreTokens()) {
34
 
            String token = st.nextToken();
35
 
            if (token.length() != 0) {
36
 
                valuesList.add(token);
37
 
            }
38
 
        }
39
 
        
40
 
        fValues = new String[valuesList.size()];
41
 
        for (int i = 0; i < valuesList.size(); i++) {
42
 
            fValues[i] = valuesList.get(i);
43
 
        }
44
 
    }
45
 
}