[svn] r7205: vs-plugin/trunk:
Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
Nemerle.VsIn...
VladD2
svnadmin at nemerle.org
Thu Jan 4 22:51:47 CET 2007
Log:
Work on AstToolWindow.
Author: VladD2
Date: Thu Jan 4 22:51:43 2007
New Revision: 7205
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.Designer.cs
vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.cs
vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.resx
vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolWindow.cs
vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n Thu Jan 4 22:51:43 2007
@@ -18,10 +18,10 @@
namespace Nemerle.Completion2
{
- public delegate CompletionStageHandler (node : TypeInfo) : bool;
-
public partial class Engine : ManagerClass
{
+ public event TypedtreeCreated : EventHandler;
+
/// Makes the typed tree and constructs compile unit collection.
private BuildTypedtreeAndInitProject() : void
{
@@ -130,7 +130,11 @@
_currentMessages.ToList());
_rowProject = _project;
+
+ when (TypedtreeCreated != null)
+ TypedtreeCreated(_project, EventArgs.Empty);
#pragma warning restore 618 // Obsolete
+
Trace.WriteLine("<<<< ##### Build types tree finish!");
}
finally
Modified: vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.Designer.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.Designer.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.Designer.cs Thu Jan 4 22:51:43 2007
@@ -30,6 +30,7 @@
{
this.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel();
+ this._displayType = new System.Windows.Forms.ComboBox();
this._checkCountLabel = new System.Windows.Forms.Label();
this._col = new System.Windows.Forms.Label();
this._line = new System.Windows.Forms.Label();
@@ -37,13 +38,14 @@
this._grid = new System.Windows.Forms.DataGridView();
this._astColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this._toolTip = new System.Windows.Forms.ToolTip(this.components);
- this._displayType = new System.Windows.Forms.ComboBox();
+ this._buildTypedtreeCountLabel = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this._grid)).BeginInit();
this.SuspendLayout();
//
// panel1
//
+ this.panel1.Controls.Add(this._buildTypedtreeCountLabel);
this.panel1.Controls.Add(this._displayType);
this.panel1.Controls.Add(this._checkCountLabel);
this.panel1.Controls.Add(this._col);
@@ -55,10 +57,22 @@
this.panel1.Size = new System.Drawing.Size(245, 46);
this.panel1.TabIndex = 0;
//
+ // _displayType
+ //
+ this._displayType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this._displayType.Items.AddRange(new object[] {
+ "Tokens",
+ "AST"});
+ this._displayType.Location = new System.Drawing.Point(3, 20);
+ this._displayType.Margin = new System.Windows.Forms.Padding(2);
+ this._displayType.Name = "_displayType";
+ this._displayType.Size = new System.Drawing.Size(158, 21);
+ this._displayType.TabIndex = 2;
+ //
// _checkCountLabel
//
this._checkCountLabel.AutoSize = true;
- this._checkCountLabel.Location = new System.Drawing.Point(200, 4);
+ this._checkCountLabel.Location = new System.Drawing.Point(172, 4);
this._checkCountLabel.Name = "_checkCountLabel";
this._checkCountLabel.Size = new System.Drawing.Size(13, 13);
this._checkCountLabel.TabIndex = 1;
@@ -68,7 +82,7 @@
// _col
//
this._col.AutoSize = true;
- this._col.Location = new System.Drawing.Point(148, 4);
+ this._col.Location = new System.Drawing.Point(132, 4);
this._col.Name = "_col";
this._col.Size = new System.Drawing.Size(13, 13);
this._col.TabIndex = 1;
@@ -121,17 +135,15 @@
this._astColumn.Name = "_astColumn";
this._astColumn.ReadOnly = true;
//
- // _displayType
+ // _buildTypedtreeCountLabel
//
- this._displayType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this._displayType.Items.AddRange(new object[] {
- "Tokens",
- "AST"});
- this._displayType.Location = new System.Drawing.Point(3, 20);
- this._displayType.Margin = new System.Windows.Forms.Padding(2);
- this._displayType.Name = "_displayType";
- this._displayType.Size = new System.Drawing.Size(158, 21);
- this._displayType.TabIndex = 2;
+ this._buildTypedtreeCountLabel.AutoSize = true;
+ this._buildTypedtreeCountLabel.Location = new System.Drawing.Point(212, 4);
+ this._buildTypedtreeCountLabel.Name = "_buildTypedtreeCountLabel";
+ this._buildTypedtreeCountLabel.Size = new System.Drawing.Size(13, 13);
+ this._buildTypedtreeCountLabel.TabIndex = 3;
+ this._buildTypedtreeCountLabel.Text = "0";
+ this._toolTip.SetToolTip(this._buildTypedtreeCountLabel, "Build typed tree count");
//
// AstToolControl
//
@@ -159,5 +171,6 @@
private System.Windows.Forms.ToolTip _toolTip;
private System.Windows.Forms.Label _checkCountLabel;
private System.Windows.Forms.ComboBox _displayType;
+ private System.Windows.Forms.Label _buildTypedtreeCountLabel;
}
}
Modified: vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.cs Thu Jan 4 22:51:43 2007
@@ -75,6 +75,18 @@
Settings.Default.AutoShowAst = _autoUpdateCheckBox.Checked;
}
+ int _buildTypedtreeCount;
+
+ public int BuildTypedtreeCount
+ {
+ get { return _buildTypedtreeCount; }
+ set
+ {
+ _buildTypedtreeCount = value;
+ _buildTypedtreeCountLabel.Text = value.ToString();
+ }
+ }
+
internal void ShowInfo(NemerleSource source)
{
_checkCountLabel.Text = (++_checkCount).ToString();
Modified: vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.resx
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.resx (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolControl.resx Thu Jan 4 22:51:43 2007
@@ -126,7 +126,4 @@
<metadata name="_astColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="_toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
</root>
\ No newline at end of file
Modified: vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolWindow.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolWindow.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/GUI/AstToolWindow.cs Thu Jan 4 22:51:43 2007
@@ -37,6 +37,12 @@
// the object returned by the Window property.
private AstToolControl _control;
+ public int BuildTypedtreeCount
+ {
+ get { return _control.BuildTypedtreeCount; }
+ set { _control.BuildTypedtreeCount = value; }
+ }
+
/// <summary>
/// Standard constructor for the tool window.
/// </summary>
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs Thu Jan 4 22:51:43 2007
@@ -55,6 +55,12 @@
_engine = new Engine(options, projectManager,
new TraceWriter()); // it enables parser working.
projectManager.Engine = _engine;
+ _engine.TypedtreeCreated += delegate
+ {
+ AstToolWindow tool = AstToolWindow.AstTool;
+ if (tool != null)
+ tool.BuildTypedtreeCount++;
+ };
if (!string.IsNullOrEmpty(location))
_projectLocation = location;
More information about the svn
mailing list