Skip to content

Commit c1bc565

Browse files
committed
Merge branch 'development' into new_controls
# Conflicts: # PluginCore/PluginCore/Controls/CompletionList.cs # PluginCore/PluginCore/Controls/UITools.cs # PluginCore/ScintillaNet/ScintillaControl.cs
2 parents b3221fc + d330779 commit c1bc565

File tree

305 files changed

+15069
-2763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+15069
-2763
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ PluginCore/Bin
2424
/FlashDevelop/Bin/Debug/Exceptions.log
2525
/FlashDevelop/Bin/Debug/Tools/fdbuild/fdbuild.exe
2626
FlashDevelop/Bin/Debug/Settings/Themes/CURRENT
27+
packages/
Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
diff -r 1092d3d24959 include/SciLexer.h
2-
--- a/include/SciLexer.h Tue Jan 15 09:51:15 2013 +1100
3-
+++ b/include/SciLexer.h Wed Feb 06 22:13:27 2013 +0100
4-
@@ -161,6 +161,9 @@
5-
#define SCE_C_TRIPLEVERBATIM 21
6-
#define SCE_C_HASHQUOTEDSTRING 22
7-
#define SCE_C_PREPROCESSORCOMMENT 23
8-
+#define SCE_C_WORD3 24
9-
+#define SCE_C_WORD4 25
10-
+#define SCE_C_WORD5 26
1+
diff --git a/include/SciLexer.h b/include/SciLexer.h
2+
--- a/include/SciLexer.h
3+
+++ b/include/SciLexer.h
4+
@@ -177,6 +177,9 @@
5+
#define SCE_C_USERLITERAL 25
6+
#define SCE_C_TASKMARKER 26
7+
#define SCE_C_ESCAPESEQUENCE 27
8+
+#define SCE_C_WORD3 100
9+
+#define SCE_C_WORD4 101
10+
+#define SCE_C_WORD5 102
1111
#define SCE_D_DEFAULT 0
1212
#define SCE_D_COMMENT 1
1313
#define SCE_D_COMMENTLINE 2
14-
diff -r 1092d3d24959 lexers/LexCPP.cxx
15-
--- a/lexers/LexCPP.cxx Tue Jan 15 09:51:15 2013 +1100
16-
+++ b/lexers/LexCPP.cxx Wed Feb 06 22:13:27 2013 +0100
17-
@@ -247,6 +247,9 @@
18-
"Documentation comment keywords",
14+
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx
15+
--- a/lexers/LexCPP.cxx
16+
+++ b/lexers/LexCPP.cxx
17+
@@ -353,6 +353,9 @@
1918
"Global classes and typedefs",
2019
"Preprocessor definitions",
20+
"Task marker and error marker keywords",
2121
+ "Extended(1) keywords and identifiers",
2222
+ "Extended(2) keywords and identifiers",
2323
+ "Extended(3) keywords and identifiers",
2424
0,
2525
};
2626

27-
@@ -323,6 +326,9 @@
27+
@@ -443,6 +446,9 @@
2828
WordList keywords2;
2929
WordList keywords3;
3030
WordList keywords4;
31-
+ WordList keywords5;
32-
+ WordList keywords6;
33-
+ WordList keywords7;
31+
+ WordList keywords5;
32+
+ WordList keywords6;
33+
+ WordList keywords7;
3434
WordList ppDefinitions;
35-
std::map<std::string, std::string> preprocessorDefinitionsStart;
36-
OptionsCPP options;
37-
@@ -411,6 +417,15 @@
38-
case 4:
35+
WordList markerList;
36+
struct SymbolValue {
37+
@@ -587,6 +593,15 @@
3938
wordListN = &ppDefinitions;
4039
break;
41-
+ case 5:
42-
+ wordListN = &keywords5;
43-
+ break;
44-
+ case 6:
45-
+ wordListN = &keywords6;
46-
+ break;
47-
+ case 7:
48-
+ wordListN = &keywords7;
49-
+ break;
40+
case 5:
41+
+ wordListN = &keywords5;
42+
+ break;
43+
+ case 6:
44+
+ wordListN = &keywords6;
45+
+ break;
46+
+ case 7:
47+
+ wordListN = &keywords7;
48+
+ break;
49+
+ case 8:
50+
wordListN = &markerList;
51+
break;
5052
}
51-
int firstModification = -1;
52-
if (wordListN) {
53-
@@ -605,6 +620,12 @@
53+
@@ -809,6 +824,12 @@
5454
sc.ChangeState(SCE_C_WORD2|activitySet);
5555
} else if (keywords4.InList(s)) {
5656
sc.ChangeState(SCE_C_GLOBALCLASS|activitySet);
5757
+ } else if (keywords5.InList(s)) {
58-
+ sc.ChangeState(SCE_C_WORD3|activitySet);
59-
+ } else if (keywords6.InList(s)) {
60-
+ sc.ChangeState(SCE_C_WORD4|activitySet);
61-
+ } else if (keywords7.InList(s)) {
62-
+ sc.ChangeState(SCE_C_WORD5|activitySet);
63-
}
64-
const bool literalString = sc.ch == '\"';
65-
if (literalString || sc.ch == '\'') {
58+
+ sc.ChangeState(SCE_C_WORD3|activitySet);
59+
+ } else if (keywords6.InList(s)) {
60+
+ sc.ChangeState(SCE_C_WORD4|activitySet);
61+
+ } else if (keywords7.InList(s)) {
62+
+ sc.ChangeState(SCE_C_WORD5|activitySet);
63+
} else {
64+
int subStyle = classifierIdentifiers.ValueFor(s);
65+
if (subStyle >= 0) {

External/Plugins/AS2Context/Context.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public override void ResolveTopLevelElement(string token, ASResult result)
372372
if (!result.IsNull()) return;
373373

374374
// special _levelN
375-
if (hasLevels && token.StartsWith("_") && re_level.IsMatch(token))
375+
if (hasLevels && token.StartsWith('_') && re_level.IsMatch(token))
376376
{
377377
result.Member = new MemberModel();
378378
result.Member.Name = token;
@@ -720,7 +720,7 @@ private ClassModel LookupClass(string package, string cname, string inPackage, b
720720
// in the same (or parent) package
721721
else if (testSamePackage)
722722
{
723-
if (inPackage == pkg || (matchParentPackage && pkg.Length < pLen && inPackage.StartsWith(pkg + ".")))
723+
if (inPackage == pkg || (matchParentPackage && pkg.Length < pLen && inPackage.StartsWithOrdinal(pkg + ".")))
724724
foreach (ClassModel aClass in aFile.Classes)
725725
if (aClass.Name == cname /*&& (aFile.Module == "" || aFile.Module == aClass.Name)*/)
726726
{
@@ -795,7 +795,7 @@ public override void CheckModel(bool onFileOpen)
795795
{
796796
string pathname = package.Replace('.', Path.DirectorySeparatorChar);
797797
string fullpath = Path.GetDirectoryName(cFile.FileName);
798-
if (!fullpath.EndsWith(pathname))
798+
if (!fullpath.EndsWithOrdinal(pathname))
799799
{
800800
if (settings.FixPackageAutomatically && CurSciControl != null)
801801
{
@@ -842,7 +842,7 @@ public override void CheckModel(bool onFileOpen)
842842
string correctPath = null;
843843
foreach (PathModel pm in classpaths)
844844
{
845-
if (fullpath.IndexOf(pm.Path) > -1 && fullpath.Length > pm.Path.Length)
845+
if (fullpath.IndexOfOrdinal(pm.Path) > -1 && fullpath.Length > pm.Path.Length)
846846
{
847847
correctPath = fullpath.Substring(pm.Path.Length + 1);
848848
}
@@ -882,7 +882,7 @@ public override void CheckModel(bool onFileOpen)
882882
{
883883
if (package.Length > 0) cname = package + "." + cname;
884884
string filename = cname.Replace('.', Path.DirectorySeparatorChar) + Path.GetExtension(cFile.FileName);
885-
if (!cFile.FileName.ToUpper().EndsWith(filename.ToUpper()))
885+
if (!cFile.FileName.ToUpper().EndsWithOrdinal(filename.ToUpper()))
886886
{
887887
string org = TextHelper.GetString("Info.TypeDontMatchFileName");
888888
string msg = String.Format(org, cname) + "\n" + cFile.FileName;
@@ -1025,7 +1025,7 @@ public override FileModel ResolvePackage(string name, bool lazyMode)
10251025
pModel.Members.Add(member.Clone() as MemberModel);
10261026
}
10271027
else if (package != prevPackage
1028-
&& (package.Length > name.Length && package.StartsWith(packagePrefix))) // imports
1028+
&& (package.Length > name.Length && package.StartsWithOrdinal(packagePrefix))) // imports
10291029
{
10301030
prevPackage = package;
10311031
if (nameLen > 1) package = package.Substring(nameLen);
@@ -1065,7 +1065,7 @@ private void PopulateClassesEntries(string package, string path, MemberList memb
10651065
foreach (string entry in fileEntries)
10661066
{
10671067
mname = GetLastStringToken(entry, dirSeparator);
1068-
mname = mname.Substring(0, mname.LastIndexOf("."));
1068+
mname = mname.Substring(0, mname.LastIndexOf('.'));
10691069
if (mname.Length > 0 && memberList.Search(mname, 0, 0) == null && re_token.IsMatch(mname))
10701070
{
10711071
type = mname;
@@ -1316,7 +1316,7 @@ public override void RunCMD(string append)
13161316
else mtascPath = Path.GetDirectoryName(mtascPath);
13171317

13181318
command += ";\"" + CurrentFile + "\"";
1319-
if (append == null || append.IndexOf("-swf-version") < 0)
1319+
if (append == null || append.IndexOfOrdinal("-swf-version") < 0)
13201320
command += " -version "+majorVersion;
13211321
// classpathes
13221322
foreach(PathModel aPath in classPath)

External/Plugins/AS3Context/AbcConverter.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Xml;
88
using ASCompletion.Context;
99
using ASCompletion.Model;
10+
using PluginCore;
1011
using SwfOp;
1112
using SwfOp.Data;
1213

@@ -53,7 +54,7 @@ private static void ParseDocumentation(ContentParser parser)
5354
if (parser.Docs.Count > 0)
5455
foreach (string docFile in parser.Docs.Keys)
5556
{
56-
if (docFile.EndsWith(".dita.xml"))
57+
if (docFile.EndsWithOrdinal(".dita.xml"))
5758
continue;
5859
try
5960
{
@@ -177,7 +178,7 @@ public static void Convert(ContentParser parser, PathModel path, IASContext cont
177178
type.Access = Visibility.Private;
178179
type.Namespace = "private";
179180
string genType = type.Name;
180-
if (type.Name.IndexOf("$") > 0)
181+
if (type.Name.IndexOf('$') > 0)
181182
{
182183
string[] itype = type.Name.Split('$');
183184
genType = itype[0];
@@ -192,7 +193,7 @@ public static void Convert(ContentParser parser, PathModel path, IASContext cont
192193
}
193194
else genericTypes[genType] = model;
194195
}
195-
else if (type.Name.StartsWith("_") && string.IsNullOrEmpty(model.Package))
196+
else if (type.Name.StartsWith('_') && string.IsNullOrEmpty(model.Package))
196197
{
197198
type.Access = Visibility.Private;
198199
type.Namespace = "private";
@@ -703,7 +704,7 @@ private void ReadDeclaration(string declType)
703704
int colon = id.IndexOf(':') + 1;
704705
if (colon > 0)
705706
{
706-
int dup = id.IndexOf(id.Substring(0, colon), colon);
707+
int dup = id.IndexOfOrdinal(id.Substring(0, colon), colon);
707708
if (dup > 0) id = id.Substring(dup);
708709
}
709710
doc.ApiType = id;
@@ -719,7 +720,7 @@ private void ReadDeclaration(string declType)
719720

720721
if (id != null)
721722
{
722-
if (doc.ApiType == "String" && doc.Value != null && !doc.Value.StartsWith("\""))
723+
if (doc.ApiType == "String" && doc.Value != null && !doc.Value.StartsWith('\"'))
723724
doc.Value = "\"" + doc.Value + "\"";
724725

725726
if (doc.LongDesc == null)

External/Plugins/AS3Context/Compiler/FlexShells.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ public void QuickBuild(FileModel theFile, string flex2Path, bool requireTag, boo
271271

272272
// cleanup tag
273273
string tag = mCmd.Groups["cmd"].Value;
274-
if (tag.IndexOf("-->") > 0) tag = tag.Substring(0, tag.IndexOf("-->"));
275-
if (tag.IndexOf("]]>") > 0) tag = tag.Substring(0, tag.IndexOf("]]>"));
274+
if (tag.IndexOfOrdinal("-->") > 0) tag = tag.Substring(0, tag.IndexOfOrdinal("-->"));
275+
if (tag.IndexOfOrdinal("]]>") > 0) tag = tag.Substring(0, tag.IndexOfOrdinal("]]>"));
276276
tag = " " + tag.Trim() + " --";
277277

278278
// split
@@ -299,7 +299,7 @@ public void QuickBuild(FileModel theFile, string flex2Path, bool requireTag, boo
299299
{
300300
string concat = ";";
301301
arg = tag.Substring(start, end - start).Trim();
302-
if (arg.StartsWith("+=") || arg.StartsWith("="))
302+
if (arg.StartsWithOrdinal("+=") || arg.StartsWith('='))
303303
{
304304
concat = arg.Substring(0, arg.IndexOf('=') + 1);
305305
arg = arg.Substring(concat.Length);
@@ -309,7 +309,7 @@ public void QuickBuild(FileModel theFile, string flex2Path, bool requireTag, boo
309309
{
310310
if (pswitch == op)
311311
{
312-
if (op.EndsWith("namespace"))
312+
if (op.EndsWithOrdinal("namespace"))
313313
{
314314
int sp = arg.IndexOf(' ');
315315
if (sp > 0)
@@ -320,10 +320,10 @@ public void QuickBuild(FileModel theFile, string flex2Path, bool requireTag, boo
320320
}
321321
isPath = true;
322322
// remove quotes
323-
if (arg.StartsWith("\"") && arg.EndsWith("\""))
323+
if (arg.StartsWith('\"') && arg.EndsWith('\"'))
324324
arg = arg.Substring(1, arg.Length - 2);
325325

326-
if (!arg.StartsWith("\\") && !Path.IsPathRooted(arg))
326+
if (!arg.StartsWith('\\') && !Path.IsPathRooted(arg))
327327
arg = Path.Combine(buildPath, arg);
328328
}
329329
}
@@ -332,7 +332,7 @@ public void QuickBuild(FileModel theFile, string flex2Path, bool requireTag, boo
332332
builtSWF = arg;
333333
hasOutput = true;
334334
}
335-
if (!isPath) arg = arg.Replace(" ", ";");
335+
if (!isPath) arg = arg.Replace(' ', ';');
336336
cmd += op + concat + arg + ";";
337337
}
338338
else cmd += op + ";";
@@ -347,7 +347,7 @@ public void QuickBuild(FileModel theFile, string flex2Path, bool requireTag, boo
347347
else if (requireTag) return;
348348

349349
// Flex4 static linking
350-
if (isFlex4SDK && cmd.IndexOf("-static-link-runtime-shared-libraries") < 0)
350+
if (isFlex4SDK && cmd.IndexOfOrdinal("-static-link-runtime-shared-libraries") < 0)
351351
cmd += ";-static-link-runtime-shared-libraries=true";
352352

353353
// add current class sourcepath and global classpaths
@@ -382,7 +382,7 @@ private void CheckIsFlex4SDK(string flexPath)
382382
if (File.Exists(flexDesc))
383383
{
384384
string src = File.ReadAllText(flexDesc);
385-
isFlex4SDK = src.IndexOf("<version>4") > 0;
385+
isFlex4SDK = src.IndexOfOrdinal("<version>4") > 0;
386386
}
387387
else isFlex4SDK = false;
388388
}
@@ -473,7 +473,7 @@ private void StartMxmlcRunner(string flexPath)
473473

474474
private void ascRunner_Error(object sender, string line)
475475
{
476-
if (line.StartsWith("[Compiler] Error"))
476+
if (line.StartsWithOrdinal("[Compiler] Error"))
477477
{
478478
errorState = 1;
479479
errorDesc = line.Substring(10);
@@ -500,7 +500,7 @@ private void ascRunner_Error(object sender, string line)
500500
}
501501
else if (errorState > 0)
502502
{
503-
if (line.IndexOf("error found") > 0) errorState = 0;
503+
if (line.IndexOfOrdinal("error found") > 0) errorState = 0;
504504
}
505505
else if (line.Trim().Length > 0) ascRunner_OutputError(sender, line);
506506
}
@@ -510,7 +510,7 @@ private void ascRunner_OutputError(object sender, string line)
510510
if (line == null) return;
511511
PluginBase.RunAsync(delegate
512512
{
513-
if (line.StartsWith("Exception "))
513+
if (line.StartsWithOrdinal("Exception "))
514514
{
515515
TraceManager.AddAsync(line, -3);
516516
return;
@@ -534,9 +534,9 @@ private void ascRunner_OutputError(object sender, string line)
534534

535535
private void ascRunner_Output(object sender, string line)
536536
{
537-
if (line.StartsWith("(ash)"))
537+
if (line.StartsWithOrdinal("(ash)"))
538538
{
539-
if (line.IndexOf("Done") > 0)
539+
if (line.IndexOfOrdinal("Done") > 0)
540540
{
541541
running = false;
542542
if (!silentChecking && !notificationSent)
@@ -565,7 +565,7 @@ private void mxmlcRunner_Output(object sender, string line)
565565
{
566566
PluginBase.RunAsync(delegate
567567
{
568-
if (!notificationSent && line.StartsWith("Done("))
568+
if (!notificationSent && line.StartsWithOrdinal("Done("))
569569
{
570570
running = false;
571571
TraceManager.Add(line, -2);

External/Plugins/AS3Context/Context.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public override void BuildClassPath()
199199
List<string> addLibs = new List<string>();
200200
List<string> addLocales = new List<string>();
201201

202-
if (!Directory.Exists(sdkLibs) && !sdkLibs.StartsWith("$")) // fallback
202+
if (!Directory.Exists(sdkLibs) && !sdkLibs.StartsWith('$')) // fallback
203203
{
204204
sdkLibs = PathHelper.ResolvePath(PathHelper.ToolDir + S + "flexlibs" + S + "frameworks" + S + "libs" + S + "player");
205205
}
@@ -225,7 +225,7 @@ public override void BuildClassPath()
225225
if (playerglobal != null)
226226
{
227227
// add missing SWC in new SDKs
228-
if (!swcPresent && sdkLibs.IndexOf(S + "flexlibs") < 0 && Directory.Exists(compiler))
228+
if (!swcPresent && sdkLibs.IndexOfOrdinal(S + "flexlibs") < 0 && Directory.Exists(compiler))
229229
{
230230
string swcDir = sdkLibs + S + "player" + S;
231231
if (!Directory.Exists(swcDir + "9") && !Directory.Exists(swcDir + "10"))

0 commit comments

Comments
 (0)