Skip to content

Commit 1144ec6

Browse files
committed
Added this. for fully qualified method names
1 parent e0698a9 commit 1144ec6

25 files changed

+342
-342
lines changed

VS/CSHARP/asm-dude-vsix/AsmDoc/AsmDocKeyProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ private void UpdateState(KeyEventArgs args)
4646

4747
public override void PreviewKeyDown(KeyEventArgs args)
4848
{
49-
UpdateState(args);
49+
this.UpdateState(args);
5050
}
5151

5252
public override void PreviewKeyUp(KeyEventArgs args)
5353
{
54-
UpdateState(args);
54+
this.UpdateState(args);
5555
}
5656
}
5757
}

VS/CSHARP/asm-dude-vsix/AsmDoc/AsmDocMouseHandler.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ public AsmDocMouseHandler(
7373
{
7474
if (this._state.Enabled)
7575
{
76-
TryHighlightItemUnderMouse(RelativeToView(Mouse.PrimaryDevice.GetPosition(this._view.VisualElement)));
76+
this.TryHighlightItemUnderMouse(this.RelativeToView(Mouse.PrimaryDevice.GetPosition(this._view.VisualElement)));
7777
}
7878
else
7979
{
80-
Set_Highlight_Span(null);
80+
this.Set_Highlight_Span(null);
8181
}
8282
}
8383
};
8484

8585
// Some other points to clear the highlight span:
86-
this._view.LostAggregateFocus += (sender, args) => Set_Highlight_Span(null);
87-
this._view.VisualElement.MouseLeave += (sender, args) => Set_Highlight_Span(null);
86+
this._view.LostAggregateFocus += (sender, args) => this.Set_Highlight_Span(null);
87+
this._view.VisualElement.MouseLeave += (sender, args) => this.Set_Highlight_Span(null);
8888

8989
}
9090

@@ -96,7 +96,7 @@ public AsmDocMouseHandler(
9696

9797
public override void PostprocessMouseLeftButtonDown(MouseButtonEventArgs e)
9898
{
99-
this._mouseDownAnchorPoint = RelativeToView(e.GetPosition(this._view.VisualElement));
99+
this._mouseDownAnchorPoint = this.RelativeToView(e.GetPosition(this._view.VisualElement));
100100
}
101101

102102
public override void PreprocessMouseMove(MouseEventArgs e)
@@ -105,16 +105,16 @@ public override void PreprocessMouseMove(MouseEventArgs e)
105105

106106
if (!this._mouseDownAnchorPoint.HasValue && this._state.Enabled && (e.LeftButton == MouseButtonState.Released))
107107
{
108-
TryHighlightItemUnderMouse(RelativeToView(e.GetPosition(this._view.VisualElement)));
108+
this.TryHighlightItemUnderMouse(this.RelativeToView(e.GetPosition(this._view.VisualElement)));
109109
}
110110
else if (this._mouseDownAnchorPoint.HasValue)
111111
{
112112
// Check and see if this is a drag; if so, clear out the highlight.
113-
var currentMousePosition = RelativeToView(e.GetPosition(this._view.VisualElement));
114-
if (InDragOperation(this._mouseDownAnchorPoint.Value, currentMousePosition))
113+
var currentMousePosition = this.RelativeToView(e.GetPosition(this._view.VisualElement));
114+
if (this.InDragOperation(this._mouseDownAnchorPoint.Value, currentMousePosition))
115115
{
116116
this._mouseDownAnchorPoint = null;
117-
Set_Highlight_Span(null);
117+
this.Set_Highlight_Span(null);
118118
}
119119
}
120120
}
@@ -139,9 +139,9 @@ public override void PreprocessMouseUp(MouseButtonEventArgs e)
139139
{
140140
if (this._mouseDownAnchorPoint.HasValue && this._state.Enabled)
141141
{
142-
var currentMousePosition = RelativeToView(e.GetPosition(this._view.VisualElement));
142+
var currentMousePosition = this.RelativeToView(e.GetPosition(this._view.VisualElement));
143143

144-
if (!InDragOperation(this._mouseDownAnchorPoint.Value, currentMousePosition))
144+
if (!this.InDragOperation(this._mouseDownAnchorPoint.Value, currentMousePosition))
145145
{
146146
this._state.Enabled = false;
147147

@@ -152,7 +152,7 @@ public override void PreprocessMouseUp(MouseButtonEventArgs e)
152152
{
153153
this.Dispatch_Goto_Doc(keyword);
154154
}
155-
Set_Highlight_Span(null);
155+
this.Set_Highlight_Span(null);
156156
this._view.Selection.Clear();
157157
e.Handled = true;
158158
}
@@ -161,7 +161,7 @@ public override void PreprocessMouseUp(MouseButtonEventArgs e)
161161
}
162162
catch (Exception ex)
163163
{
164-
AsmDudeToolsStatic.Output_ERROR(string.Format("{0} PreprocessMouseUp; e={1}", ToString(), ex.ToString()));
164+
AsmDudeToolsStatic.Output_ERROR(string.Format("{0} PreprocessMouseUp; e={1}", this.ToString(), ex.ToString()));
165165
}
166166
}
167167

@@ -215,7 +215,7 @@ private bool TryHighlightItemUnderMouse(Point position)
215215
//string type = classification.ClassificationType.Classification.ToLower();
216216
string url = this.Get_Url(keyword);
217217
//Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "INFO: {0}:TryHighlightItemUnderMouse: keyword={1}; type={2}; url={3}", this.ToString(), keyword, type, url));
218-
if ((url != null) && Set_Highlight_Span(classification.Span))
218+
if ((url != null) && this.Set_Highlight_Span(classification.Span))
219219
{
220220
updated = true;
221221
return true;
@@ -228,7 +228,7 @@ private bool TryHighlightItemUnderMouse(Point position)
228228
{
229229
if (!updated)
230230
{
231-
Set_Highlight_Span(null);
231+
this.Set_Highlight_Span(null);
232232
}
233233
}
234234
}
@@ -311,7 +311,7 @@ private int Open_File(string keyword)
311311
var dte2 = Package.GetGlobalService(typeof(SDTE)) as DTE2;
312312
if (dte2 == null)
313313
{
314-
AsmDudeToolsStatic.Output_WARNING(string.Format("{0}:openFile; dte2 is null.", ToString()));
314+
AsmDudeToolsStatic.Output_WARNING(string.Format("{0}:openFile; dte2 is null.", this.ToString()));
315315
return 1;
316316
}
317317

@@ -322,7 +322,7 @@ private int Open_File(string keyword)
322322
{
323323
// vsNavigateOptionsDefault 0 The Web page opens in the currently open browser window. (Default)
324324
// vsNavigateOptionsNewWindow 1 The Web page opens in a new browser window.
325-
AsmDudeToolsStatic.Output_INFO(string.Format("{0}:openFile; going to open url {1}.", ToString(), url));
325+
AsmDudeToolsStatic.Output_INFO(string.Format("{0}:openFile; going to open url {1}.", this.ToString(), url));
326326
window = dte2.ItemOperations.Navigate(url, EnvDTE.vsNavigateOptions.vsNavigateOptionsNewWindow);
327327

328328
var parts = url.Split('/');
@@ -346,7 +346,7 @@ private int Open_File(string keyword)
346346
}
347347
catch (Exception e)
348348
{
349-
AsmDudeToolsStatic.Output_ERROR(string.Format("{0}:openFile; exception={1}", ToString(), e));
349+
AsmDudeToolsStatic.Output_ERROR(string.Format("{0}:openFile; exception={1}", this.ToString(), e));
350350
return 2;
351351
}
352352
}

VS/CSHARP/asm-dude-vsix/BraceMatching/BraceMatchingTagger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ internal BraceMatchingTagger(ITextView view, ITextBuffer sourceBuffer) {
5959

6060
private void ViewLayoutChanged(object sender, TextViewLayoutChangedEventArgs e) {
6161
if (e.NewSnapshot != e.OldSnapshot) { //make sure that there has really been a change
62-
UpdateAtCaretPosition(this._view.Caret.Position);
62+
this.UpdateAtCaretPosition(this._view.Caret.Position);
6363
}
6464
}
6565

6666
private void CaretPositionChanged(object sender, CaretPositionChangedEventArgs e) {
67-
UpdateAtCaretPosition(e.NewPosition);
67+
this.UpdateAtCaretPosition(e.NewPosition);
6868
}
6969
private void UpdateAtCaretPosition(CaretPosition caretPosition) {
7070
this._currentChar = caretPosition.Point.GetPoint(this._sourceBuffer, caretPosition.Affinity);

VS/CSHARP/asm-dude-vsix/CodeCompletion/CodeCompletionCommandFilter.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pv
5858
//}
5959
if (false)
6060
{
61-
return ExecMethod1(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
61+
return this.ExecMethod1(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
6262
}
6363
else
6464
{
65-
return ExecMethod2(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
65+
return this.ExecMethod2(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
6666
}
6767
}
6868

@@ -74,7 +74,7 @@ private int ExecMethod1(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, I
7474
//make sure the input is a char before getting it
7575
if ((pguidCmdGroup == VSConstants.VSStd2K) && (nCmdID == (uint)VSConstants.VSStd2KCmdID.TYPECHAR))
7676
{
77-
typedChar = GetTypeChar(pvaIn);
77+
typedChar = this.GetTypeChar(pvaIn);
7878
}
7979
//Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "INFO: {0}:Exec: typedChar={1}", this.ToString(), typedChar));
8080

@@ -113,7 +113,7 @@ private int ExecMethod1(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, I
113113
{
114114
if (this._currentSession == null || this._currentSession.IsDismissed)
115115
{ // If there is no active session, bring up completion
116-
if (StartSession())
116+
if (this.StartSession())
117117
{
118118
if (this._currentSession != null)
119119
{
@@ -155,33 +155,33 @@ private int ExecMethod2(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, I
155155
{
156156
case VSConstants.VSStd2KCmdID.AUTOCOMPLETE:
157157
case VSConstants.VSStd2KCmdID.COMPLETEWORD:
158-
handledChar = StartSession();
158+
handledChar = this.StartSession();
159159
break;
160160
case VSConstants.VSStd2KCmdID.RETURN:
161-
handledChar = Complete(true);
161+
handledChar = this.Complete(true);
162162
break;
163163
case VSConstants.VSStd2KCmdID.TAB:
164-
Complete(true);
164+
this.Complete(true);
165165
handledChar = false;
166166
break;
167167
case VSConstants.VSStd2KCmdID.CANCEL:
168-
handledChar = Cancel();
168+
handledChar = this.Cancel();
169169
break;
170170
case VSConstants.VSStd2KCmdID.TYPECHAR:
171-
typedChar = GetTypeChar(pvaIn);
171+
typedChar = this.GetTypeChar(pvaIn);
172172
if (char.IsWhiteSpace(typedChar))
173173
{
174-
Complete(true);
174+
this.Complete(true);
175175
handledChar = false;
176176
}
177177
else if (AsmTools.AsmSourceTools.IsSeparatorChar(typedChar))
178178
{
179-
Complete(false);
179+
this.Complete(false);
180180
handledChar = false;
181181
}
182182
else if (AsmTools.AsmSourceTools.IsRemarkChar(typedChar))
183183
{
184-
Complete(true);
184+
this.Complete(true);
185185
handledChar = false;
186186
}
187187
break;
@@ -199,17 +199,17 @@ private int ExecMethod2(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, I
199199
//if (!typedChar.Equals(char.MinValue)) {
200200
if ((this._currentSession == null) || this._currentSession.IsDismissed)
201201
{ // If there is no active session, bring up completion
202-
StartSession();
202+
this.StartSession();
203203
}
204-
Filter();
204+
this.Filter();
205205
hresult = VSConstants.S_OK;
206206
}
207207
else if (nCmdID == (uint)VSConstants.VSStd2KCmdID.BACKSPACE //redo the filter if there is a deletion
208208
|| nCmdID == (uint)VSConstants.VSStd2KCmdID.DELETE)
209209
{
210210
if ((this._currentSession != null) && !this._currentSession.IsDismissed)
211211
{
212-
Filter();
212+
this.Filter();
213213
}
214214
hresult = VSConstants.S_OK;
215215
}
@@ -226,7 +226,7 @@ private int ExecMethod2(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, I
226226
case VSConstants.VSStd2KCmdID.TYPECHAR:
227227
case VSConstants.VSStd2KCmdID.BACKSPACE:
228228
case VSConstants.VSStd2KCmdID.DELETE:
229-
Filter();
229+
this.Filter();
230230
break;
231231
}
232232
}

VS/CSHARP/asm-dude-vsix/CodeCompletion/CodeCompletionSource.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public CodeCompletionSource(ITextBuffer buffer, LabelGraph labelGraph, AsmSimula
6060
this._icons = new Dictionary<AsmTokenType, ImageSource>();
6161
this._asmDudeTools = AsmDudeTools.Instance;
6262
this._asmSimulator = asmSimulator;
63-
Load_Icons();
63+
this.Load_Icons();
6464
}
6565

6666
public void AugmentCompletionSession(ICompletionSession session, IList<CompletionSet> completionSets)
@@ -132,24 +132,24 @@ public void AugmentCompletionSession(ICompletionSession session, IList<Completio
132132
if (previousKeyword.Equals("INVOKE")) //TODO INVOKE is a MASM keyword not a NASM one...
133133
{
134134
// Suggest a label
135-
var completions = Label_Completions(useCapitals, false);
135+
var completions = this.Label_Completions(useCapitals, false);
136136
if (completions.Any<Completion>()) completionSets.Add(new CompletionSet("Labels", "Labels", applicableTo, completions, Enumerable.Empty<Completion>()));
137137
}
138138
else
139139
{
140140
{
141141
ISet<AsmTokenType> selected1 = new HashSet<AsmTokenType> { AsmTokenType.Directive, AsmTokenType.Jump, AsmTokenType.Misc, AsmTokenType.Mnemonic };
142-
var completions1 = Selected_Completions(useCapitals, selected1, true);
142+
var completions1 = this.Selected_Completions(useCapitals, selected1, true);
143143
if (completions1.Any<Completion>()) completionSets.Add(new CompletionSet("All", "All", applicableTo, completions1, Enumerable.Empty<Completion>()));
144144
}
145145
if (false) {
146146
ISet<AsmTokenType> selected2 = new HashSet<AsmTokenType> { AsmTokenType.Jump, AsmTokenType.Mnemonic };
147-
var completions2 = Selected_Completions(useCapitals, selected2, false);
147+
var completions2 = this.Selected_Completions(useCapitals, selected2, false);
148148
if (completions2.Any<Completion>()) completionSets.Add(new CompletionSet("Instr", "Instr", applicableTo, completions2, Enumerable.Empty<Completion>()));
149149
}
150150
if (false) {
151151
ISet<AsmTokenType> selected3 = new HashSet<AsmTokenType> { AsmTokenType.Directive, AsmTokenType.Misc };
152-
var completions3 = Selected_Completions(useCapitals, selected3, true);
152+
var completions3 = this.Selected_Completions(useCapitals, selected3, true);
153153
if (completions3.Any<Completion>()) completionSets.Add(new CompletionSet("Directive", "Directive", applicableTo, completions3, Enumerable.Empty<Completion>()));
154154
}
155155
}
@@ -162,14 +162,14 @@ public void AugmentCompletionSession(ICompletionSession session, IList<Completio
162162
{
163163
//AsmDudeToolsStatic.Output_INFO("CodeCompletionSource:AugmentCompletionSession; previous keyword is a jump mnemonic");
164164
// previous keyword is jump (or call) mnemonic. Suggest "SHORT" or a label
165-
var completions = Label_Completions(useCapitals, true);
165+
var completions = this.Label_Completions(useCapitals, true);
166166
if (completions.Any<Completion>()) completionSets.Add(new CompletionSet("Labels", "Labels", applicableTo, completions, Enumerable.Empty<Completion>()));
167167

168168
}
169169
else if (previousKeyword.Equals("SHORT") || previousKeyword.Equals("NEAR"))
170170
{
171171
// Suggest a label
172-
var completions = Label_Completions(useCapitals, false);
172+
var completions = this.Label_Completions(useCapitals, false);
173173
if (completions.Any<Completion>()) completionSets.Add(new CompletionSet("Labels", "Labels", applicableTo, completions, Enumerable.Empty<Completion>()));
174174
}
175175
else
@@ -199,7 +199,7 @@ public void AugmentCompletionSession(ICompletionSession session, IList<Completio
199199
}
200200
catch (Exception e)
201201
{
202-
AsmDudeToolsStatic.Output_ERROR(string.Format("{0}:AugmentCompletionSession; e={1}", ToString(), e.ToString()));
202+
AsmDudeToolsStatic.Output_ERROR(string.Format("{0}:AugmentCompletionSession; e={1}", this.ToString(), e.ToString()));
203203
}
204204
}
205205

0 commit comments

Comments
 (0)