Skip to content

Commit 27296c6

Browse files
committed
Merge pull request #994 from SlavaRa/feature/refactoring_repalce_String_by_ASContext.Context_Features.stringKey
[Refactoring] Replace "String" by ASContext.Context.Features.stringKey
2 parents b165ae4 + 125d6aa commit 27296c6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

External/Plugins/ASCompletion/Completion/ASComplete.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ static private bool HandleDotCompletion(ScintillaControl Sci, bool autoHide)
19201920
result = new ASResult();
19211921
if (expr.Separator == '"')
19221922
{
1923-
tmpClass = ctx.ResolveType("String", null);
1923+
tmpClass = ctx.ResolveType(ctx.Features.stringKey, null);
19241924
result.Type = tmpClass;
19251925
dotIndex = 1;
19261926
}
@@ -2513,7 +2513,7 @@ static private ASResult EvalExpression(string expression, ASExpr context, FileMo
25132513
else if (token == "\"") // literal string
25142514
{
25152515
head = new ASResult();
2516-
head.Type = ASContext.Context.ResolveType("String", null);
2516+
head.Type = ASContext.Context.ResolveType(ASContext.Context.Features.stringKey, null);
25172517
}
25182518
else head = EvalVariable(token, context, inFile, inClass); // regular eval
25192519

External/Plugins/ASCompletion/Completion/ASGenerator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public static List<ICompletionListItem> ContextualGenerator(ScintillaControl Sci
313313
if (isNotInterface
314314
&& resolve.Member != null
315315
&& resolve.Type != null
316-
&& resolve.Type.QualifiedName == "String"
316+
&& resolve.Type.QualifiedName == ASContext.Context.Features.stringKey
317317
&& found.inClass != ClassModel.VoidClass)
318318
{
319319
int lineStartPos = Sci.PositionFromLine(Sci.CurrentLine);
@@ -1892,7 +1892,7 @@ public static int GetBodyStart(int lineFrom, int lineTo, ScintillaControl Sci, i
18921892

18931893
private static void GenerateToString(ClassModel inClass, ScintillaControl Sci, MemberModel member)
18941894
{
1895-
MemberModel resultMember = new MemberModel("toString", "String", FlagType.Function, Visibility.Public);
1895+
MemberModel resultMember = new MemberModel("toString", ASContext.Context.Features.stringKey, FlagType.Function, Visibility.Public);
18961896

18971897
bool isOverride = false;
18981898
inClass.ResolveExtends();
@@ -2261,7 +2261,7 @@ private static List<FunctionParameter> ParseFunctionParameters(ScintillaControl
22612261
if (isDoubleQuote)
22622262
{
22632263
result = new ASResult();
2264-
result.Type = ctx.ResolveType("String", null);
2264+
result.Type = ctx.ResolveType(ctx.Features.stringKey, null);
22652265
types.Add(result);
22662266
}
22672267
}
@@ -2276,7 +2276,7 @@ private static List<FunctionParameter> ParseFunctionParameters(ScintillaControl
22762276
if (isSingleQuote)
22772277
{
22782278
result = new ASResult();
2279-
result.Type = ctx.ResolveType("String", null);
2279+
result.Type = ctx.ResolveType(ctx.Features.stringKey, null);
22802280
types.Add(result);
22812281
}
22822282
}
@@ -2967,7 +2967,7 @@ private static StatementReturnType GetStatementReturnType(ScintillaControl Sci,
29672967
char c = (char)Sci.CharAt(pos);
29682968
if (c == '"' || c == '\'')
29692969
{
2970-
type = ctx.ResolveType("String", inClass.InFile);
2970+
type = ctx.ResolveType(ctx.Features.stringKey, inClass.InFile);
29712971
}
29722972
else if (c == '}')
29732973
{

0 commit comments

Comments
 (0)