blob: cd6931750786a63ffc6638c897024c291c618b6b (
plain) (
blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20070314 176886 pmoogk@ca.ibm.com - Peter Moogk
* 20070522 176943 pmoogk@ca.ibm.com - Peter Moogk
*******************************************************************************/
package org.eclipse.wst.command.internal.env.ant;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.wst.command.internal.env.eclipse.BaseStatusHandler;
import org.eclipse.wst.common.environment.Choice;
import org.eclipse.wst.common.environment.StatusException;
public class AntStatusHandler extends BaseStatusHandler
{
public Choice report(IStatus status, Choice[] choices) {
// TODO
checkStatus(status);
return null;
}
public void report(IStatus status) throws StatusException {
if (status.getSeverity() == IStatus.ERROR)
reportError(status);
else
reportInfo(status);
}
public void reportError(IStatus status) {
checkStatus(status);
System.err.println(status.getMessage());
}
public void reportInfo(IStatus status) {
checkStatus(status);
System.out.println(status.getMessage());
}
}
|