ide: Fixed # include problem (with space)

This commit is contained in:
Mirek Fidler 2022-12-17 08:36:05 +01:00
parent 8dd6146ee7
commit 588529a752
6 changed files with 17555 additions and 1133 deletions

View file

@ -34,16 +34,19 @@ bool AssistEditor::DoIncludeTrick(Index<String>& visited, int level, StringBuffe
FileIn in(path);
while(!in.IsEof()) {
String l = in.GetLine();
String tl = TrimLeft(l);
if(!comment && tl.TrimStart("#include") && (*tl == ' ' || *tl == '\t')) {
tl = TrimBoth(tl);
CParser p(l);
if(!comment && p.Char('#') && p.Id("include")) {
String tl = TrimBoth(p.GetPtr());
String ipath = ppi.FindIncludeFile(tl, filedir);
if(ipath.GetCount()) {
if(NormalizePath(ipath) == NormalizePath(target_path))
return true;
int q = out.GetCount();
int qq = line_delta;
if(FindIndex(HdependGetDependencies(ipath), target_path) >= 0 && visited.Find(ipath) < 0 && level < 10
VectorMap<String, Time> result;
ArrayMap<String, Index<String>> define_includes;
ppi.GatherDependencies(ipath, result, define_includes);
if(result.Find(target_path) >= 0 && visited.Find(ipath) < 0 && level < 10
&& DoIncludeTrick(visited, level + 1, out, ipath, target_path, line_delta))
return true;
out.SetCount(q);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,10 @@ TOPIC("AndroidBuilder_en-us")
#include "AndroidBuilder_en-us.tppi"
END_TOPIC
TOPIC("Assist2_en-us")
#include "Assist2_en-us.tppi"
END_TOPIC
TOPIC("AssistParserDirectives_en-us")
#include "AssistParserDirectives_en-us.tppi"
END_TOPIC