Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 3eddd4c

Browse files
More renaming
1 parent 7cf4eba commit 3eddd4c

13 files changed

+71
-71
lines changed

src/GitHub.InlineReviews/Commands/InlineCommentNavigationCommand.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ protected IEnumerable<ITextView> GetCurrentTextViews()
181181
/// </summary>
182182
/// <param name="textView">The text view.</param>
183183
/// <returns>The tag aggregator</returns>
184-
protected ITagAggregator<InlineTag> CreateTagAggregator(ITextView textView)
184+
protected ITagAggregator<InlineReviewTag> CreateTagAggregator(ITextView textView)
185185
{
186-
return tagAggregatorFactory.CreateTagAggregator<InlineTag>(textView);
186+
return tagAggregatorFactory.CreateTagAggregator<InlineReviewTag>(textView);
187187
}
188188

189189
/// <summary>
190-
/// Gets the <see cref="ShowInlineTag"/>s for the specified text view.
190+
/// Gets the <see cref="ShowInlineReviewTag"/>s for the specified text view.
191191
/// </summary>
192192
/// <param name="textViews">The active text views.</param>
193193
/// <returns>A collection of <see cref="ITagInfo"/> objects, ordered by line.</returns>
@@ -205,7 +205,7 @@ protected IReadOnlyList<ITagInfo> GetTags(IEnumerable<ITextView> textViews)
205205
{
206206
TextView = textView,
207207
Point = Map(x.Span.Start, textView.TextSnapshot),
208-
Tag = x.Tag as ShowInlineTag,
208+
Tag = x.Tag as ShowInlineReviewTag,
209209
})
210210
.Where(x => x.Tag != null && x.Point.HasValue);
211211
result.AddRange(tags);
@@ -225,7 +225,7 @@ protected IReadOnlyList<ITagInfo> GetTags(IEnumerable<ITextView> textViews)
225225
protected void ShowPeekComments(
226226
InlineCommentNavigationParams parameter,
227227
ITextView textView,
228-
ShowInlineTag tag,
228+
ShowInlineReviewTag tag,
229229
IEnumerable<ITextView> allTextViews)
230230
{
231231
foreach (var other in allTextViews)
@@ -268,14 +268,14 @@ void QueryStatus(object sender, EventArgs e)
268268
protected interface ITagInfo
269269
{
270270
ITextView TextView { get; }
271-
ShowInlineTag Tag { get; }
271+
ShowInlineReviewTag Tag { get; }
272272
SnapshotPoint Point { get; }
273273
}
274274

275275
class TagInfo : ITagInfo
276276
{
277277
public ITextView TextView { get; set; }
278-
public ShowInlineTag Tag { get; set; }
278+
public ShowInlineReviewTag Tag { get; set; }
279279
public SnapshotPoint? Point { get; set; }
280280

281281
SnapshotPoint ITagInfo.Point => Point.Value;

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@
151151
<DependentUpon>ShowInlineCommentGlyph.xaml</DependentUpon>
152152
</Compile>
153153
<Compile Include="Tags\InlineGlyphFactory.cs" />
154-
<Compile Include="Tags\InlineTag.cs" />
155-
<Compile Include="Tags\ShowInlineTag.cs" />
156-
<Compile Include="Tags\InlineTagger.cs" />
154+
<Compile Include="Tags\InlineReviewTag.cs" />
155+
<Compile Include="Tags\ShowInlineReviewTag.cs" />
156+
<Compile Include="Tags\InlineReviewTagger.cs" />
157157
<Compile Include="Tags\InlineCommentTaggerProvider.cs" />
158158
<Compile Include="ViewModels\CommentThreadInlineReviewViewModel.cs" />
159159
<Compile Include="ViewModels\ICommentViewModel.cs" />

src/GitHub.InlineReviews/Margins/InlineCommentMargin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public sealed class InlineCommentMargin : IWpfTextViewMargin
2525
readonly IPullRequestSessionManager sessionManager;
2626
readonly Grid marginGrid;
2727

28-
GlyphMargin<InlineTag> glyphMargin;
28+
GlyphMargin<InlineReviewTag> glyphMargin;
2929
IDisposable currentSessionSubscription;
3030
IDisposable visibleSubscription;
3131
bool hasChanges;
@@ -48,7 +48,7 @@ public InlineCommentMargin(
4848
var glyphFactory = new InlineGlyphFactory(peekService, textView);
4949
var editorFormatMap = editorFormatMapService.GetEditorFormatMap(textView);
5050

51-
glyphMargin = new GlyphMargin<InlineTag>(textView, glyphFactory, marginGrid, tagAggregatorFactory,
51+
glyphMargin = new GlyphMargin<InlineReviewTag>(textView, glyphFactory, marginGrid, tagAggregatorFactory,
5252
editorFormatMap, MarginPropertiesName);
5353

5454
if (IsDiffView())

src/GitHub.InlineReviews/Services/IInlineCommentPeekService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public interface IInlineCommentPeekService
2929
void Hide(ITextView textView);
3030

3131
/// <summary>
32-
/// Shows the peek view for a <see cref="ShowInlineTag"/>.
32+
/// Shows the peek view for a <see cref="ShowInlineReviewTag"/>.
3333
/// </summary>
3434
/// <param name="textView">The text view.</param>
3535
/// <param name="tag">The tag.</param>
36-
ITrackingPoint Show(ITextView textView, ShowInlineTag tag);
36+
ITrackingPoint Show(ITextView textView, ShowInlineReviewTag tag);
3737

3838
/// <summary>
3939
/// Shows the peek view for an <see cref="AddInlineCommentTag"/>.

src/GitHub.InlineReviews/Services/InlineCommentPeekService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public ITrackingPoint Show(ITextView textView, AddInlineCommentTag tag)
113113
}
114114

115115
/// <inheritdoc/>
116-
public ITrackingPoint Show(ITextView textView, ShowInlineTag tag)
116+
public ITrackingPoint Show(ITextView textView, ShowInlineReviewTag tag)
117117
{
118118
Guard.ArgumentNotNull(textView, nameof(textView));
119119
Guard.ArgumentNotNull(tag, nameof(tag));
@@ -136,7 +136,7 @@ public ITrackingPoint Show(ITextView textView, ShowInlineTag tag)
136136
return trackingPoint;
137137
}
138138

139-
Tuple<ITextSnapshotLine, ITrackingPoint> GetLineAndTrackingPoint(ITextView textView, InlineTag tag)
139+
Tuple<ITextSnapshotLine, ITrackingPoint> GetLineAndTrackingPoint(ITextView textView, InlineReviewTag tag)
140140
{
141141
var diffModel = (textView as IWpfTextView)?.TextViewModel as IDifferenceTextViewModel;
142142
var snapshot = textView.TextSnapshot;

src/GitHub.InlineReviews/Tags/AddInlineCommentTag.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace GitHub.InlineReviews.Tags
77
/// <summary>
88
/// A tag which marks a line in an editor where a new review comment can be added.
99
/// </summary>
10-
public class AddInlineCommentTag : InlineTag
10+
public class AddInlineCommentTag : InlineReviewTag
1111
{
1212
/// <summary>
1313
/// Initializes a new instance of the <see cref="AddInlineCommentTag"/> class.

src/GitHub.InlineReviews/Tags/InlineCommentTaggerProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
namespace GitHub.InlineReviews.Tags
1212
{
1313
/// <summary>
14-
/// Factory class for <see cref="InlineTagger"/>s.
14+
/// Factory class for <see cref="InlineReviewTagger"/>s.
1515
/// </summary>
1616
[Export(typeof(IViewTaggerProvider))]
1717
[ContentType("text")]
18-
[TagType(typeof(ShowInlineTag))]
18+
[TagType(typeof(ShowInlineReviewTag))]
1919
class InlineCommentTaggerProvider : IViewTaggerProvider
2020
{
2121
readonly IPullRequestSessionManager sessionManager;
@@ -32,7 +32,7 @@ public InlineCommentTaggerProvider(
3232
public ITagger<T> CreateTagger<T>(ITextView view, ITextBuffer buffer) where T : ITag
3333
{
3434
return buffer.Properties.GetOrCreateSingletonProperty(() =>
35-
new InlineTagger(
35+
new InlineReviewTagger(
3636
view,
3737
buffer,
3838
sessionManager)) as ITagger<T>;

src/GitHub.InlineReviews/Tags/InlineGlyphFactory.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace GitHub.InlineReviews.Tags
1212
{
13-
class InlineGlyphFactory : IGlyphFactory<InlineTag>
13+
class InlineGlyphFactory : IGlyphFactory<InlineReviewTag>
1414
{
1515
readonly IInlineCommentPeekService peekService;
1616
readonly ITextView textView;
@@ -23,7 +23,7 @@ public InlineGlyphFactory(
2323
this.textView = textView;
2424
}
2525

26-
public UIElement GenerateGlyph(IWpfTextViewLine line, InlineTag tag)
26+
public UIElement GenerateGlyph(IWpfTextViewLine line, InlineReviewTag tag)
2727
{
2828
var glyph = CreateGlyph(tag);
2929
glyph.DataContext = tag;
@@ -40,15 +40,15 @@ public IEnumerable<Type> GetTagTypes()
4040
return new[]
4141
{
4242
typeof(AddInlineCommentTag),
43-
typeof(ShowInlineTag)
43+
typeof(ShowInlineReviewTag)
4444
};
4545
}
4646

4747
[SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")]
48-
static UserControl CreateGlyph(InlineTag tag)
48+
static UserControl CreateGlyph(InlineReviewTag tag)
4949
{
5050
var addTag = tag as AddInlineCommentTag;
51-
var showTag = tag as ShowInlineTag;
51+
var showTag = tag as ShowInlineReviewTag;
5252

5353
if (addTag != null)
5454
{
@@ -78,13 +78,13 @@ static UserControl CreateGlyph(InlineTag tag)
7878
throw new ArgumentException($"{nameof(showTag)} does not have a thread or annotations");
7979
}
8080

81-
throw new ArgumentException($"Unknown 'InlineTag' type '{tag}'");
81+
throw new ArgumentException($"Unknown 'InlineReviewTag' type '{tag}'");
8282
}
8383

84-
bool OpenThreadView(InlineTag tag)
84+
bool OpenThreadView(InlineReviewTag tag)
8585
{
8686
var addTag = tag as AddInlineCommentTag;
87-
var showTag = tag as ShowInlineTag;
87+
var showTag = tag as ShowInlineReviewTag;
8888

8989
if (addTag != null)
9090
{

src/GitHub.InlineReviews/Tags/InlineTag.cs renamed to src/GitHub.InlineReviews/Tags/InlineReviewTag.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ namespace GitHub.InlineReviews.Tags
99
/// Base class for inline comment tags.
1010
/// </summary>
1111
/// <seealso cref="AddInlineCommentTag"/>
12-
/// <seealso cref="ShowInlineTag"/>
13-
public abstract class InlineTag : ITag
12+
/// <seealso cref="ShowInlineReviewTag"/>
13+
public abstract class InlineReviewTag : ITag
1414
{
15-
protected InlineTag(
15+
protected InlineReviewTag(
1616
IPullRequestSession session,
1717
int lineNumber,
1818
DiffChangeType diffChangeType)

src/GitHub.InlineReviews/Tags/InlineTagger.cs renamed to src/GitHub.InlineReviews/Tags/InlineReviewTagger.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ namespace GitHub.InlineReviews.Tags
2121
/// <summary>
2222
/// Creates tags in an <see cref="ITextBuffer"/> for inline comment threads.
2323
/// </summary>
24-
public sealed class InlineTagger : ITagger<InlineTag>, IDisposable
24+
public sealed class InlineReviewTagger : ITagger<InlineReviewTag>, IDisposable
2525
{
26-
static readonly ILogger log = LogManager.ForContext<InlineTagger>();
27-
static readonly IReadOnlyList<ITagSpan<InlineTag>> EmptyTags = new ITagSpan<InlineTag>[0];
26+
static readonly ILogger log = LogManager.ForContext<InlineReviewTagger>();
27+
static readonly IReadOnlyList<ITagSpan<InlineReviewTag>> EmptyTags = new ITagSpan<InlineReviewTag>[0];
2828
readonly ITextBuffer buffer;
2929
readonly ITextView view;
3030
readonly IPullRequestSessionManager sessionManager;
@@ -37,7 +37,7 @@ public sealed class InlineTagger : ITagger<InlineTag>, IDisposable
3737
IDisposable sessionManagerSubscription;
3838
IDisposable visibleSubscription;
3939

40-
public InlineTagger(
40+
public InlineReviewTagger(
4141
ITextView view,
4242
ITextBuffer buffer,
4343
IPullRequestSessionManager sessionManager)
@@ -64,7 +64,7 @@ public void Dispose()
6464
visibleSubscription = null;
6565
}
6666

67-
public IEnumerable<ITagSpan<InlineTag>> GetTags(NormalizedSnapshotSpanCollection spans)
67+
public IEnumerable<ITagSpan<InlineReviewTag>> GetTags(NormalizedSnapshotSpanCollection spans)
6868
{
6969
if (needsInitialize)
7070
{
@@ -74,7 +74,7 @@ public IEnumerable<ITagSpan<InlineTag>> GetTags(NormalizedSnapshotSpanCollection
7474
}
7575
else if (file?.InlineCommentThreads != null)
7676
{
77-
var result = new List<ITagSpan<InlineTag>>();
77+
var result = new List<ITagSpan<InlineReviewTag>>();
7878
var currentSession = session ?? sessionManager.CurrentSession;
7979

8080
if (currentSession == null)
@@ -128,13 +128,13 @@ public IEnumerable<ITagSpan<InlineTag>> GetTags(NormalizedSnapshotSpanCollection
128128
{
129129
linesWithTags[line - startLine] = true;
130130

131-
var showInlineTag = new ShowInlineTag(currentSession, line, thread?.DiffLineType ?? DiffChangeType.Add)
131+
var showInlineTag = new ShowInlineReviewTag(currentSession, line, thread?.DiffLineType ?? DiffChangeType.Add)
132132
{
133133
Thread = thread,
134134
Annotations = annotations
135135
};
136136

137-
result.Add(new TagSpan<ShowInlineTag>(
137+
result.Add(new TagSpan<ShowInlineReviewTag>(
138138
new SnapshotSpan(snapshotLine.Start, snapshotLine.End),
139139
showInlineTag));
140140
}
@@ -152,7 +152,7 @@ public IEnumerable<ITagSpan<InlineTag>> GetTags(NormalizedSnapshotSpanCollection
152152
&& (side == DiffSide.Right || line.Type == DiffChangeType.Delete))
153153
{
154154
var snapshotLine = span.Snapshot.GetLineFromLineNumber(lineNumber);
155-
result.Add(new TagSpan<InlineTag>(
155+
result.Add(new TagSpan<InlineReviewTag>(
156156
new SnapshotSpan(snapshotLine.Start, snapshotLine.End),
157157
new AddInlineCommentTag(currentSession, file.CommitSha, relativePath, line.DiffLineNumber, lineNumber, line.Type)));
158158
}

0 commit comments

Comments
 (0)