mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
set command for patterns before running command
This commit is contained in:
parent
bc6dd4a8af
commit
b47dd96a8f
2 changed files with 15 additions and 5 deletions
|
@ -98,13 +98,18 @@ public class Patterns {
|
|||
CommandPattern curCommand;
|
||||
ParsedOutput matchedOutput = null;
|
||||
int commands = _theCommands.size();
|
||||
if (_currentCommand != null) {
|
||||
for (int i = 0; i < commands; i++) {
|
||||
if (_currentCommand != null)
|
||||
{
|
||||
|
||||
for (int i = 0; i < commands; i++)
|
||||
{
|
||||
curCommand = (CommandPattern) _theCommands.get(i);
|
||||
if (curCommand.matchCommand(_currentCommand)) {
|
||||
if (curCommand.matchCommand(_currentCommand))
|
||||
{
|
||||
matchedOutput = curCommand.matchLine(theLine);
|
||||
}
|
||||
if (matchedOutput != null) {
|
||||
if (matchedOutput != null)
|
||||
{
|
||||
return matchedOutput;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,10 @@ public class LocalServiceCommandShell extends ServiceCommandShell
|
|||
{
|
||||
type = parsedMsg.type;
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("parsedMsg = null");
|
||||
}
|
||||
if (event.isError())
|
||||
{
|
||||
output = new RemoteError(this, type);
|
||||
|
@ -124,8 +128,9 @@ public class LocalServiceCommandShell extends ServiceCommandShell
|
|||
|
||||
public void writeToShell(String cmd)
|
||||
{
|
||||
super.writeToShell(cmd);
|
||||
_patterns.update(cmd);
|
||||
super.writeToShell(cmd);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue