Skip to content

Commit

Permalink
AsmSim Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
HJLebbink committed Jun 2, 2017
1 parent edb1232 commit 88b1f27
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 163 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ label1:



mov rcx, 10
labelx:
dec rcx
jnz labelx
mov rax, rcx

aaa

Expand Down
18 changes: 9 additions & 9 deletions VS/CSHARP/asm-dude-vsix/Squiggles/SquigglesTagger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ public IEnumerable<ITagSpan<IErrorTag>> GetTags(NormalizedSnapshotSpanCollection
{
if (Decorate_Syntax_Errors || Decorate_Unimplemented)
{
if (this._asmSimulator.IsImplemented(lineNumber))
if (this._asmSimulator.Is_Implemented(lineNumber))
{
if (Decorate_Syntax_Errors && this._asmSimulator.HasSyntaxError(lineNumber))
if (Decorate_Syntax_Errors && this._asmSimulator.Has_Syntax_Error(lineNumber))
{
string message = AsmSourceTools.Linewrap("Syntax Error: " + this._asmSimulator.Get_Syntax_Error(lineNumber).Message, AsmDudePackage.maxNumberOfCharsInToolTips);
yield return new TagSpan<IErrorTag>(tagSpan, new ErrorTag(PredefinedErrorTypeNames.SyntaxError, message));
Expand Down Expand Up @@ -376,7 +376,7 @@ private void Update_Error_Task_AsmSim(int lineNumber, AsmMessageEnum error)
if (Settings.Default.AsmSim_Show_Syntax_Errors)
{
var tup = this._asmSimulator.Get_Syntax_Error(lineNumber);
this.AddErrorTask_SyntaxError(lineNumber, tup.Message, tup.Mnemonic);
if (tup.Message.Length > 0) this.AddErrorTask_SyntaxError(lineNumber, tup.Message, tup.Mnemonic);
errorListNeedsRefresh = true;
}
break;
Expand All @@ -386,7 +386,7 @@ private void Update_Error_Task_AsmSim(int lineNumber, AsmMessageEnum error)
if (Settings.Default.AsmSim_Show_Usage_Of_Undefined)
{
var tup = this._asmSimulator.Get_Usage_Undefined_Warning(lineNumber);
this.AddErrorTask_UsageUndefined(lineNumber, tup);
if (tup.Length > 0) this.AddErrorTask_UsageUndefined(lineNumber, tup);
errorListNeedsRefresh = true;
}
break;
Expand All @@ -396,7 +396,7 @@ private void Update_Error_Task_AsmSim(int lineNumber, AsmMessageEnum error)
if (Settings.Default.AsmSim_Show_Redundant_Instructions)
{
var tup = this._asmSimulator.Get_Redundant_Instruction_Warning(lineNumber);
this.AddErrorTask_RedundantInstruction(lineNumber, tup);
if (tup.Length > 0) this.AddErrorTask_RedundantInstruction(lineNumber, tup);
errorListNeedsRefresh = true;
}
break;
Expand All @@ -407,7 +407,7 @@ private void Update_Error_Task_AsmSim(int lineNumber, AsmMessageEnum error)
if (errorListNeedsRefresh)
{
this._errorListProvider.Refresh();
this._errorListProvider.Show(); // do not use BringToFront since that will select the error window.
//this._errorListProvider.Show(); // do not use BringToFront since that will select the error window.
}
}

Expand Down Expand Up @@ -446,7 +446,7 @@ await System.Threading.Tasks.Task.Run(() =>
if (Settings.Default.AsmSim_Show_Syntax_Errors)
{
foreach (var tup in this._asmSimulator.SyntaxErrors)
foreach (var tup in this._asmSimulator.Syntax_Errors)
{
this.AddErrorTask_SyntaxError(tup.LineNumber, tup.Message, tup.Mnemonic);
errorListNeedsRefresh = true;
Expand All @@ -472,7 +472,7 @@ await System.Threading.Tasks.Task.Run(() =>
if (errorListNeedsRefresh)
{
this._errorListProvider.Refresh();
this._errorListProvider.Show(); // do not use BringToFront since that will select the error window.
//this._errorListProvider.Show(); // do not use BringToFront since that will select the error window.
}
}
#endregion Update Error Tasks
Expand Down Expand Up @@ -638,7 +638,7 @@ await System.Threading.Tasks.Task.Run(() =>
if (errorListNeedsRefresh)
{
this._errorListProvider.Refresh();
this._errorListProvider.Show(); // do not use BringToFront since that will select the error window.
//this._errorListProvider.Show(); // do not use BringToFront since that will select the error window.
}
}
#endregion Update Error Tasks
Expand Down
2 changes: 1 addition & 1 deletion VS/CSHARP/asm-dude-vsix/Tools/AsmDudeToolsStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ public static void Disable_Message(string msg, string filename, ErrorListProvide
errorTask.Navigate += AsmDudeToolsStatic.Error_Task_Navigate_Handler;

errorListProvider.Tasks.Add(errorTask);
errorListProvider.Show(); // do not use BringToFront since that will select the error window.
errorListProvider.Refresh();
//errorListProvider.Show(); // do not use BringToFront since that will select the error window.
}

public static MicroArch Get_MicroArch_Switched_On()
Expand Down
Loading

0 comments on commit 88b1f27

Please sign in to comment.