PageRenderTime 43ms CodeModel.GetById 37ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/IronPython_Main/Tools/IronStudio/IronStudio/IronStudio/Project/CommonReferenceContainerNode.cs

#
C# | 54 lines | 24 code | 8 blank | 22 comment | 0 complexity | 5c916b913cbdd46a386564c20d640aab MD5 | raw file
 1/* ****************************************************************************
 2 *
 3 * Copyright (c) Microsoft Corporation. 
 4 *
 5 * This source code is subject to terms and conditions of the Apache License, Version 2.0. A 
 6 * copy of the license can be found in the License.html file at the root of this distribution. If 
 7 * you cannot locate the Apache License, Version 2.0, please send an email to 
 8 * ironpy@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 9 * by the terms of the Apache License, Version 2.0.
10 *
11 * You must not remove this notice, or any other, from this software.
12 *
13 * ***************************************************************************/
14
15using Microsoft.VisualStudio.Project;
16using Microsoft.VisualStudio.Shell.Interop;
17
18
19namespace Microsoft.IronStudio.Project {
20    /// <summary>
21    /// Reference container node for project references.
22    /// </summary>
23    public class CommonReferenceContainerNode : ReferenceContainerNode {
24        public CommonReferenceContainerNode(ProjectNode project)
25            : base(project) {
26        }
27
28        protected override ProjectReferenceNode CreateProjectReferenceNode(ProjectElement element) {
29            return new CommonReferenceNode(this.ProjectMgr, element);
30        }
31
32        protected override ProjectReferenceNode CreateProjectReferenceNode(VSCOMPONENTSELECTORDATA selectorData) {
33            return new CommonReferenceNode(this.ProjectMgr, selectorData.bstrTitle, selectorData.bstrFile, selectorData.bstrProjRef);
34        }
35
36        protected override NodeProperties CreatePropertiesObject() {
37            return new NodeProperties(this);
38        }
39
40        /// <summary>
41        /// Creates a reference node.  By default we don't add references and this returns null.
42        /// </summary>
43        protected override ReferenceNode CreateReferenceNode(VSCOMPONENTSELECTORDATA selectorData) {
44            return null;
45        }
46
47        /// <summary>
48        /// Exposed for derived classes to re-enable reference support.
49        /// </summary>
50        protected ReferenceNode BaseCreateReferenceNode(ref VSCOMPONENTSELECTORDATA selectorData) {
51            return base.CreateReferenceNode(selectorData);
52        }
53    }
54}