상속: HierarchyNode, IVsGetCfgProvider, IVsProject3, IVsAggregatableProject, IVsProjectFlavorCfgProvider, IPersistFileFormat, IVsProjectBuildSystem, IVsBuildPropertyStorage, IVsComponentUser, IVsDependencyProvider, IVsSccProject2, IBuildDependencyUpdate, IProjectEventsListener, IProjectEventsProvider, IReferenceContainerProvider, IVsProjectSpecialFiles
예제 #1
0
 public BooFileNode(ProjectNode root, ProjectElement e)
     : base(root, e)
 {
     results = new CompileResults(() => Url, GetCompilerInput, ()=>GlobalServices.LanguageService.GetLanguagePreferences().TabSize);
     languageService = (BooLanguageService)GetService(typeof(BooLanguageService));
     hidden = true;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XSharpFileNode"/> class.
 /// </summary>
 /// <param name="root">The project node.</param>
 /// <param name="e">The project element node.</param>
 internal XSharpFileNode(ProjectNode root, ProjectElement e)
     : base(root, e)
 {
     //
     this.UpdateHasDesigner();
     this.UpdateItemType();
 }
        public LocalizableProperties(ProjectNode projectManager)
        {
            if (projectManager == null)
                throw new ArgumentNullException("projectManager");

            _projectManager = projectManager;
        }
예제 #4
0
        /// <summary>
        /// Constructor to create a new MSBuild.BuildItem and add it to the project
        /// Only have internal constructors as the only one who should be creating
        /// such object is the project itself (see Project.CreateFileNode()).
        /// </summary>
        internal ProjectElement(ProjectNode project, string itemPath, string itemType)
        {
            if(project == null)
            {
                throw new ArgumentNullException("project");
            }

            if(String.IsNullOrEmpty(itemPath))
            {
                throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "itemPath");
            }

            if(String.IsNullOrEmpty(itemType))
            {
                throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "itemType");
            }

            this.itemProject = project;

            // create and add the item to the project

            this.item = project.BuildProject.AddNewItem(itemType, Microsoft.Build.BuildEngine.Utilities.Escape(itemPath));
            this.itemProject.SetProjectFileDirty(true);
            this.RefreshProperties();
        }
예제 #5
0
        public ComReferenceNode(ProjectNode root, VSCOMPONENTSELECTORDATA selectorData)
            : base(root)
        {
            if(root == null)
            {
                throw new ArgumentNullException("root");
            }
            if(selectorData.type == VSCOMPONENTTYPE.VSCOMPONENTTYPE_Project
                || selectorData.type == VSCOMPONENTTYPE.VSCOMPONENTTYPE_ComPlus)
            {
                throw new ArgumentException("SelectorData cannot be of type VSCOMPONENTTYPE.VSCOMPONENTTYPE_Project or VSCOMPONENTTYPE.VSCOMPONENTTYPE_ComPlus", "selectorData");
            }

            // Initialize private state
            this.typeName = selectorData.bstrTitle;
            this.typeGuid = selectorData.guidTypeLibrary;
            this.majorVersionNumber = selectorData.wTypeLibraryMajorVersion.ToString(CultureInfo.InvariantCulture);
            this.minorVersionNumber = selectorData.wTypeLibraryMinorVersion.ToString(CultureInfo.InvariantCulture);
            this.lcid = selectorData.lcidTypeLibrary.ToString(CultureInfo.InvariantCulture);

            // Check to see if the COM object actually exists.
            this.SetInstalledFilePath();
            // If the value cannot be set throw.
            if(String.IsNullOrEmpty(this.installedFilePath))
            {
                throw new InvalidOperationException();
            }
        }
예제 #6
0
        /// <summary>
        /// Constructor for the AssemblyReferenceNode
        /// </summary>
        public AssemblyReferenceNode(ProjectNode root, string assemblyPath)
            : base(root)
        {
            // Validate the input parameters.
            if(null == root)
            {
                throw new ArgumentNullException("root");
            }
            if(string.IsNullOrEmpty(assemblyPath))
            {
                throw new ArgumentNullException("assemblyPath");
            }

            this.InitializeFileChangeEvents();

            // The assemblyPath variable can be an actual path on disk or a generic assembly name.
            if(File.Exists(assemblyPath))
            {
                // The assemblyPath parameter is an actual file on disk; try to load it.
                this.assemblyName = System.Reflection.AssemblyName.GetAssemblyName(assemblyPath);
                this.assemblyPath = assemblyPath;

                // We register with listeningto chnages onteh path here. The rest of teh cases will call into resolving the assembly and registration is done there.
                this.fileChangeListener.ObserveItem(this.assemblyPath);
            }
            else
            {
                // The file does not exist on disk. This can be because the file / path is not
                // correct or because this is not a path, but an assembly name.
                // Try to resolve the reference as an assembly name.
                this.CreateFromAssemblyName(new System.Reflection.AssemblyName(assemblyPath));
            }
        }
예제 #7
0
        public NemerleFileNode(ProjectNode root, ProjectElement element, bool isNonMemberItem)
            : base(root, element)
        {
            IsNonMemberItem = isNonMemberItem;

            _selectionChangedListener =
                    new SelectionElementValueChangedListener(
                            new ServiceProvider((IOleServiceProvider)root.GetService(typeof(IOleServiceProvider))), root);

            _selectionChangedListener.Init();

            //((FileNodeProperties)NodeProperties).OnCustomToolChanged		  += OnCustomToolChanged;
            //((FileNodeProperties)NodeProperties).OnCustomToolNameSpaceChanged += OnCustomToolNameSpaceChanged;

            // HasDesigner property is not virtual, so we have to set it up in the ctor.
            InferHasDesignerFromSubType();

            var url = this.Url;
            var ext = Path.GetExtension(url);

            //if (ext.Equals(".resx", StringComparison.InvariantCultureIgnoreCase))
            //{
            //  // TODO: ”далить это дело, так как теперь оповещени¤ должны быть реализованы в Engine.
            //  url = Path.GetFullPath(this.Url);
            //  var path = Path.GetDirectoryName(url);
            //  var name = Path.GetFileName(url);
            //  _watcher = new FileSystemWatcher(path, name);
            //  _watcher.NotifyFilter = NotifyFilters.LastWrite;
            //  _watcher.Changed += watcher_Changed;
            //  _watcher.EnableRaisingEvents = true;
            //}
        }
예제 #8
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 retrive 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");
            }

            Uri uri = new Uri(this.ProjectMgr.BaseURI.Uri, this.referencedProjectRelativePath);

            if(uri != null)
            {
                this.referencedProjectFullPath = Microsoft.VisualStudio.Shell.Url.Unescape(uri.LocalPath, true);
            }
        }
예제 #9
0
 private static bool IsProjectOpened(ProjectNode project)
 {
     if(null == projectOpened)
     {
         projectOpened = typeof(VisualStudio.Project.ProjectNode).GetField("projectOpened", BindingFlags.Instance | BindingFlags.NonPublic);
     }
     return (bool)projectOpened.GetValue(project);
 }
예제 #10
0
 /// <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)
 {
     if(this.ProjectMgr.NodeHasDesigner(this.ItemNode.GetMetadata(ProjectFileConstants.Include)))
     {
         this.HasDesigner = true;
     }
 }
예제 #11
0
        public NemerleFolderNode(ProjectNode root, string directoryPath, ProjectElement element, bool isNonMemberItem)
            : base(root, directoryPath, element)
        {
            IsNonMemberItem = isNonMemberItem;

            // Folders do not participate in SCC.
            ExcludeNodeFromScc = true;
        }
        public AvailableFileBuildActionConverter(ProjectNode projectNode)
            : base(typeof(prjBuildAction))
        {
            if (projectNode == null)
                throw new ArgumentNullException("projectNode");

            _projectManager = projectNode;
        }
예제 #13
0
        public JarReferenceNode(ProjectNode root, ProjectElement element)
            : base(root, element)
        {
            Contract.Requires<ArgumentNullException>(root != null, "root");
            Contract.Requires<ArgumentNullException>(element != null, "element");

            _projectRelativeFilePath = element.Item.EvaluatedInclude;
            ProjectManager.ItemIdMap.UpdateCanonicalName(this);
        }
예제 #14
0
        public JarReferenceNode(ProjectNode root, string fileName)
            : base(root)
        {
            Contract.Requires<ArgumentNullException>(root != null, "root");
            Contract.Requires<ArgumentNullException>(fileName != null, "fileName");
            Contract.Requires<ArgumentException>(!string.IsNullOrEmpty(fileName));

            _projectRelativeFilePath = fileName;
        }
 /// <summary>
 /// Constructor for the AssemblyReferenceNode
 /// </summary>
 public NemerleMacroAssemblyReferenceNode(ProjectNode root, string assemblyPath)
     : base(root, assemblyPath)
 {
     // AssemblyReferenceNode is useless without 'resolvedAssemblyName' field set.
     // The only way to set the 'AssemblyReferenceNode.resolvedAssemblyName' field
     // is a call to ResolveReference(), wich is redundant, since the assemly
     // was loaded by its path. ;)
     //
     ResolveReference();
 }
예제 #16
0
        public static string Get(ProjectNode projectNode)
        {
            var connectionString = projectNode.CurrentConfig.GetPropertyValue(Constants.EventStore.ConnectionString);
            if (String.IsNullOrWhiteSpace(connectionString))
                throw new EventStoreConnectionException(
                    "Unable to connect to the EventStore. Connection string is not specified.",
                    HttpStatusCode.ServiceUnavailable);

            return Get(connectionString);
        }
예제 #17
0
 public CustomPropertyPage() {
   _projectMgr = null;
   _projectConfigs = null;
   _project = null;
   _site = null;
   _dirty = false;
   IgnoreDirty = false;
   _title = string.Empty;
   _helpKeyword = string.Empty;
 }
예제 #18
0
파일: Output.cs 프로젝트: Xtremrules/dot42
        /// <summary>
        /// Constructor for IVSOutput2 implementation
        /// </summary>
        /// <param name="projectManager">Project that produce this output</param>
        /// <param name="outputAssembly">MSBuild generated item corresponding to the output assembly (by default, these would be of type MainAssembly</param>
        public Output(ProjectNode projectManager, ProjectItemInstance outputAssembly)
        {
            if(projectManager == null)
                throw new ArgumentNullException("projectManager");
            if(outputAssembly == null)
                throw new ArgumentNullException("outputAssembly");

            project = projectManager;
            output = outputAssembly;
        }
예제 #19
0
        /// <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)
        {
            if (relativePath == null)
            {
                throw new ArgumentNullException("relativePath");
            }

            this.VirtualNodeName = relativePath.TrimEnd('\\');
        }
예제 #20
0
        /// <summary>
        /// Constructor for the ReferenceNode
        /// </summary>
        public AssemblyReferenceNode(ProjectNode root, ProjectElement element)
            : base(root, element)
        {
            this.GetPathNameFromProjectFile();

            this.InitializeFileChangeEvents();

            string include = this.ItemNode.GetMetadata(ProjectFileConstants.Include);

            this.CreateFromAssemblyName(new System.Reflection.AssemblyName(include));
        }
예제 #21
0
        public JarReferenceNode(ProjectNode root, ProjectElement element)
            : base(root, element)
        {
            if (root == null)
                throw new ArgumentNullException("root");
            if (element == null)
                throw new ArgumentNullException("element");

            _projectRelativeFilePath = element.Item.EvaluatedInclude;
            ProjectManager.ItemIdMap.UpdateCanonicalName(this);
        }
예제 #22
0
        public JarReferenceNode(ProjectNode root, string fileName)
            : base(root)
        {
            if (root == null)
                throw new ArgumentNullException("root");
            if (fileName == null)
                throw new ArgumentNullException("fileName");
            if (string.IsNullOrEmpty(fileName))
                throw new ArgumentException("fileName cannot be empty", "fileName");

            _projectRelativeFilePath = fileName;
        }
예제 #23
0
        public AssembleFileNode(ProjectNode root, ProjectElement e)
            :       base(root, e)
        {
            ExcludeNodeFromScc = true;

            // Give it a guid if it does not already have one.

            if (string.IsNullOrEmpty(ItemNode.GetMetadata(Constants.Project.Item.Assemble.Guid.Name)))
            {
                ItemNode.SetMetadata(Constants.Project.Item.Assemble.Guid.Name, System.Guid.NewGuid().ToString("B"));
            }
        }
		public virtual void Initialize(ProjectNode projectNode)
		{
			if (projectNode == null)
			{
				throw new ArgumentNullException("projectNode");
			}

			if (projectNode.CallMSBuild("GetFrameworkPaths") != MSBuildResult.Successful)
			{
				throw new InvalidOperationException("Build of GetFrameworkPaths failed.");
			}

			this.rarInputs = new RarInputs(projectNode.CurrentConfig);
		}
예제 #25
0
        public JavaFolderNode(ProjectNode root, string relativePath, ProjectElement element)
            : base(root, relativePath, element)
        {
            Contract.Requires(root != null);
            Contract.Requires(relativePath != null);
            Contract.Requires(element != null);

            if (element.IsVirtual)
            {
                string buildAction = element.GetMetadata(ProjectFileConstants.BuildAction);
                if (buildAction == ProjectFileConstants.Folder)
                    this.IsNonmemberItem = false;
            }
        }
예제 #26
0
        /// <summary>
        /// Constructor to Wrap an existing MSBuild.BuildItem
        /// Only have internal constructors as the only one who should be creating
        /// such object is the project itself (see Project.CreateFileNode()).
        /// </summary>
        /// <param name="project">Project that owns this item</param>
        /// <param name="existingItem">an MSBuild.BuildItem; can be null if virtualFolder is true</param>
        /// <param name="virtualFolder">Is this item virtual (such as reference folder)</param>
        internal ProjectElement(ProjectNode project, MSBuild.BuildItem existingItem, bool virtualFolder)
        {
            if(project == null)
                throw new ArgumentNullException("project");
            if(!virtualFolder && existingItem == null)
                throw new ArgumentNullException("existingItem");

            // Keep a reference to project and item
            this.itemProject = project;
            this.item = existingItem;
            this.isVirtual = virtualFolder;

            if(this.isVirtual)
                this.virtualProperties = new Dictionary<string, string>();
        }
예제 #27
0
        /// <summary>
        /// Constructor for IVSOutputGroup2 implementation
        /// </summary>
        /// <param name="outputName">Name of the output group. See VS_OUTPUTGROUP_CNAME_Build in vsshell.idl for the list of standard values</param>
        /// <param name="msBuildTargetName">MSBuild target name</param>
        /// <param name="projectManager">Project that produce this output</param>
        /// <param name="configuration">Configuration that produce this output</param>
        public OutputGroup(string outputName, string msBuildTargetName, ProjectNode projectManager, ProjectConfig configuration)
        {
            if(outputName == null)
                throw new ArgumentNullException("outputName");
            if(msBuildTargetName == null)
                throw new ArgumentNullException("outputName");
            if(projectManager == null)
                throw new ArgumentNullException("projectManager");
            if(configuration == null)
                throw new ArgumentNullException("configuration");

            name = outputName;
            targetName = msBuildTargetName;
            project = projectManager;
            projectCfg = configuration;
        }
예제 #28
0
        /// <summary>
        /// Constructor for the ComReferenceNode. 
        /// </summary>
        public ComReferenceNode(ProjectNode root, ProjectElement element)
            : base(root, element)
        {
            this.typeName = this.ItemNode.GetMetadata(ProjectFileConstants.Include);
            string typeGuidAsString = this.ItemNode.GetMetadata(ProjectFileConstants.Guid);
            if(typeGuidAsString != null)
            {
                this.typeGuid = new Guid(typeGuidAsString);
            }

            this.majorVersionNumber = this.ItemNode.GetMetadata(ProjectFileConstants.VersionMajor);
            this.minorVersionNumber = this.ItemNode.GetMetadata(ProjectFileConstants.VersionMinor);
            this.lcid = this.ItemNode.GetMetadata(ProjectFileConstants.Lcid);
            this.SetProjectItemsThatRelyOnReferencesToBeResolved(false);
            this.SetInstalledFilePath();
        }
예제 #29
0
        /// <summary>
        /// Constructor for the AssemblyReferenceNode
        /// </summary>
        public ApplicationReferenceNode(ProjectNode root, string assemblyPath)
            : base(root)
        {
            // Validate the input parameters.
            if(null == root)
            {
                throw new ArgumentNullException("root");
            }
            if(string.IsNullOrEmpty(assemblyPath))
            {
                throw new ArgumentNullException("assemblyPath");
            }

            this.path = assemblyPath;
            this.filename = Path.GetFileName( this.path );
        }
예제 #30
0
        public DartFolderNode(ProjectNode root, string relativePath, ProjectElement element)
            : base(root, relativePath, element)
        {
            if (root == null)
                throw new ArgumentNullException("root");
            if (relativePath == null)
                throw new ArgumentNullException("relativePath");
            if (element == null)
                throw new ArgumentNullException("element");

            if (element.IsVirtual)
            {
                string buildAction = element.GetMetadata(ProjectFileConstants.BuildAction);
                if (buildAction == ProjectFileConstants.Folder)
                    this.IsNonmemberItem = false;
            }
        }
예제 #31
0
        private static void AddNonMemberFileItems(ProjectNode project, IEnumerable<string> fileList)
        {
            ErrorHelper.ThrowIsNull(fileList, "fileList");

            foreach (string fileKey in fileList)
            {
                HierarchyNode parentNode = project;
                string[] pathItems = fileKey.Split(new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar });

                if (StringComparer.OrdinalIgnoreCase.Equals(fileKey, project.ProjectFile))
                    continue;

                NemerleFolderNode topFolderNode = null;
                foreach (string fileOrDir in pathItems)
                {
                    string childNodeId = Path.Combine(parentNode.VirtualNodeName, fileOrDir);
                    FileInfo fileOrDirInfo = new FileInfo(Path.Combine(project.ProjectFolder, childNodeId));
                    if ((fileOrDirInfo.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden)
                        break;

                    HierarchyNode childNode = parentNode.FindChild(childNodeId);
                    if (childNode == null)
                    {
                        if (topFolderNode == null)
                        {
                            topFolderNode = parentNode as NemerleFolderNode;
                            if (topFolderNode != null && (!topFolderNode.IsNonMemberItem) && topFolderNode.IsExpanded)
                                topFolderNode = null;
                        }

                        ProjectElement element = new ProjectElement(project, null, true);
                        element.Rename(childNodeId);
                        element.SetMetadata(ProjectFileConstants.Name, childNodeId);
                        childNode = project.CreateFileNode(element);
                        parentNode.AddChild(childNode);
                        break;
                    }

                    parentNode = childNode;
                }

                if (topFolderNode != null)
                    topFolderNode.CollapseFolder();
            }
        }
예제 #32
0
 internal ConfigProvider(ProjectNode manager)
 {
     this.project = manager;
 }
예제 #33
0
        protected virtual OutputGroup CreateOutputGroup(ProjectNode project, KeyValuePair <string, string> group)
        {
            OutputGroup outputGroup = new OutputGroup(group.Key, group.Value, project, this);

            return(outputGroup);
        }
예제 #34
0
 public PackageFileNode(ProjectNode root, ProjectElement e)
     : base(root, e)
 {
     ExcludeNodeFromScc = true;
 }
예제 #35
0
        public string GetFileNamespace(string fileFullPath, ProjectNode node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            // Get base namespace from the project
            string namespce = node.GetProjectProperty("RootNamespace");

            if (String.IsNullOrEmpty(namespce))
            {
                namespce = Path.GetFileNameWithoutExtension(fileFullPath);
            }
            ;

            // If the item is added to a subfolder, the name space should reflect this.
            // This is done so that class names from 2 files with the same name but different
            // directories don't conflict.
            string relativePath = Path.GetDirectoryName(fileFullPath);
            string projectPath  = Path.GetDirectoryName(node.GetMkDocument());

            // Our project system only support adding files that are sibling of the project file or that are in subdirectories.
            if (String.Compare(projectPath, 0, relativePath, 0, projectPath.Length, true, CultureInfo.CurrentCulture) == 0)
            {
                relativePath = relativePath.Substring(projectPath.Length);
            }
            else
            {
                Debug.Fail("Adding an item to the project that is NOT under the project folder.");
                // We are going to use the full file path for generating the namespace
            }

            // Get the list of parts
            int index = 0;

            string[] pathParts;
            pathParts = relativePath.Split(Path.DirectorySeparatorChar);

            // Use a string builder with default size being the expected size
            StringBuilder result = new StringBuilder(namespce, namespce.Length + relativePath.Length + 1);

            // For each path part
            while (index < pathParts.Length)
            {
                string part = pathParts[index];
                ++index;

                // This could happen if the path had leading/trailing slash, we want to ignore empty pieces
                if (String.IsNullOrEmpty(part))
                {
                    continue;
                }

                // If we reach here, we will be adding something, so add a namespace separator '.'
                result.Append('.');

                // Make sure it starts with a letter
                if (!char.IsLetter(part, 0))
                {
                    result.Append('N');
                }

                // Filter invalid namespace characters
                foreach (char c in part)
                {
                    if (char.IsLetterOrDigit(c))
                    {
                        result.Append(c);
                    }
                }
            }
            return(result.ToString());
        }
예제 #36
0
 /// <summary>
 /// Creates a new project config instance.
 /// </summary>
 /// <param name="project">Parent project node.</param>
 /// <param name="name">Canonical Name</param>
 public XProjectConfig(ProjectNode project, ConfigCanonicalName name)
     : base(project, name)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
 }
예제 #37
0
 public NestedProjectNode(ProjectNode root, ProjectElement element)
     : base(root, element)
 {
     this.IsExpanded = true;
 }
 /// <summary>
 /// Constructor for the DependentFileNode
 /// </summary>
 /// <param name="root">Root of the hierarchy</param>
 /// <param name="e">Associated project element</param>
 public DependentFileNode(ProjectNode root, ProjectElement element)
     : base(root, element)
 {
     this.HasParentNodeNameRelation = false;
 }
예제 #39
0
 internal XConfigProvider(ProjectNode manager) : base(manager)
 {
 }
예제 #40
0
 public ConfigProvider(ProjectNode manager)
 {
     this.project = manager;
 }
예제 #41
0
 /// <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)
 {
     this.VirtualNodeName = relativePath.TrimEnd('\\');
 }
예제 #42
0
 /// <summary>
 /// constructor for the ReferenceNode
 /// </summary>
 protected ReferenceNode(ProjectNode root)
     : base(root)
 {
     this.ExcludeNodeFromScc = true;
 }
예제 #43
0
 public BuildDependency(ProjectNode projectMgr, Guid projectReference)
 {
     this.referencedProjectGuid = projectReference;
     this.projectMgr            = projectMgr;
 }
예제 #44
0
 /// <summary>
 /// Overloadde ctor.
 /// </summary>
 /// <param name="projectMgr">The associated project</param>
 public SingleFileGenerator(ProjectNode projectMgr)
 {
     this.projectMgr = projectMgr;
 }
예제 #45
0
 internal TrackDocumentsHelper(ProjectNode project)
 {
     this.projectMgr = project;
 }
예제 #46
0
 public ReferenceContainerNode(ProjectNode root)
     : base(root)
 {
     this.VirtualNodeName    = ReferencesNodeVirtualName;
     this.ExcludeNodeFromScc = true;
 }
예제 #47
0
 public BuildPropertyPage(ProjectNode projectManager)
     : base(projectManager)
 {
     this.Name = SR.GetString(SR.BuildCaption, CultureInfo.CurrentUICulture);
 }
예제 #48
0
 public ProjectNodeProperties(ProjectNode node)
     : base(node)
 {
 }
예제 #49
0
 public ProjectDesignerDocumentManager(ProjectNode node)
     : base(node)
 {
 }
예제 #50
0
 /// <summary>
 /// Overloadde ctor.
 /// </summary>
 /// <param name="ProjectNode">The associated project</param>
 internal SingleFileGenerator(ProjectNode projectMgr)
 {
     this.projectMgr = projectMgr;
 }
예제 #51
0
 public TrackDocumentsHelper(ProjectNode project)
 {
     this.projectMgr = project;
 }
예제 #52
0
        public virtual void SetObjects(uint count, object[] punk)
        {
            if (punk == null)
            {
                return;
            }

            if (count > 0)
            {
                if (punk[0] is ProjectConfig)
                {
                    ArrayList configs = new ArrayList();

                    for (int i = 0; i < count; i++)
                    {
                        ProjectConfig config = (ProjectConfig)punk[i];

                        if (this.project == null || (this.project != (punk[0] as ProjectConfig).ProjectMgr))
                        {
                            UnRegisterProjectEvents();
                            this.project = config.ProjectMgr;
                            RegisterProjectEvents();
                        }

                        configs.Add(config);
                    }

                    this.projectConfigs = (ProjectConfig[])configs.ToArray(typeof(ProjectConfig));
                }
                else if (punk[0] is NodeProperties)
                {
                    if (this.project == null || (this.project != (punk[0] as NodeProperties).Node.ProjectMgr))
                    {
                        UnRegisterProjectEvents();
                        this.project = (punk[0] as NodeProperties).Node.ProjectMgr;
                        RegisterProjectEvents();
                    }

                    Dictionary <string, ProjectConfig> configsMap = new Dictionary <string, ProjectConfig>();

                    for (int i = 0; i < count; i++)
                    {
                        NodeProperties property = (NodeProperties)punk[i];
                        IVsCfgProvider provider;
                        ErrorHandler.ThrowOnFailure(property.Node.ProjectMgr.GetCfgProvider(out provider));
                        uint[] expected = new uint[1];
                        ErrorHandler.ThrowOnFailure(provider.GetCfgs(0, null, expected, null));
                        if (expected[0] > 0)
                        {
                            ProjectConfig[] configs = new ProjectConfig[expected[0]];
                            uint[]          actual  = new uint[1];
                            provider.GetCfgs(expected[0], configs, actual, null);

                            foreach (ProjectConfig config in configs)
                            {
                                if (!configsMap.ContainsKey(config.ConfigName))
                                {
                                    configsMap.Add(config.ConfigName, config);
                                }
                            }
                        }
                    }

                    if (configsMap.Count > 0)
                    {
                        if (this.projectConfigs == null)
                        {
                            this.projectConfigs = new ProjectConfig[configsMap.Keys.Count];
                        }
                        configsMap.Values.CopyTo(this.projectConfigs, 0);
                    }
                }
            }
            else
            {
                this.project = null;
            }

            if (this.active && this.project != null)
            {
                UpdateObjects();
            }
        }