CmdDenotate
- Corrected use of command line arguments for a pattern - now uses modification args instead of all words.
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
|
#include <Tree.h>
|
||||||
#include <Filter.h>
|
#include <Filter.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
@@ -63,18 +64,26 @@ int CmdDenotate::execute (std::string& output)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply the command line modifications to the completed task.
|
// Extract all the ORIGINAL MODIFICATION args as simple text patter.
|
||||||
std::vector <std::string> words = context.parser.getWords ();
|
std::string pattern = "";
|
||||||
if (!words.size ())
|
std::vector <Tree*>::iterator arg;
|
||||||
throw std::string (STRING_CMD_DENO_WORDS);
|
for (arg = context.parser.tree ()->_branches.begin ();
|
||||||
|
arg != context.parser.tree ()->_branches.end ();
|
||||||
|
++arg)
|
||||||
|
{
|
||||||
|
if ((*arg)->hasTag ("ORIGINAL") &&
|
||||||
|
(*arg)->hasTag ("MODIFICATION"))
|
||||||
|
{
|
||||||
|
if (pattern != "")
|
||||||
|
pattern += ' ';
|
||||||
|
|
||||||
|
pattern += (*arg)->attribute ("raw");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Accumulated project change notifications.
|
// Accumulated project change notifications.
|
||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
//std::string pattern = words.combine ();
|
|
||||||
std::string pattern;
|
|
||||||
join (pattern, " ", words);
|
|
||||||
|
|
||||||
std::vector <Task>::iterator task;
|
std::vector <Task>::iterator task;
|
||||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user