public ParseSourceTreeControl() { InitializeComponent(); CodeBaseOptions = new CodeBaseOptions(); LoadCatalog(); ShowRunnerStatus(); }
public MainForm() { InitializeComponent(); _codeBaseOptions = new CodeBaseOptions(); _codeBaseOptions.LoadFromRegistry(); parseSourceTreeControl1.CodeBaseOptions = _codeBaseOptions; compilerOptionsControl1.CodeBaseOptions = _codeBaseOptions; }
public static CodeBase Execute(CodeBaseOptions options, BackgroundWorker backgroundWorker) { CodeBase codeBase = new CodeBase(options.CreateCompilerDefines(), new FileLoader()); CodeBaseWorker worker = new CodeBaseWorker(codeBase, options, backgroundWorker); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); try { worker.ExecuteInternal(); } catch(CancelException) { } stopwatch.Stop(); codeBase.ParseDuration = stopwatch.Elapsed; return codeBase; }
public CodeBaseOptions Clone() { CodeBaseOptions result = new CodeBaseOptions(); result.CompilerOptionsSetOff = CompilerOptionsSetOff; result.CompilerOptionsSetOn = CompilerOptionsSetOn; result.CustomDefines = CustomDefines; result.DelphiVersionDefine = DelphiVersionDefine; result.FalseIfConditions = FalseIfConditions; result.FileMasks = FileMasks; result.SearchPaths = SearchPaths; result.TrueIfConditions = TrueIfConditions; return(result); }
public static CodeBase Execute(CodeBaseOptions options, BackgroundWorker backgroundWorker) { CodeBase codeBase = new CodeBase(options.CreateCompilerDefines(), new FileLoader(false)); CodeBaseWorker worker = new CodeBaseWorker(codeBase, options, backgroundWorker); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); try { worker.ExecuteInternal(); } catch (CancelException) { } stopwatch.Stop(); codeBase.ParseDuration = stopwatch.Elapsed; return(codeBase); }
private IEnumerable <Token> GetSourceTokensForInclude(Token token, string baseName) { string currentDirectory = token.Location.Directory; string fileName = ""; foreach (string searchPath in CodeBaseOptions.Instance().SearchPaths.Split(';')) { currentDirectory = searchPath; fileName = _fileLoader.ExpandFileName(currentDirectory, baseName); if (File.Exists(fileName)) { break; } } string source = _fileLoader.Load(fileName); Lexer lexer = new Lexer(source, fileName); return(lexer.Tokens); }
private CodeBaseWorker(CodeBase codeBase, CodeBaseOptions options, BackgroundWorker backgroundWorker) { _codeBase = codeBase; _options = options; _backgroundWorker = backgroundWorker; }
private CodeBaseWorker(CodeBase codeBase, CodeBaseOptions options, BackgroundWorker backgroundWorker) { _codeBase = codeBase; _options = options; _backgroundWorker = backgroundWorker; }
public CodeBaseOptions() { _instance = this; }
public CodeBaseOptions Clone() { CodeBaseOptions result = new CodeBaseOptions(); result.CompilerOptionsSetOff = CompilerOptionsSetOff; result.CompilerOptionsSetOn = CompilerOptionsSetOn; result.CustomDefines = CustomDefines; result.DelphiVersionDefine = DelphiVersionDefine; result.FalseIfConditions = FalseIfConditions; result.FileMasks = FileMasks; result.SearchPaths = SearchPaths; result.TrueIfConditions = TrueIfConditions; return result; }
public void SetUp() { _options = new CodeBaseOptions(); }