mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Fixed # include problem (with space)
This commit is contained in:
parent
8dd6146ee7
commit
588529a752
6 changed files with 17555 additions and 1133 deletions
|
|
@ -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);
|
||||
|
|
|
|||
130
uppsrc/ide/app.tpp/Assist2_en-us.tpp
Normal file
130
uppsrc/ide/app.tpp/Assist2_en-us.tpp
Normal file
File diff suppressed because one or more lines are too long
15821
uppsrc/ide/app.tpp/Assist2_en-us.tppi
Normal file
15821
uppsrc/ide/app.tpp/Assist2_en-us.tppi
Normal file
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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue