Skip to content

Commit

Permalink
Added github files and fixed dropdown loading
Browse files Browse the repository at this point in the history
[release]
  • Loading branch information
madskristensen committed Jan 14, 2022
1 parent 79985bb commit faef08b
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 24 deletions.
11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
25 changes: 15 additions & 10 deletions src/Editor/DropdownBars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,26 @@ internal class DropdownBars : TypeAndMemberDropdownBars, IDisposable
private bool _disposed;
private bool _bufferHasChanged;

public DropdownBars(IVsTextView textView, LanguageService languageService)
: base(languageService)
public DropdownBars(IVsTextView textView, LanguageService languageService) : base(languageService)
{
_languageService = languageService;

_textView = textView.ToIWpfTextView();
_textView.Caret.PositionChanged += CaretPositionChanged;

_document = _textView.TextBuffer.GetDocument();
_document.Processed += OnDocumentProcessed;

//SynchronizeDropdowns();
InitializeAsync(textView).FireAndForget();
}

// This moves the caret to trigger initial drop down load
private Task InitializeAsync(IVsTextView textView)
{
return ThreadHelper.JoinableTaskFactory.StartOnIdle(() =>
{
textView.SendExplicitFocus();
_textView.Caret.MoveToNextCaretPosition();
_textView.Caret.PositionChanged += CaretPositionChanged;
_textView.Caret.MoveToPreviousCaretPosition();
}).Task;
}

private void CaretPositionChanged(object sender, CaretPositionChangedEventArgs e) => SynchronizeDropdowns();
Expand All @@ -46,10 +54,7 @@ private void SynchronizeDropdowns()

_ = ThreadHelper.JoinableTaskFactory.StartOnIdle(() =>
{
if (!_document.IsProcessing)
{
_languageService.SynchronizeDropdowns();
}
_languageService.SynchronizeDropdowns();
}, VsTaskRunContext.UIThreadIdlePriority);
}

Expand Down
4 changes: 2 additions & 2 deletions src/PkgdefLanguage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Community.VisualStudio.Toolkit.16" version="16.0.385" ExcludeAssets="runtime">
<PackageReference Include="Community.VisualStudio.Toolkit.16" version="16.0.394" ExcludeAssets="runtime">
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VSSDK.BuildTools">
<Version>17.0.5232</Version>
<Version>17.0.5234</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion test/PkgdefLanguage.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Compile Remove="C:\Users\madsk\.nuget\packages\community.visualstudio.toolkit.16\16.0.357\build\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Community.VisualStudio.Toolkit.16" Version="16.0.385" />
<PackageReference Include="Community.VisualStudio.Toolkit.16" Version="16.0.394" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
Expand Down

0 comments on commit faef08b

Please sign in to comment.