1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-08 09:35:23 +02:00

set command for patterns before running command

This commit is contained in:
David McKnight 2006-06-30 16:18:40 +00:00
parent bc6dd4a8af
commit b47dd96a8f
2 changed files with 15 additions and 5 deletions

View file

@ -98,13 +98,18 @@ public class Patterns {
CommandPattern curCommand; CommandPattern curCommand;
ParsedOutput matchedOutput = null; ParsedOutput matchedOutput = null;
int commands = _theCommands.size(); int commands = _theCommands.size();
if (_currentCommand != null) { if (_currentCommand != null)
for (int i = 0; i < commands; i++) { {
for (int i = 0; i < commands; i++)
{
curCommand = (CommandPattern) _theCommands.get(i); curCommand = (CommandPattern) _theCommands.get(i);
if (curCommand.matchCommand(_currentCommand)) { if (curCommand.matchCommand(_currentCommand))
{
matchedOutput = curCommand.matchLine(theLine); matchedOutput = curCommand.matchLine(theLine);
} }
if (matchedOutput != null) { if (matchedOutput != null)
{
return matchedOutput; return matchedOutput;
} }
} }

View file

@ -82,6 +82,10 @@ public class LocalServiceCommandShell extends ServiceCommandShell
{ {
type = parsedMsg.type; type = parsedMsg.type;
} }
else
{
System.out.println("parsedMsg = null");
}
if (event.isError()) if (event.isError())
{ {
output = new RemoteError(this, type); output = new RemoteError(this, type);
@ -124,8 +128,9 @@ public class LocalServiceCommandShell extends ServiceCommandShell
public void writeToShell(String cmd) public void writeToShell(String cmd)
{ {
super.writeToShell(cmd);
_patterns.update(cmd); _patterns.update(cmd);
super.writeToShell(cmd);
} }
} }