blob: 4caea2cc82d15b0fa5729c51cf7bd43fbb7abc05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package org.yocto.sdk.remotetools.wizards.bsp;
/**
* BSPThread that processes the output lines from running command "yocto-bsp list" for the selected kernel
* @author ioana.grigoropol
*
*/
public class KernelBranchesGetter extends BSPThread {
public KernelBranchesGetter(String command) {
super(command);
}
@Override
protected String[] processLine(String line) {
// [TODO : Ioana]: find a better way to identify error lines
if (!line.startsWith("["))
return new String[]{ERROR, line + "\n"};
String[] items = line.split(",");
String value = items[0];
value = value.replace("[\"", "");
value = value.replaceAll("\"$", "");
return new String[]{SUCCESS, value};
}
}
|