예제 #1
0
 internal WebPiReferenceNode(ProjectNode root, ProjectElement element, string filename, string productId, string friendlyName)
     : base(root, element)
 {
     _feed = filename;
     _productId = productId;
     _friendlyName = friendlyName;
 }
예제 #2
0
        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);
        }
예제 #3
0
 public BaseSearchPathNode(CommonProjectNode project, string path, ProjectElement element)
     : base(project, path, element)
 {
     _project = project;
     VirtualNodeName = CommonUtils.TrimEndSeparator(path);
     this.ExcludeNodeFromScc = true;
 }
예제 #4
0
 public JAssemblyReferenceNode(JProjectNode root, ProjectElement element)
     : base(root, element)
 {
     var interp = root.GetInterpreter() as IJInterpreter2;
     if (interp != null) {
         AnalyzeReference(interp);
     }
 }
예제 #5
0
        internal JExtensionReferenceNode(JProjectNode root, ProjectElement element, string filename)
            : base(root, element)
        {
            _filename = filename;

            var interp = root.GetInterpreter() as IJInterpreter2;
            if (interp != null) {
                AnalyzeReference(interp);
            }
            InitializeFileChangeEvents();
        }
예제 #6
0
파일: FolderNode.cs 프로젝트: borota/JTVS
        /// <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, string relativePath, ProjectElement element)
            : base(root, element)
        {
            Utilities.ArgumentNotNull("relativePath", relativePath);

            if (Path.IsPathRooted(relativePath))
            {
                relativePath = CommonUtils.GetRelativeDirectoryPath(root.ProjectHome, relativePath);
            }

            this.VirtualNodeName = CommonUtils.TrimEndSeparator(relativePath);
        }
예제 #7
0
        /// <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));
        }
예제 #8
0
        protected override AssemblyReferenceNode CreateAssemblyReferenceNode(ProjectElement element)
        {
            AssemblyReferenceNode node = null;
            try {
                node = new JAssemblyReferenceNode((JProjectNode)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;
        }
예제 #9
0
 public JProjectReferenceNode(ProjectNode root, ProjectElement element)
     : base(root, element)
 {
     _fileChangeListener = new FileChangeManager(ProjectMgr.Site);
     Initialize();
 }
예제 #10
0
파일: JFolderNode.cs 프로젝트: borota/JTVS
 public JFolderNode(CommonProjectNode root, string path, ProjectElement element)
     : base(root, path, element)
 {
 }
예제 #11
0
 protected override ProjectReferenceNode CreateProjectReferenceNode(ProjectElement element)
 {
     return new ProjectReferenceNode(this.ProjectMgr, element);
 }
예제 #12
0
        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;
        }
예제 #13
0
 /// <summary>
 /// constructor for the ReferenceNode
 /// </summary>
 protected ReferenceNode(ProjectNode root, ProjectElement element)
     : base(root, element)
 {
     this.ExcludeNodeFromScc = true;
 }
예제 #14
0
        protected override ReferenceNode CreateReferenceNode(string referenceType, ProjectElement element)
        {
            if (referenceType == ProjectFileConstants.Reference) {
                string pyExtension = element.GetMetadata(JConstants.JExtension);
                if (!String.IsNullOrWhiteSpace(pyExtension)) {
                    return new JExtensionReferenceNode((JProjectNode)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);
        }