mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[206642] changes to allow for java 1.4 on server
This commit is contained in:
parent
17fc645844
commit
34cf468e73
3 changed files with 31 additions and 12 deletions
|
@ -1094,7 +1094,7 @@ public class CommandMinerThread extends MinerThread
|
||||||
DataElement object = null;
|
DataElement object = null;
|
||||||
if (parsedMsg.type.equals("prompt"))
|
if (parsedMsg.type.equals("prompt"))
|
||||||
{
|
{
|
||||||
if (fileName.contains("~"))
|
if (fileName.indexOf("~") != -1)
|
||||||
{
|
{
|
||||||
String userHome = System.getProperty("user.home");
|
String userHome = System.getProperty("user.home");
|
||||||
fileName = fileName.replace("~", userHome);
|
fileName = fileName.replace("~", userHome);
|
||||||
|
|
|
@ -220,7 +220,9 @@ public class OutputHandler extends Handler {
|
||||||
}
|
}
|
||||||
|
|
||||||
String lastLine = output[index - 1];
|
String lastLine = output[index - 1];
|
||||||
if (!_endOfStream && (!fullOutput.endsWith("\n") && !fullOutput.endsWith("\r"))) //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
|
if (!_endOfStream &&
|
||||||
|
(!fullOutput.endsWith("\n") && !fullOutput.endsWith("\r"))) //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
{
|
{
|
||||||
// our last line may be cut off
|
// our last line may be cut off
|
||||||
byte[] lastBytes = new byte[MAX_OFFSET];
|
byte[] lastBytes = new byte[MAX_OFFSET];
|
||||||
|
@ -251,9 +253,12 @@ public class OutputHandler extends Handler {
|
||||||
{
|
{
|
||||||
lastBytes[lastIndex] = (byte)c;
|
lastBytes[lastIndex] = (byte)c;
|
||||||
|
|
||||||
|
|
||||||
// check for end of line
|
// check for end of line
|
||||||
String suffix = new String(lastBytes, 0, lastIndex + 1, encoding);
|
String suffix = new String(lastBytes, 0, lastIndex + 1, encoding);
|
||||||
if (suffix.contains("\r") || suffix.contains("\n")) //$NON-NLS-1$ //$NON-NLS-2$
|
int rBreak = suffix.indexOf("\r");
|
||||||
|
int nBreak = suffix.indexOf("\n");
|
||||||
|
if (nBreak != -1 || rBreak != -1)
|
||||||
{
|
{
|
||||||
// we've hit the end of line;
|
// we've hit the end of line;
|
||||||
output[index - 1] = lastLine + suffix.substring(0, suffix.length() - 1);
|
output[index - 1] = lastLine + suffix.substring(0, suffix.length() - 1);
|
||||||
|
|
|
@ -253,10 +253,17 @@ public class Patterns
|
||||||
String objType = curLine.substring(0, firstSpace);
|
String objType = curLine.substring(0, firstSpace);
|
||||||
String matchOrder = curLine.substring(firstSpace + 1, patternWord).trim();
|
String matchOrder = curLine.substring(firstSpace + 1, patternWord).trim();
|
||||||
String patternString = curLine.substring(firstEquals + 1, curLine.length());
|
String patternString = curLine.substring(firstEquals + 1, curLine.length());
|
||||||
Pattern thePattern = Pattern.compile(patternString.trim());
|
try
|
||||||
|
{
|
||||||
|
Pattern thePattern = Pattern.compile(patternString.trim());
|
||||||
|
|
||||||
if (curCommand != null)
|
if (curCommand != null)
|
||||||
curCommand.addOutputPattern(new OutputPattern(objType, matchOrder, thePattern));
|
curCommand.addOutputPattern(new OutputPattern(objType, matchOrder, thePattern));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -300,7 +307,14 @@ public class Patterns
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
matchedOutput = curCommand.matchLine(theLine);
|
try
|
||||||
|
{
|
||||||
|
matchedOutput = curCommand.matchLine(theLine);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue