This commit is contained in:
Бондарев Иван 2019-12-26 11:53:19 +01:00
parent 76329ab0b8
commit b9170c84c9
7 changed files with 98 additions and 13 deletions

View file

@ -1610,13 +1610,26 @@ namespace CodeCompletion
public override bool IsEqual(SymScope ts)
{
/*ElementScope es = ts as ElementScope;
if (this == ts)
return true;
if (this.Name != ts.Name)
return false;
ElementScope es = ts as ElementScope;
if (es == null)
return false;
if (this.ElemKind != es.ElemKind || this.param_kind != es.param_kind)
if (this.sc != es.sc)
return false;
return sc.IsEqual(es.sc);*/
return this == ts;
if (this.si.kind != SymbolKind.Parameter || ts.si.kind != SymbolKind.Parameter)
return false;
ProcScope ps1 = this.topScope as ProcScope;
ProcScope ps2 = es.topScope as ProcScope;
if (ps1 == null || ps2 == null)
return false;
if (ps1 == ps2 || ps1 is ProcRealization && (ps1 as ProcRealization).def_proc == ps2 || ps1.procRealization == ps2)
return true;
return false;
}
public override string ToString()

View file

@ -0,0 +1,20 @@
unit interface_function1;
interface
procedure {@}p1(a: byte);
procedure {!}p1(a: byte; b: real);
implementation
procedure {!}p1(a: byte);
begin
end;
procedure {!}p1(a: byte; b: real);
begin
{!}p1(2);
end;
end.

View file

@ -0,0 +1,14 @@
unit interface_parameter;
interface
procedure p1({@}a: byte);
implementation
procedure p1({!}a: byte);
begin
end;
end.

View file

@ -0,0 +1,20 @@
unit interface_parameter2;
interface
procedure p1({@}a: byte);
procedure p1(a: byte; b: real);
implementation
procedure p1({!}a: byte);
begin
end;
procedure p1(a: byte; b: real);
begin
end;
end.

View file

@ -50,6 +50,7 @@
this.button2 = new System.Windows.Forms.Button();
this.cbRunMono = new System.Windows.Forms.CheckBox();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PluginImage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RunILDASMImage)).BeginInit();
@ -70,7 +71,7 @@
//
this.groupBox1.Controls.Add(this.CompilerConsole);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.groupBox1.Location = new System.Drawing.Point(0, 382);
this.groupBox1.Location = new System.Drawing.Point(0, 417);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(379, 216);
this.groupBox1.TabIndex = 1;
@ -292,11 +293,22 @@
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(12, 378);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(112, 22);
this.button4.TabIndex = 21;
this.button4.Text = "Test rename";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.Button4_Click);
//
// CompilerInformation
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(379, 598);
this.ClientSize = new System.Drawing.Size(379, 633);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.cbRunMono);
this.Controls.Add(this.button2);
@ -324,10 +336,10 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FORMNAME";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CompilerInformation_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.CompilerInformation_FormClosed);
this.Load += new System.EventHandler(this.CompilerInformation_Load);
this.Shown += new System.EventHandler(this.CompilerInformation_Shown);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.CompilerInformation_FormClosed);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CompilerInformation_FormClosing);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PluginImage)).EndInit();
@ -362,5 +374,6 @@
private System.Windows.Forms.CheckBox cbNotUseRemoteCompiler;
public System.Windows.Forms.CheckBox cbRunMono;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
}
}

View file

@ -232,9 +232,9 @@ namespace VisualPascalABCPlugins
void Button2Click(object sender, EventArgs e)
{
CodeCompletion.CodeCompletionTester.Test();
CodeCompletion.CodeCompletionTester.TestRename(@"c:\Work\Miks\_PABCNETGitHub\TestSuite\refactoring_tests\rename_tests");
CodeCompletion.CodeCompletionTester.TestIntellisense(Path.Combine(@"c:\Work\Miks\_PABCNETGitHub\TestSuite", "intellisense_tests"));
CodeCompletion.CodeCompletionTester.TestIntellisense(Path.Combine(@"c:\Work\Miks\_PABCNETGitHub\TestSuite", "intellisense_tests"));
CodeCompletion.CodeCompletionTester.TestRename(@"c:\Work\Miks\_PABCNETGitHub\TestSuite\refactoring_tests\rename_tests");
MessageBox.Show("Done");
}
@ -249,5 +249,10 @@ namespace VisualPascalABCPlugins
CodeCompletion.FormatterTester.Test();
MessageBox.Show("Done");
}
private void Button4_Click(object sender, EventArgs e)
{
CodeCompletion.CodeCompletionTester.TestRename(@"c:\Work\Miks\_PABCNETGitHub\TestSuite\refactoring_tests\rename_tests");
}
}
}

View file

@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="PluginImage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Qk3WAgAAAAAAADYAAAAoAAAAEAAAAA4AAAABABgAAAAAAAAAAAASCwAAEgsAAAAAAAAAAAAA/wD//wD/