PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms 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
Possible License(s): GPL-2.0, MPL-2.0-no-copyleft-exception, CPL-1.0, CC-BY-SA-3.0, BSD-3-Clause, ISC, AGPL-3.0, LGPL-2.1, Apache-2.0
  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. using Microsoft.VisualStudio.Project;
  15. using Microsoft.VisualStudio.Shell.Interop;
  16. namespace Microsoft.IronStudio.Project {
  17. /// <summary>
  18. /// Reference container node for project references.
  19. /// </summary>
  20. public class CommonReferenceContainerNode : ReferenceContainerNode {
  21. public CommonReferenceContainerNode(ProjectNode project)
  22. : base(project) {
  23. }
  24. protected override ProjectReferenceNode CreateProjectReferenceNode(ProjectElement element) {
  25. return new CommonReferenceNode(this.ProjectMgr, element);
  26. }
  27. protected override ProjectReferenceNode CreateProjectReferenceNode(VSCOMPONENTSELECTORDATA selectorData) {
  28. return new CommonReferenceNode(this.ProjectMgr, selectorData.bstrTitle, selectorData.bstrFile, selectorData.bstrProjRef);
  29. }
  30. protected override NodeProperties CreatePropertiesObject() {
  31. return new NodeProperties(this);
  32. }
  33. /// <summary>
  34. /// Creates a reference node. By default we don't add references and this returns null.
  35. /// </summary>
  36. protected override ReferenceNode CreateReferenceNode(VSCOMPONENTSELECTORDATA selectorData) {
  37. return null;
  38. }
  39. /// <summary>
  40. /// Exposed for derived classes to re-enable reference support.
  41. /// </summary>
  42. protected ReferenceNode BaseCreateReferenceNode(ref VSCOMPONENTSELECTORDATA selectorData) {
  43. return base.CreateReferenceNode(selectorData);
  44. }
  45. }
  46. }