Skip to content

Commit

Permalink
Merge pull request #142 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Bump 1.2.0.0
Fix Meadow tab focus and meadow tab clearing.
  • Loading branch information
CartBlanche authored Jul 31, 2023
2 parents 4dd6ed8 + 580bcd1 commit 7d6973e
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: VS4Win Extension
env:
IDE_TOOLS_RELEASE_VERSION: 1.1.2
IDE_TOOLS_RELEASE_VERSION: 1.2.0

on:
push:
Expand Down Expand Up @@ -151,4 +151,4 @@ jobs:
- if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
name: Publish VS2022 Extension
run: |
& "${env:ProgramFiles}\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" publish -payload "main\VS_Meadow_Extension\VS_Meadow_Extension.2022\bin\Release\Meadow.2022.vsix" -publishManifest "main\publishManifest.2022.json" -ignoreWarnings "None" -personalAccessToken "${{secrets.MARKETPLACE_PUBLISH_PAT}}"
& "${env:ProgramFiles}\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" publish -payload "main\VS_Meadow_Extension\VS_Meadow_Extension.2022\bin\Release\Meadow.2022.vsix" -publishManifest "main\publishManifest.2022.json" -ignoreWarnings "None" -personalAccessToken "${{secrets.MARKETPLACE_PUBLISH_PAT}}"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="VS_Meadow_Extension.ProjectType..fe358059-9487-4fe7-a01a-4b67b8231321" Version="1.1.2" Language="en-US" Publisher="Wilderness Labs" />
<Identity Id="VS_Meadow_Extension.ProjectType..fe358059-9487-4fe7-a01a-4b67b8231321" Version="1.2.0" Language="en-US" Publisher="Wilderness Labs" />
<DisplayName>VS 2019 Tools for Meadow</DisplayName>
<Description xml:space="preserve">Tools for developing Meadow applications</Description>
<Icon>wildernesslabs_icon.png</Icon>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="VS_Meadow_Extension.2022.d5eb772d-2173-4795-b60b-67929a9bf12d" Version="1.1.2" Language="en-US" Publisher="Wilderness Labs" />
<Identity Id="VS_Meadow_Extension.2022.d5eb772d-2173-4795-b60b-67929a9bf12d" Version="1.2.0" Language="en-US" Publisher="Wilderness Labs" />
<DisplayName>VS 2022 Tools for Meadow</DisplayName>
<Description xml:space="preserve">Tools for developing Meadow applications</Description>
<Icon>wildernesslabs_icon.png</Icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public DeployProvider(ConfiguredProject configuredProject)

public async Task DeployAsync(CancellationToken cts, TextWriter outputPaneWriter)
{
DeployOutputLogger?.ConnectTextWriter(outputPaneWriter);
await DeployOutputLogger?.ConnectTextWriter(outputPaneWriter);
MeadowPackage.DebugOrDeployInProgress = false;

var generalProperties = await Properties.GetConfigurationGeneralPropertiesAsync();
Expand Down Expand Up @@ -128,7 +128,7 @@ public async void Commit()

await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

DeployOutputLogger?.ShowMeadowLogs();
await DeployOutputLogger?.ShowMeadowLogs();
DeployOutputLogger?.Log("Launching application..." + Environment.NewLine);

DeployOutputLogger?.DisconnectTextWriter();
Expand Down
2 changes: 1 addition & 1 deletion VS_Meadow_Extension/VS_Meadow_Extension.Shared/Globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Meadow
{
public static class Globals
{
public const string AssemblyVersion = "1.1.2.0";
public const string AssemblyVersion = "1.2.0.0";

public const string MeadowCapability = "Meadow";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ public Task OnAfterLaunchAsync(DebugLaunchOptions launchOptions, ILaunchProfile
{
vsSession?.Start();
MeadowPackage.DebugOrDeployInProgress = false;

Task.Run(async () =>
{
await Task.Delay(10000);
await DeployProvider.DeployOutputLogger?.ShowMeadowLogs();
});

return Task.CompletedTask;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class OutputLogger : IProgress<string>, ILogger
private const uint PROGESS_INCREMENTS = 5;
private const uint TOTAL_PROGRESS = 100;

public OutputLogger()
public OutputLogger()
{
System.Threading.Tasks.Task.Run(async () =>
{
Expand All @@ -45,25 +45,24 @@ public OutputLogger()
outputWindow.GetPane(ref meadowPaneGuid, out meadowOutputPane);
}
}
else
{
// It already exists, so clear it for this run
meadowOutputPane?.Clear();
}
// Activate the pane, it should have been created by now
meadowOutputPane?.Activate();
}
}
// Activate the pane, it should have been created by now
await ShowMeadowLogs();
statusBar = Package.GetGlobalService(typeof(SVsStatusbar)) as IVsStatusbar;
});
});
}

public void ConnectTextWriter(TextWriter writer)
public async System.Threading.Tasks.Task ConnectTextWriter(TextWriter writer)
{
textWriter = writer;
}
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
textWriter = writer;

// It should exist now, so clear it for this run
meadowOutputPane?.Clear();
}

public void DisconnectTextWriter()
{
Expand Down Expand Up @@ -132,7 +131,7 @@ public void Report(string msg)
Log(msg);
}

internal async void ShowMeadowLogs()
internal async System.Threading.Tasks.Task ShowMeadowLogs()
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
meadowOutputPane?.Activate();
Expand Down
4 changes: 4 additions & 0 deletions overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ For step by step instructions on using this extension, [check out the tutorial](

## Release Notes

### 1.2.0

- Clear Meadow Log each run. Move focus back to Meadow pane each run.

### 1.1.2

- Update spacing meadow.*.yaml to meet specs and sync with Meadow.Sdk templates.
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

## Getting Started

The [Meadow.CLI](https://github.com/WildernessLabs/Meadow.CLI) repo must be cloned adjacent to this checkout using the `develop` branch.
To develop for this extension, you will need some prerequisites.

The [Meadow.CLI](https://github.com/WildernessLabs/Meadow.CLI) repo must be cloned adjacent to this checkout using the `develop` branch. This repo is used to resolve shared code and project references.

You will also need the **Visual Studio extension development** and **.NET desktop environment** workloads. Visual Studio should prompt to install these the first time you open one of the extension solutions.

## License

Expand Down

0 comments on commit 7d6973e

Please sign in to comment.