mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 15:15:25 +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
|
@ -245,7 +245,7 @@ public class CommandMinerThread extends MinerThread
|
|||
args[3] = _invocation;
|
||||
args[4] = "--login"; //$NON-NLS-1$
|
||||
didLogin = true;
|
||||
}
|
||||
}
|
||||
else if (isBash)
|
||||
{
|
||||
args = new String[5];
|
||||
|
@ -255,7 +255,7 @@ public class CommandMinerThread extends MinerThread
|
|||
args[3] = _invocation;
|
||||
args[4] = "-l"; //$NON-NLS-1$
|
||||
didLogin = true;
|
||||
}
|
||||
}
|
||||
else if (isSHonZ)
|
||||
{
|
||||
args = new String[5];
|
||||
|
@ -1094,7 +1094,7 @@ public class CommandMinerThread extends MinerThread
|
|||
DataElement object = null;
|
||||
if (parsedMsg.type.equals("prompt"))
|
||||
{
|
||||
if (fileName.contains("~"))
|
||||
if (fileName.indexOf("~") != -1)
|
||||
{
|
||||
String userHome = System.getProperty("user.home");
|
||||
fileName = fileName.replace("~", userHome);
|
||||
|
|
|
@ -220,7 +220,9 @@ public class OutputHandler extends Handler {
|
|||
}
|
||||
|
||||
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
|
||||
byte[] lastBytes = new byte[MAX_OFFSET];
|
||||
|
@ -250,10 +252,13 @@ public class OutputHandler extends Handler {
|
|||
else
|
||||
{
|
||||
lastBytes[lastIndex] = (byte)c;
|
||||
|
||||
|
||||
|
||||
// check for end of line
|
||||
String suffix = new String(lastBytes, 0, lastIndex + 1, encoding);
|
||||
if (suffix.contains("\r") || suffix.contains("\n")) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
String suffix = new String(lastBytes, 0, lastIndex + 1, encoding);
|
||||
int rBreak = suffix.indexOf("\r");
|
||||
int nBreak = suffix.indexOf("\n");
|
||||
if (nBreak != -1 || rBreak != -1)
|
||||
{
|
||||
// we've hit the end of line;
|
||||
output[index - 1] = lastLine + suffix.substring(0, suffix.length() - 1);
|
||||
|
|
|
@ -253,10 +253,17 @@ public class Patterns
|
|||
String objType = curLine.substring(0, firstSpace);
|
||||
String matchOrder = curLine.substring(firstSpace + 1, patternWord).trim();
|
||||
String patternString = curLine.substring(firstEquals + 1, curLine.length());
|
||||
Pattern thePattern = Pattern.compile(patternString.trim());
|
||||
|
||||
if (curCommand != null)
|
||||
curCommand.addOutputPattern(new OutputPattern(objType, matchOrder, thePattern));
|
||||
try
|
||||
{
|
||||
Pattern thePattern = Pattern.compile(patternString.trim());
|
||||
|
||||
if (curCommand != null)
|
||||
curCommand.addOutputPattern(new OutputPattern(objType, matchOrder, thePattern));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +307,14 @@ public class Patterns
|
|||
}
|
||||
else
|
||||
{
|
||||
matchedOutput = curCommand.matchLine(theLine);
|
||||
try
|
||||
{
|
||||
matchedOutput = curCommand.matchLine(theLine);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue