11using System ;
2- using System . Collections ;
3- using System . Collections . Specialized ;
42using System . Collections . Generic ;
5- using System . Text . RegularExpressions ;
63using System . IO ;
7- using System . Diagnostics ;
8- using System . Windows . Forms ;
9- using PluginCore ;
10- using PluginCore . Managers ;
11- using PluginCore . Controls ;
12- using ASCompletion . Context ;
4+ using System . Text . RegularExpressions ;
135using ASCompletion . Completion ;
6+ using ASCompletion . Context ;
147using ASCompletion . Model ;
158using ASCompletion . Settings ;
16- using PluginCore . Localization ;
9+ using PluginCore ;
10+ using PluginCore . Controls ;
1711using PluginCore . Helpers ;
12+ using PluginCore . Localization ;
13+ using PluginCore . Managers ;
1814
1915namespace AS2Context
2016{
@@ -169,28 +165,28 @@ public override void BuildClassPath()
169165
170166 string path ;
171167 if ( ( as2settings . UseMtascIntrinsic || String . IsNullOrEmpty ( as2settings . MMClassPath ) )
172- && ! String . IsNullOrEmpty ( mtascPath ) && System . IO . Directory . Exists ( mtascPath ) )
168+ && ! String . IsNullOrEmpty ( mtascPath ) && Directory . Exists ( mtascPath ) )
173169 {
174170 try
175171 {
176172 if ( majorVersion == 9 )
177173 {
178174 path = Path . Combine ( mtascPath , "std9" ) ;
179- if ( System . IO . Directory . Exists ( path ) ) AddPath ( path ) ;
175+ if ( Directory . Exists ( path ) ) AddPath ( path ) ;
180176 else majorVersion = 8 ;
181177 }
182178 if ( majorVersion == 8 )
183179 {
184180 path = Path . Combine ( mtascPath , "std8" ) ;
185- if ( System . IO . Directory . Exists ( path ) ) AddPath ( path ) ;
181+ if ( Directory . Exists ( path ) ) AddPath ( path ) ;
186182 }
187183 path = Path . Combine ( mtascPath , "std" ) ;
188- if ( System . IO . Directory . Exists ( path ) ) AddPath ( path ) ;
184+ if ( Directory . Exists ( path ) ) AddPath ( path ) ;
189185 }
190186 catch { }
191187 }
192188 // Macromedia/Adobe
193- if ( ! String . IsNullOrEmpty ( as2settings . MMClassPath ) && System . IO . Directory . Exists ( as2settings . MMClassPath ) )
189+ if ( ! String . IsNullOrEmpty ( as2settings . MMClassPath ) && Directory . Exists ( as2settings . MMClassPath ) )
194190 {
195191 if ( classPath . Count == 0 )
196192 {
@@ -199,13 +195,13 @@ public override void BuildClassPath()
199195 if ( tempVersion > 8 )
200196 {
201197 path = Path . Combine ( as2settings . MMClassPath , "FP" + tempVersion ) ;
202- if ( System . IO . Directory . Exists ( path ) )
198+ if ( Directory . Exists ( path ) )
203199 AddPath ( path ) ;
204200 // now add FP8
205201 tempVersion = 8 ;
206202 }
207203 path = Path . Combine ( as2settings . MMClassPath , "FP" + Math . Max ( 7 , tempVersion ) ) ;
208- if ( System . IO . Directory . Exists ( path ) )
204+ if ( Directory . Exists ( path ) )
209205 {
210206 PathModel aPath = new PathModel ( path , this ) ;
211207 ManualExploration ( aPath , new string [ ] { "aso" , "FP7" , "FP8" , "FP9" } ) ;
@@ -342,22 +338,22 @@ public override void ResolveTopLevelElement(string token, ASResult result)
342338 if ( topLevel != null && topLevel . Members . Count > 0 )
343339 {
344340 // current class
345- ClassModel inClass = ASContext . Context . CurrentClass ;
341+ ClassModel inClass = Context . CurrentClass ;
346342 if ( token == "this" )
347343 {
348344 result . Member = topLevel . Members . Search ( "this" , 0 , 0 ) ;
349345 if ( inClass . IsVoid ( ) )
350- inClass = ASContext . Context . ResolveType ( result . Member . Type , null ) ;
346+ inClass = Context . ResolveType ( result . Member . Type , null ) ;
351347 result . Type = inClass ;
352- result . InFile = ASContext . Context . CurrentModel ;
348+ result . InFile = Context . CurrentModel ;
353349 return ;
354350 }
355351 else if ( token == "super" )
356352 {
357353 if ( inClass . IsVoid ( ) )
358354 {
359355 MemberModel thisMember = topLevel . Members . Search ( "this" , 0 , 0 ) ;
360- inClass = ASContext . Context . ResolveType ( thisMember . Type , null ) ;
356+ inClass = Context . ResolveType ( thisMember . Type , null ) ;
361357 }
362358 inClass . ResolveExtends ( ) ;
363359 ClassModel extends = inClass . Extends ;
@@ -453,10 +449,10 @@ public override MemberList ResolveImports(FileModel inFile)
453449 /// <param name="atLine">Position in the file</param>
454450 public override bool IsImported ( MemberModel member , int atLine )
455451 {
456- FileModel cFile = ASContext . Context . CurrentModel ;
452+ FileModel cFile = Context . CurrentModel ;
457453 string fullName = member . Type ;
458454 string name = member . Name ;
459- int lineMin = ( ASContext . Context . InPrivateSection ) ? cFile . PrivateSectionIndex : 0 ;
455+ int lineMin = ( Context . InPrivateSection ) ? cFile . PrivateSectionIndex : 0 ;
460456 int lineMax = atLine ;
461457 foreach ( MemberModel import in cFile . Imports )
462458 {
@@ -991,7 +987,7 @@ public override FileModel ResolvePackage(string name, bool lazyMode)
991987 if ( lazyMode || settings . LazyClasspathExploration || aPath . IsTemporaryPath )
992988 {
993989 string path = Path . Combine ( aPath . Path , packagePath ) ;
994- if ( aPath . IsValid && System . IO . Directory . Exists ( path ) )
990+ if ( aPath . IsValid && Directory . Exists ( path ) )
995991 {
996992 try
997993 {
@@ -1058,7 +1054,7 @@ private void PopulateClassesEntries(string package, string path, MemberList memb
10581054 string [ ] fileEntries = null ;
10591055 try
10601056 {
1061- fileEntries = System . IO . Directory . GetFiles ( path , "*" + settings . DefaultExtension ) ;
1057+ fileEntries = Directory . GetFiles ( path , "*" + settings . DefaultExtension ) ;
10621058 }
10631059 catch { }
10641060 if ( fileEntries == null ) return ;
@@ -1083,7 +1079,7 @@ private void PopulatePackageEntries(string package, string path, MemberList memb
10831079 string [ ] dirEntries = null ;
10841080 try
10851081 {
1086- dirEntries = System . IO . Directory . GetDirectories ( path ) ;
1082+ dirEntries = Directory . GetDirectories ( path ) ;
10871083 }
10881084 catch { }
10891085 if ( dirEntries == null ) return ;
0 commit comments