Skip to content

Commit

Permalink
ver 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Stupar authored and Stupar committed Feb 7, 2022
1 parent 5384d58 commit 95ea6e5
Show file tree
Hide file tree
Showing 42 changed files with 5,742 additions and 1,409 deletions.
2 changes: 1 addition & 1 deletion source/2019/source.extension.vsixmanifest
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="VisualStudioCppExtensions.Company.5fdbeaec-89c7-4773-997c-f46757c67a2f" Version="1.5" Language="en-US" Publisher="Stephane Molina" />
<Identity Id="VisualStudioCppExtensions.Company.5fdbeaec-89c7-4773-997c-f46757c67a2f" Version="1.6" Language="en-US" Publisher="Stephane Molina" />
<DisplayName>Generate C++ Filters</DisplayName>
<Description xml:space="preserve">Simple Extension which provide the ability to generate C++ project filters to replicate the folder hierarchy of underlying sources</Description>
<License>resources\license</License>
Expand Down
5 changes: 3 additions & 2 deletions source/2022/2022.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</UpgradeBackupLocation>
<OldToolsVersion>15.0</OldToolsVersion>
<TargetFrameworkProfile />
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
Expand Down Expand Up @@ -82,10 +83,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.SDK">
<Version>17.0.31902.203</Version>
<Version>17.0.32112.339</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.VCProjectEngine">
<Version>17.0.31902.203</Version>
<Version>17.0.32112.339</Version>
</PackageReference>
<PackageReference Include="Microsoft.VSSDK.BuildTools">
<Version>17.1.1029-preview2</Version>
Expand Down
2 changes: 1 addition & 1 deletion source/2022/source.extension.vsixmanifest
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="VisualStudioCppExtensions.Company.5fdbeaec-89c7-4773-997c-f46757c67a2e" Version="1.5" Language="en-US" Publisher="Stephane Molina" />
<Identity Id="VisualStudioCppExtensions.Company.5fdbeaec-89c7-4773-997c-f46757c67a2e" Version="1.6" Language="en-US" Publisher="Stephane Molina" />
<DisplayName>Generate C++ Filters</DisplayName>
<Description xml:space="preserve">Simple Extension which provide the ability to generate C++ project filters to replicate the folder hierarchy of underlying sources</Description>
<License>resources\license</License>
Expand Down
66 changes: 52 additions & 14 deletions source/shared/packageXml.vsct
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>


<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>

<Commands package="guidGenerateFilterPackage">
<Commands package="packageGuid">
<!--sdfdsf -->

<Groups>
<Group guid="guidGenerateFilterPackageCmdSet" id="grpIdProjectContextAdd" priority="0x0102">
<Group guid="groupGuid" id="groupId" priority="0x0102">
<!-- Can check what the other existing id/priority (for positioning) are by looking at SharedCmdPlace.vsct, need to modify the group priority while targetting the right id -->
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE" />

Expand All @@ -14,36 +18,70 @@
</Group>
</Groups>



<Buttons>
<Button guid="guidGenerateFilterPackageCmdSet" id="GenerateFilterCommand" type="Button" priority="0x0100">
<Parent guid="guidGenerateFilterPackageCmdSet" id="grpIdProjectContextAdd" />
<Icon guid="GenerateFilterIcon" id="GenerateFilterIconID" />
<Button guid="groupGuid" id="buttonId" type="Button" priority="0x0100">
<Parent guid="groupGuid" id="groupId" />
<Icon guid="iconGuid" id="iconId" />

<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>

<Strings>
<ButtonText>Generate C++ Project Filters</ButtonText>
<ButtonText>sync folder -&gt; filter</ButtonText>
</Strings>
</Button>

<Button guid="groupGuid" id="button2Id" type="Button" priority="0x0100">
<Parent guid="groupGuid" id="groupId" />
<Icon guid="iconGuid" id="iconId" />

<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>

<Strings>
<ButtonText>sync filter -&gt; folder</ButtonText>
</Strings>
</Button>
</Buttons>







<Bitmaps>
<Bitmap guid="GenerateFilterIcon" href="Resources\GenerateFilters.ico" usedList="GenerateFilterIconID"/>
<Bitmap guid="iconGuid" href="Resources\GenerateFilters.ico" usedList="iconId"/>
</Bitmaps>


</Commands>








<Symbols>
<GuidSymbol name="guidGenerateFilterPackage" value="{99d03761-6200-41ad-b2a1-638ae9e780e5}" />

<GuidSymbol name="packageGuid" value="{99d03761-6200-41ad-b2a1-638ae9e780e5}" /> <!--extern-->

<GuidSymbol name="guidGenerateFilterPackageCmdSet" value="{acd8036f-19ae-43b2-a2d6-11788cb282fe}">
<IDSymbol name="GenerateFilterCommand" value="0x0100" />
<IDSymbol name="grpIdProjectContextAdd" value="0x1080" />
<IDSymbol name="grpIdSolutionContextAdd" value="0x1081" />
<GuidSymbol name="groupGuid" value="{acd8036f-19ae-43b2-a2d6-11788cb282fe}"> <!--extern-->
<IDSymbol name="buttonId" value="0x0100" /> <!--extern-->
<IDSymbol name="button2Id" value="0x0101" /> <!--extern-->
<IDSymbol name="groupId" value="0x1080" />
<!--IDSymbol name="grpIdSolutionContextAdd" value="0x1081" /-->
</GuidSymbol>

<GuidSymbol name="GenerateFilterIcon" value="{363F9640-FBB7-4403-AB20-9A53EA067ECA}">
<IDSymbol name="GenerateFilterIconID" value="1" />
<GuidSymbol name="iconGuid" value="{363F9640-FBB7-4403-AB20-9A53EA067ECA}">
<IDSymbol name="iconId" value="1" />
</GuidSymbol>

</Symbols>


</CommandTable>
39 changes: 33 additions & 6 deletions source/shared/project/cppFiltersAutoShared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@
<EmbeddedResource Include="$(MSBuildThisFileDirectory)source\gui\advanced.resx">
<DependentUpon>advanced.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)source\gui\error.resx">
<DependentUpon>error.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)source\gui\question.resx">
<DependentUpon>question.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)source\gui\questionFtd.resx">
<DependentUpon>questionFtd.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)resources\generateFiltersPackage.ico" />
Expand All @@ -25,19 +31,40 @@
<Compile Include="$(MSBuildThisFileDirectory)source\gui\advanced.Designer.cs">
<DependentUpon>advanced.cs</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)source\gui\error.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\gui\error.Designer.cs">
<DependentUpon>error.cs</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)source\gui\question.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\gui\question.Designer.cs">
<DependentUpon>question.cs</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)source\gui\questionFtd.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\gui\questionFtd.Designer.cs">
<DependentUpon>questionFtd.cs</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\dirToFilter\file.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\dirToFilter\filters.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\dirToFilter\projectData.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\dirToFilter\work.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\extension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\file.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\filters.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\work.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\test.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\filterToDir\error.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\filterToDir\file.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\filterToDir\filters.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\filterToDir\projectData.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\extension\filterToDir\work.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\dte\project.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\dte\projectItem.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\other.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\vc\file.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\vc\filter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\vc\project.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\test\vc\projectReference.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\unused\project.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\other\unused\xml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\package.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\project\project.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\project\projectData.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\utility\extension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\utility\path.cs" />
<Compile Include="$(MSBuildThisFileDirectory)source\source\utility\project.cs" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions source/shared/project/source/gui/advanced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void formAdvancedFormClosing(object sender, FormClosingEventArgs e)
if (!Directory.Exists(textBoxIn.Text)) throw new Exception("in dir is not valid");
if (!Directory.Exists(textBoxRootDir.Text)) throw new Exception("root dir is not valid");
if (checkBoxRootFilter.Checked)
if (!ProjectData.Root.filterCheck(textBoxRootFilter.Text)) throw new Exception("root filter is not valid");
if (!dirToFilter.ProjectData.Root.filterCheck(textBoxRootFilter.Text)) throw new Exception("root filter is not valid");
}
catch(Exception e2)
{
Expand Down Expand Up @@ -115,10 +115,10 @@ private void buttonOkClick(object sender, EventArgs e)
}


public ProjectData p;
public dirToFilter.ProjectData p;
private void buttonCalculateFiltersDeleteAllClick(object sender, EventArgs e)
{
filters.filtersDeleteAll(p.p2);
dirToFilter.filters.filtersDeleteAll(p.p2);
}


Expand Down
69 changes: 69 additions & 0 deletions source/shared/project/source/gui/error.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions source/shared/project/source/gui/error.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace VisualStudioCppExtensions
{
public partial class formError : Form
{
public formError()
{
InitializeComponent();
}



protected override bool ProcessDialogKey(Keys keyData)
{
if (Form.ModifierKeys != Keys.None || keyData != Keys.Escape) return base.ProcessDialogKey(keyData);
this.Close();
return true;
}
}
}
Loading

0 comments on commit 95ea6e5

Please sign in to comment.