01: /*******************************************************************************
02: * Copyright (c) 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM - Initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.build.tasks;
11:
12: import org.eclipse.core.runtime.IStatus;
13:
14: public class TaskHelper {
15: public static StringBuffer statusToString(IStatus status,
16: StringBuffer b) {
17: IStatus[] nestedStatus = status.getChildren();
18: if (b == null)
19: b = new StringBuffer();
20: b.append(status.getMessage());
21: for (int i = 0; i < nestedStatus.length; i++) {
22: b.append('\n');
23: b.append(statusToString(nestedStatus[i], b));
24: }
25: return b;
26: }
27: }
|