/// <summary> /// Constructor for the ReferenceNode. It is called when the project is reloaded, when the project element representing the refernce exists. /// </summary> public ProjectReferenceNode(ProjectNode root, ProjectElement element) : base(root, element) { this.referencedProjectRelativePath = this.ItemNode.GetMetadata(ProjectFileConstants.Include); Debug.Assert(!String.IsNullOrEmpty(this.referencedProjectRelativePath), "Could not retrieve referenced project path form project file"); string guidString = this.ItemNode.GetMetadata(ProjectFileConstants.Project); // Continue even if project setttings cannot be read. try { this.referencedProjectGuid = new Guid(guidString); this.buildDependency = new BuildDependency(this.ProjectMgr, this.referencedProjectGuid); this.ProjectMgr.AddBuildDependency(this.buildDependency); } finally { Debug.Assert(this.referencedProjectGuid != Guid.Empty, "Could not retrive referenced project guidproject file"); this.referencedProjectName = this.ItemNode.GetMetadata(ProjectFileConstants.Name); Debug.Assert(!String.IsNullOrEmpty(this.referencedProjectName), "Could not retrive referenced project name form project file"); } // TODO: Maybe referenced projects should be relative to ProjectDir? this.referencedProjectFullPath = CommonUtils.GetAbsoluteFilePath(this.ProjectMgr.ProjectHome, this.referencedProjectRelativePath); }
internal WebPiReferenceNode(ProjectNode root, ProjectElement element, string filename, string productId, string friendlyName) : base(root, element) { Utilities.ArgumentNotNullOrEmpty("filename", filename); _feed = filename; _productId = productId; _friendlyName = friendlyName; }
internal PythonExtensionReferenceNode(PythonProjectNode root, ProjectElement element, string filename) : base(root, element) { Utilities.ArgumentNotNullOrEmpty("filename", filename); _filename = CommonUtils.GetAbsoluteFilePath(root.ProjectHome, filename); AnalyzeReference(root.GetInterpreter() as IPythonInterpreterWithProjectReferences); InitializeFileChangeEvents(); }
public NodejsFileNode(NodejsProjectNode root, ProjectElement e) : base(root, e) { if (Url.Contains(AnalysisConstants.NodeModulesFolder)) { root.EnqueueForDelayedAnalysis(this); } else { Analyze(); } }
public NodejsFileNode(NodejsProjectNode root, ProjectElement e) : base(root, e) { string referenceBaseName = Path.GetFileNameWithoutExtension(Caption); #if FALSE CreateWatcher(Url); #endif if (Url.Contains(AnalysisConstants.NodeModulesFolder)) { root.DelayedAnalysisQueue.Enqueue(this); } else { Analyze(); } }
public NodejsFileNode(NodejsProjectNode root, ProjectElement e) : base(root, e) { string referenceBaseName = Path.GetFileNameWithoutExtension(Caption); #if FALSE CreateWatcher(Url); #endif if (ShouldAnalyze) { root.Analyzer.AnalyzeFile(Url, !IsNonMemberItem); root._requireCompletionCache.Clear(); } ItemNode.ItemTypeChanged += ItemNode_ItemTypeChanged; }
/// <summary> /// Constructor for the ReferenceNode /// </summary> public AssemblyReferenceNode(ProjectNode root, ProjectElement element) : base(root, element) { this.GetPathNameFromProjectFile(); this.InitializeFileChangeEvents(); if (File.Exists(assemblyPath)) { this.fileChangeListener.ObserveItem(this.assemblyPath); } string include = this.ItemNode.GetMetadata(ProjectFileConstants.Include); this.CreateFromAssemblyName(new System.Reflection.AssemblyName(include)); }
protected override AssemblyReferenceNode CreateAssemblyReferenceNode(ProjectElement element) { AssemblyReferenceNode node = null; try { node = new PythonAssemblyReferenceNode((PythonProjectNode)this.ProjectMgr, element); } catch (ArgumentNullException e) { Trace.WriteLine("Exception : " + e.Message); } catch (FileNotFoundException e) { Trace.WriteLine("Exception : " + e.Message); } catch (BadImageFormatException e) { Trace.WriteLine("Exception : " + e.Message); } catch (FileLoadException e) { Trace.WriteLine("Exception : " + e.Message); } catch (System.Security.SecurityException e) { Trace.WriteLine("Exception : " + e.Message); } return node; }
protected override ReferenceNode CreateReferenceNode(string referenceType, ProjectElement element) { if (referenceType == ProjectFileConstants.Reference) { string pyExtension = element.GetMetadata(PythonConstants.PythonExtension); if (!String.IsNullOrWhiteSpace(pyExtension)) { return new PythonExtensionReferenceNode((PythonProjectNode)ProjectMgr, element, pyExtension); } } else if (referenceType == ProjectFileConstants.WebPiReference) { return new WebPiReferenceNode( ProjectMgr, element, element.GetMetadata("Feed"), element.GetMetadata("ProductId"), element.GetMetadata("FriendlyName") ); } return base.CreateReferenceNode(referenceType, element); }
protected override ReferenceNode CreateReferenceNode(string referenceType, ProjectElement element) { if (referenceType == ProjectFileConstants.Reference) { if (Path.GetExtension(element.Url).Equals(".pyd", StringComparison.OrdinalIgnoreCase)) { return new DeprecatedReferenceNode( ProjectMgr, element, element.GetMetadata(ProjectFileConstants.Include), Strings.PydReferenceDeprecated ); } } else if (referenceType == ProjectFileConstants.WebPiReference) { return new DeprecatedReferenceNode( ProjectMgr, element, element.GetMetadata("FriendlyName"), Strings.WebPIReferenceDeprecated ); } return base.CreateReferenceNode(referenceType, element); }
/// <summary> /// constructor for the ReferenceNode /// </summary> protected ReferenceNode(ProjectNode root, ProjectElement element) : base(root, element) { this.ExcludeNodeFromScc = true; }
public PythonFolderNode(CommonProjectNode root, ProjectElement element) : base(root, element) { }
protected virtual ReferenceNode CreateReferenceNode(string referenceType, ProjectElement element) { ReferenceNode node = null; #if FALSE if(referenceType == ProjectFileConstants.COMReference) { node = this.CreateComReferenceNode(element); } else #endif if (referenceType == ProjectFileConstants.Reference) { node = this.CreateAssemblyReferenceNode(element); } else if (referenceType == ProjectFileConstants.ProjectReference) { node = this.CreateProjectReferenceNode(element); } return node; }
/// <summary> /// Creates a project reference node given an existing project element. /// </summary> protected virtual ProjectReferenceNode CreateProjectReferenceNode(ProjectElement element) { return(new ProjectReferenceNode(this.ProjectMgr, element)); }
public TrackedFileNode(RustProjectNode root, ProjectElement elm) : base(root, elm, elm.GetMetadata(ProjectFileConstants.Include)) { }
public override CommonFileNode CreateCodeFileNode(ProjectElement item) { string fileName = item.Url; if (!String.IsNullOrWhiteSpace(fileName) && Path.GetExtension(fileName).Equals(NodejsConstants.TypeScriptExtension, StringComparison.OrdinalIgnoreCase)) { return new NodejsTypeScriptFileNode(this, item); } var res = new NodejsFileNode(this, item); return res; }
protected internal override FolderNode CreateFolderNode(ProjectElement element) { if (element == null) throw new ArgumentException("element"); if (element is AllFilesProjectElement || !String.IsNullOrEmpty(element.ItemTypeName)) return new RustFolderNode(this, element); else return new UntrackedFolderNode(this, element); }
public CommonNonCodeFileNode(CommonProjectNode root, ProjectElement e) : base(root, e) { }
protected override ProjectReferenceNode CreateProjectReferenceNode(ProjectElement element) { return new PythonProjectReferenceNode(ProjectMgr, element); }
public UntrackedFolderNode(RustProjectNode root, ProjectElement elm) : base(root, elm) { ProjectMgr = root; }
public CommonFolderNode(CommonProjectNode root, ProjectElement element) : base(root, element) { _project = root; }
public BaseFileNode(RustProjectNode node, ProjectElement elm, string path) : base(node, elm) { ProjectMgr = node; }
public override FileNode CreateFileNode(ProjectElement item) { if (String.IsNullOrEmpty(item.ItemTypeName)) return base.CreateFileNode(item); return CreateTrackedNode(item); }
/// <summary> /// Constructor for the FolderNode /// </summary> /// <param name="root">Root node of the hierarchy</param> /// <param name="relativePath">relative path from root i.e.: "NewFolder1\\NewFolder2\\NewFolder3</param> /// <param name="element">Associated project element</param> public FolderNode(ProjectNode root, ProjectElement element) : base(root, element) { }
public override CommonFileNode CreateNonCodeFileNode(ProjectElement item) { return new TrackedFileNode(this, item); }
public CommonFileNode(CommonProjectNode root, ProjectElement e) : base(root, e) { _project = root; }
private TrackedFileNode CreateTrackedNode(ProjectElement elm) { var node = new TrackedFileNode(this, elm); if (!ModuleTracker.IsIncremental) { ModuleTracker.AddRootModule(node.Url); } else { HashSet<string> children = ModuleTracker.AddRootModuleIncremental(node.Url); foreach (string child in children) { HierarchyNode parent = this.CreateFolderNodes(fs.Path.GetDirectoryName(child), false); parent.AddChild(CreateUntrackedNode(child)); } } return node; }
/// <summary> /// Constructor for the FileNode /// </summary> /// <param name="root">Root of the hierarchy</param> /// <param name="e">Associated project element</param> public FileNode(ProjectNode root, ProjectElement element) : base(root, element) { UpdateCaption(); }
public override CommonFileNode CreateNonCodeFileNode(ProjectElement item) { string fileName = item.Url; if (Path.GetFileName(fileName).Equals(NodejsConstants.PackageJsonFile, StringComparison.OrdinalIgnoreCase)) { return new PackageJsonFileNode(this, item); } return base.CreateNonCodeFileNode(item); }
protected internal override FolderNode CreateFolderNode(ProjectElement element) { return new NodejsFolderNode(this, element); }
public PythonAssemblyReferenceNode(PythonProjectNode root, ProjectElement element) : base(root, element) { AnalyzeReference(root.GetInterpreter() as IPythonInterpreterWithProjectReferences); }
public NodejsFolderNode(CommonProjectNode root, ProjectElement element) : base(root, element) { _project = root; }
public NodejsTypeScriptFileNode(NodejsProjectNode root, ProjectElement e) : base(root, e) { }
/// <summary> /// Creates a project reference node given an existing project element. /// </summary> protected virtual ProjectReferenceNode CreateProjectReferenceNode(ProjectElement element) { return new ProjectReferenceNode(this.ProjectMgr, element); }