public override void LoadOptions() { _project = (IVbpProject)this.Owner; _viewModel = new ViewModel(_project.GetOwnedProject(), this); this.DataContext = _viewModel; base.LoadOptions(); }
internal VB6UnresolvedFile(string fileName, string text, IVbpProject project) : this() { _fileName = fileName; this.Project = project; this.PartitionedFile = VbPartitionedFile.GetPartitionedFile(text); _module = ParseModule(this.PartitionedFile); ParseModuleIntoMembers(); }
private VbpProjectSymbolCache(IVbpProject project) : this() { _project = project; _namespace = new VB6Namespace(project.GetOwnedProject()); _assembly = new VB6Assembly(); _assembly.RootNamespace = _namespace; _assembly.Compilation = _compilation; _namespace.Compilation = _compilation; _compilation = new VB6Compilation(this); }
internal VB6UnresolvedTypeDefinition(IUnresolvedFile file, IVbModule module, IVbpProject project) : base(file, null) { this.Module = module; _typeKind = this.Module.ToTypeKind(); this.Accessibility = (_typeKind != TypeKind.Module) ? Accessibility.Public : Accessibility.Private; _events = new List <IUnresolvedEvent>(); _fields = new List <IUnresolvedField>(); _properties = new List <IUnresolvedProperty>(); _methods = new List <IUnresolvedMethod>(); _members = new List <IUnresolvedMember>(); this.DeclaringTypeDefinition = this; this.FullName = GetName(true); this.Name = GetName(false); this.Namespace = "(implicit)"; this.ReflectionName = GetName(true); ProcessModule(); }
internal static IVbpProjectSymbolCache FromProject(IVbpProject project) { VbpProjectSymbolCache impl = new VbpProjectSymbolCache(project); /* Initially iterate over each module, create its parse information, and cache it! */ List <ElementBase> files = new List <ElementBase>(); files.AddRange(project.GetOwnedProject().Modules); files.AddRange(project.GetOwnedProject().Classes); files.AddRange(project.GetOwnedProject().Forms); files.AddRange(project.GetOwnedProject().UserControls); foreach (ElementBase file in files) { string fn = file.GetAbsoluteFileName(project.GetOwnedProject()); ITextSource ts = new StringTextSource(File.ReadAllText(fn)); impl._cache[fn] = CreateParseInformation(fn, ts, project); } return(impl); }
internal VB6UnresolvedTypeDefinition(IUnresolvedFile file, IVbModule module, IVbpProject project) : base(file, null) { this.Module = module; _typeKind = this.Module.ToTypeKind(); this.Accessibility = (_typeKind != TypeKind.Module) ? Accessibility.Public : Accessibility.Private; _events = new List<IUnresolvedEvent>(); _fields = new List<IUnresolvedField>(); _properties = new List<IUnresolvedProperty>(); _methods = new List<IUnresolvedMethod>(); _members = new List<IUnresolvedMember>(); this.DeclaringTypeDefinition = this; this.FullName = GetName(true); this.Name = GetName(false); this.Namespace = "(implicit)"; this.ReflectionName = GetName(true); ProcessModule(); }
private static ParseInformation CreateParseInformation(string fileName, ITextSource ts, IVbpProject project) { IUnresolvedFile file = new VB6UnresolvedFile(fileName, ts.Text, project); return new VB6ParseInformation(file, ts.Version, true); }
internal static IVbpProjectSymbolCache FromProject(IVbpProject project) { VbpProjectSymbolCache impl = new VbpProjectSymbolCache(project); /* Initially iterate over each module, create its parse information, and cache it! */ List<ElementBase> files = new List<ElementBase>(); files.AddRange(project.GetOwnedProject().Modules); files.AddRange(project.GetOwnedProject().Classes); files.AddRange(project.GetOwnedProject().Forms); files.AddRange(project.GetOwnedProject().UserControls); foreach (ElementBase file in files) { string fn = file.GetAbsoluteFileName(project.GetOwnedProject()); ITextSource ts = new StringTextSource(File.ReadAllText(fn)); impl._cache[fn] = CreateParseInformation(fn, ts, project); } return impl; }
internal VbpProjectBehavior(IVbpProject project) { _project = project; }
ParseInformation IParser.Parse(FileName fileName, ITextSource fileContent, bool fullParseInformationRequested, IProject parentProject, CancellationToken cancellationToken) { IVbpProject project = SD.ProjectService.FindProjectContainingFile(fileName) as IVbpProject; return(project.SymbolCache.GetAndReparse(fileName, fileContent)); }
private static ParseInformation CreateParseInformation(string fileName, ITextSource ts, IVbpProject project) { IUnresolvedFile file = new VB6UnresolvedFile(fileName, ts.Text, project); return(new VB6ParseInformation(file, ts.Version, true)); }