use of org.talend.designer.runprocess.ProcessMessage in project tdi-studio-se by Talend.
the class ProcessComposite method addPerlMark.
protected void addPerlMark(IProcessMessage psMess) {
if (psMess.getType().equals(MsgType.STD_ERR)) {
String content = psMess.getContent();
String path = null;
String uniName = null;
int lineNo = -1;
//$NON-NLS-1$
Pattern errorPattern = Pattern.compile("(.*) at (\\S+) line (\\d+)[\\.,]");
Matcher m = errorPattern.matcher(content);
String matchContent = null;
while (m.find()) {
path = m.group(2);
lineNo = parseInt(m.group(3));
matchContent = m.group();
if ((!("".equals(path)) && path != null) && lineNo > 0) {
//$NON-NLS-1$
uniName = Problems.setErrorMark(path, lineNo);
}
if (uniName != null) {
if (!errorMessMap.containsKey(uniName)) {
errorMessMap.put(uniName, new ProcessMessage(MsgType.STD_ERR, matchContent));
} else {
String uniMess = errorMessMap.get(uniName).getContent();
errorMessMap.put(uniName, new ProcessMessage(MsgType.STD_ERR, uniMess.concat(matchContent)));
}
}
}
}
refreshNode(psMess);
}
Aggregations