[svn] r6846: vs-plugin/trunk/Nemerle.VsIntegration:
LanguageService/NemerleSource.cs Project/NemerleDepend...
IT
svnadmin at nemerle.org
Tue Nov 7 21:59:40 CET 2006
Log:
Refactoring (sync before move to November SDK).
Author: IT
Date: Tue Nov 7 21:59:36 2006
New Revision: 6846
Modified:
vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleDependentFileNode.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectFactory.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs
Modified: vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs Tue Nov 7 21:59:36 2006
@@ -22,6 +22,7 @@
//BeginParse();
string path = GetFilePath();
ProjectInfo info = ProjectInfo.FindProject(path);
+
if (info != null)
info.AddSource(this);
}
@@ -30,6 +31,7 @@
{
string path = GetFilePath();
ProjectInfo info = ProjectInfo.FindProject(path);
+
if (info != null)
info.RemoveSource(this);
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleDependentFileNode.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleDependentFileNode.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleDependentFileNode.cs Tue Nov 7 21:59:36 2006
@@ -9,13 +9,17 @@
class NemerleDependentFileNode : DependentFileNode
{
#region ctor
+
/// <summary>
/// Constructor for the NemerleDependentFileNode
/// </summary>
/// <param name="root">Root of the hierarchy</param>
/// <param name="e">Associated project element</param>
public NemerleDependentFileNode(ProjectNode root, ProjectElement e)
- : base(root, e) {}
+ : base(root, e)
+ {
+ }
+
#endregion
// Called since the FileNode.ImageIndex returns -1 by default.
@@ -28,7 +32,5 @@
return base.GetIconHandle(open);
}
-
-
}
}
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleFileNode.cs Tue Nov 7 21:59:36 2006
@@ -37,7 +37,6 @@
#region Fields
- OAVSProjectItem _vsProjectItem;
SelectionElementValueChangedListener _selectionChangedListener;
#endregion
@@ -68,6 +67,7 @@
set { ItemNode.SetMetadata(ProjectFileConstants.SubType, value); }
}
+ private OAVSProjectItem _vsProjectItem;
protected internal VSProjectItem VSProjectItem
{
get
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectFactory.cs
==============================================================================
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs Tue Nov 7 21:59:36 2006
@@ -84,23 +84,14 @@
#endregion
- #region Fields
-
- readonly Guid GUID_MruPage = new Guid("{19B97F03-9594-4c1c-BE28-25FF030113B3}");
-
- NemerlePackage _package;
- VSLangProj.VSProject _vsProject = null;
- IVSMDCodeDomProvider _codeDomProvider;
-
- static ImageList _nemerleImageList = LoadProjectImageList();
-
- #endregion
-
#region Properties
- /// <summary>
- /// Returns the outputfilename based on the output type
- /// </summary>
+ private NemerlePackage _package;
+ public NemerlePackage Package
+ {
+ get { return _package; }
+ }
+
public string OutputFileName
{
get
@@ -120,9 +111,7 @@
}
}
- /// <summary>
- /// Retreive the CodeDOM provider
- /// </summary>
+ private IVSMDCodeDomProvider _codeDomProvider;
protected internal IVSMDCodeDomProvider CodeDomProvider
{
get
@@ -133,9 +122,7 @@
}
}
- /// <summary>
- /// Get the VSProject corresponding to this project
- /// </summary>
+ private VSLangProj.VSProject _vsProject;
protected internal VSLangProj.VSProject VSProject
{
get
@@ -163,12 +150,9 @@
public ProjectInfo ProjectInfo
{
get { return _projectInfo; }
- //set { _projectInfo = value; }
}
- /// <summary>
- /// Nemerle specific project images.
- /// </summary>
+ private static ImageList _nemerleImageList = LoadProjectImageList();
public static ImageList NemerleImageList
{
get { return _nemerleImageList; }
@@ -336,11 +320,10 @@
/// <returns>NemerleFileNode or FileNode</returns>
public override FileNode CreateFileNode(ProjectElement item)
{
- if (item == null)
- throw new ArgumentNullException("item");
+ if (item == null) throw new ArgumentNullException("item");
- string include = item.GetMetadata(ProjectFileConstants.Include);
NemerleFileNode newNode = new NemerleFileNode(this, item);
+ string include = item.GetMetadata(ProjectFileConstants.Include);
newNode.OleServiceProvider.AddService(typeof(EnvDTE.Project), ProjectMgr.GetAutomationObject(), false);
newNode.OleServiceProvider.AddService(typeof(EnvDTE.ProjectItem), newNode.GetAutomationObject(), false);
@@ -359,12 +342,11 @@
/// <returns>dependent file node</returns>
public override DependentFileNode CreateDependentFileNode(ProjectElement item)
{
- if (item == null)
- throw new ArgumentNullException("item");
+ if (item == null) throw new ArgumentNullException("item");
NemerleDependentFileNode newNode = new NemerleDependentFileNode(this, item);
-
string include = item.GetMetadata(ProjectFileConstants.Include);
+
newNode.OleServiceProvider.AddService(typeof(EnvDTE.Project), ProjectMgr.GetAutomationObject(), false);
newNode.OleServiceProvider.AddService(typeof(EnvDTE.ProjectItem), newNode.GetAutomationObject(), false);
newNode.OleServiceProvider.AddService(typeof(VSLangProj.VSProject), this.VSProject, false);
@@ -398,9 +380,11 @@
public override int AddProjectReference()
{
IVsComponentSelectorDlg2 componentDialog;
- Guid guidEmpty = Guid.Empty;
+ Guid startOnTab = Guid.Empty;
VSCOMPONENTSELECTORTABINIT[] tabInit = new VSCOMPONENTSELECTORTABINIT[5];
string browseLocations = Path.GetDirectoryName(BaseURI.Uri.LocalPath);
+ Guid GUID_MruPage = new Guid("{19B97F03-9594-4c1c-BE28-25FF030113B3}");
+
// Add the .NET page.
//
@@ -418,7 +402,7 @@
//
tabInit[2].dwSize = (uint)Marshal.SizeOf(typeof(VSCOMPONENTSELECTORTABINIT));
// Tell the Add Reference dialog to call hierarchies GetProperty with
- // the following propID to enablefiltering out ourself from the Project
+ // the following propID to enable filtering out ourself from the Project
// to Project reference
tabInit[2].varTabInitInfo = (int)__VSHPROPID.VSHPROPID_ShowProjInSolutionPage;
tabInit[2].guidTab = VSConstants.GUID_SolutionPage;
@@ -437,6 +421,8 @@
uint pX = 0, pY = 0;
+ startOnTab = tabInit[2].guidTab;
+
componentDialog = GetService(typeof (SVsComponentSelectorDlg)) as IVsComponentSelectorDlg2;
try
@@ -467,7 +453,7 @@
ref pY,
(uint)tabInit.Length,
tabInit,
- ref guidEmpty,
+ ref startOnTab,
"*.dll",
ref browseLocations));
}
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs
==============================================================================
More information about the svn
mailing list