Skip to content

Commit 6f8a864

Browse files
committed
- First version of CR_RemoveQuotesFromString.
0 parents  commit 6f8a864

8 files changed

Lines changed: 339 additions & 0 deletions

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
bin
2+
Bin
3+
obj
4+
Obj
5+
release
6+
Release
7+
*.user
8+
*.suo

CR_RemoveQuotesFromString.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.21005.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CR_RemoveQuotesFromString", "CR_RemoveQuotesFromString\CR_RemoveQuotesFromString.csproj", "{CD2ECF44-755A-413A-9CE7-F67FBDC999BF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{CD2ECF44-755A-413A-9CE7-F67FBDC999BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{CD2ECF44-755A-413A-9CE7-F67FBDC999BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{CD2ECF44-755A-413A-9CE7-F67FBDC999BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{CD2ECF44-755A-413A-9CE7-F67FBDC999BF}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProductVersion>10.0.20506</ProductVersion>
8+
<SchemaVersion>2.0</SchemaVersion>
9+
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
10+
<ProjectGuid>{CD2ECF44-755A-413A-9CE7-F67FBDC999BF}</ProjectGuid>
11+
<OutputType>Library</OutputType>
12+
<AppDesignerFolder>Properties</AppDesignerFolder>
13+
<RootNamespace>CR_RemoveQuotesFromString</RootNamespace>
14+
<AssemblyName>CR_RemoveQuotesFromString</AssemblyName>
15+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
16+
<FileAlignment>512</FileAlignment>
17+
<GeneratePkgDefFile>false</GeneratePkgDefFile>
18+
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
19+
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
20+
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
21+
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
22+
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
23+
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
24+
<FileUpgradeFlags>
25+
</FileUpgradeFlags>
26+
<OldToolsVersion>4.0</OldToolsVersion>
27+
<UpgradeBackupLocation />
28+
<PublishUrl>publish\</PublishUrl>
29+
<Install>true</Install>
30+
<InstallFrom>Disk</InstallFrom>
31+
<UpdateEnabled>false</UpdateEnabled>
32+
<UpdateMode>Foreground</UpdateMode>
33+
<UpdateInterval>7</UpdateInterval>
34+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
35+
<UpdatePeriodically>false</UpdatePeriodically>
36+
<UpdateRequired>false</UpdateRequired>
37+
<MapFileExtensions>true</MapFileExtensions>
38+
<ApplicationRevision>0</ApplicationRevision>
39+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
40+
<IsWebBootstrapper>false</IsWebBootstrapper>
41+
<UseApplicationTrust>false</UseApplicationTrust>
42+
<BootstrapperEnabled>true</BootstrapperEnabled>
43+
</PropertyGroup>
44+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
45+
<DebugSymbols>true</DebugSymbols>
46+
<DebugType>full</DebugType>
47+
<Optimize>false</Optimize>
48+
<OutputPath>..\..\..\..\..\..\..\Documents\DevExpress\IDE Tools\Community\Plugins\</OutputPath>
49+
<DefineConstants>DEBUG;TRACE</DefineConstants>
50+
<ErrorReport>prompt</ErrorReport>
51+
<WarningLevel>4</WarningLevel>
52+
</PropertyGroup>
53+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
54+
<DebugType>pdbonly</DebugType>
55+
<Optimize>true</Optimize>
56+
<OutputPath>bin\Release\</OutputPath>
57+
<DefineConstants>TRACE</DefineConstants>
58+
<ErrorReport>prompt</ErrorReport>
59+
<WarningLevel>4</WarningLevel>
60+
</PropertyGroup>
61+
<ItemGroup>
62+
<Reference Include="System" />
63+
<Reference Include="System.ComponentModel.Composition" />
64+
<Reference Include="System.Core">
65+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
66+
</Reference>
67+
<Reference Include="System.Xml.Linq">
68+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
69+
</Reference>
70+
<Reference Include="System.Data.DataSetExtensions">
71+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
72+
</Reference>
73+
<Reference Include="System.Data" />
74+
<Reference Include="System.Drawing" />
75+
<Reference Include="System.Windows.Forms" />
76+
<Reference Include="System.Xml" />
77+
<Reference Include="EnvDTE" />
78+
<Reference Include="EnvDTE80" />
79+
<Reference Include="DevExpress.CodeRush.Common" />
80+
<Reference Include="DevExpress.CodeRush.Core" />
81+
<Reference Include="DevExpress.CodeRush.PlugInCore" />
82+
<Reference Include="DevExpress.CodeRush.StructuralParser" />
83+
<Reference Include="DevExpress.DXCore.Parser" />
84+
<Reference Include="DevExpress.CodeRush.VSCore" />
85+
</ItemGroup>
86+
<ItemGroup>
87+
<Compile Include="PlugIn1.cs">
88+
<SubType>Component</SubType>
89+
</Compile>
90+
<Compile Include="PlugIn1.Designer.cs">
91+
<DependentUpon>PlugIn1.cs</DependentUpon>
92+
</Compile>
93+
<Compile Include="Properties\AssemblyInfo.cs" />
94+
<Compile Include="PlugIn1VsixExtension.cs" />
95+
</ItemGroup>
96+
<ItemGroup>
97+
<None Include="source.extension.vsixmanifest">
98+
<SubType>Designer</SubType>
99+
</None>
100+
</ItemGroup>
101+
<ItemGroup>
102+
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
103+
<Visible>False</Visible>
104+
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
105+
<Install>true</Install>
106+
</BootstrapperPackage>
107+
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
108+
<Visible>False</Visible>
109+
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
110+
<Install>false</Install>
111+
</BootstrapperPackage>
112+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
113+
<Visible>False</Visible>
114+
<ProductName>.NET Framework 3.5 SP1</ProductName>
115+
<Install>false</Install>
116+
</BootstrapperPackage>
117+
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
118+
<Visible>False</Visible>
119+
<ProductName>Windows Installer 4.5</ProductName>
120+
<Install>true</Install>
121+
</BootstrapperPackage>
122+
</ItemGroup>
123+
<PropertyGroup>
124+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
125+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
126+
</PropertyGroup>
127+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
128+
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
129+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" Condition="false" />
130+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
131+
Other similar extension points exist, see Microsoft.Common.targets.
132+
<Target Name="BeforeBuild">
133+
</Target>
134+
<Target Name="AfterBuild">
135+
</Target>
136+
-->
137+
</Project>

CR_RemoveQuotesFromString/PlugIn1.Designer.cs

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
using System;
2+
using System.ComponentModel;
3+
using System.Collections.Generic;
4+
using System.Drawing;
5+
using System.Linq;
6+
using System.Windows.Forms;
7+
using DevExpress.CodeRush.Core;
8+
using DevExpress.CodeRush.PlugInCore;
9+
using DevExpress.CodeRush.StructuralParser;
10+
11+
namespace CR_RemoveQuotesFromString
12+
{
13+
public partial class PlugIn1 : StandardPlugIn
14+
{
15+
// DXCore-generated code...
16+
#region InitializePlugIn
17+
public override void InitializePlugIn()
18+
{
19+
base.InitializePlugIn();
20+
registerRemoveQuotesFromString();
21+
}
22+
#endregion
23+
#region FinalizePlugIn
24+
public override void FinalizePlugIn()
25+
{
26+
//
27+
// TODO: Add your finalization code here.
28+
//
29+
30+
base.FinalizePlugIn();
31+
}
32+
#endregion
33+
public void registerRemoveQuotesFromString()
34+
{
35+
DevExpress.CodeRush.Core.Action RemoveQuotesFromString = new DevExpress.CodeRush.Core.Action(components);
36+
((System.ComponentModel.ISupportInitialize)(RemoveQuotesFromString)).BeginInit();
37+
RemoveQuotesFromString.ActionName = "RemoveQuotesFromString";
38+
RemoveQuotesFromString.ButtonText = "RemoveQuotesFromString"; // Used if button is placed on a menu.
39+
RemoveQuotesFromString.RegisterInCR = true;
40+
RemoveQuotesFromString.Execute += RemoveQuotesFromString_Execute;
41+
RemoveQuotesFromString.CheckAvailability += RemoveQuotesFromString_CheckAvailability;
42+
((System.ComponentModel.ISupportInitialize)(RemoveQuotesFromString)).EndInit();
43+
}
44+
private void RemoveQuotesFromString_CheckAvailability(CheckActionAvailabilityEventArgs ea)
45+
{
46+
ea.Available = CodeRush.Source.ActiveString != null;
47+
}
48+
private void RemoveQuotesFromString_Execute(ExecuteEventArgs ea)
49+
{
50+
TextString TheString = CodeRush.Source.ActiveString;
51+
var TheRange = TheString.Range;
52+
CodeRush.Documents.ActiveTextDocument.SetText(new SourceRange(TheRange.Start.OffsetPoint(0, -1),TheRange.End.OffsetPoint(0,1)), (string)TheString.PrimitiveExpression.PrimitiveValue);
53+
54+
}
55+
}
56+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System.ComponentModel.Composition;
2+
using DevExpress.CodeRush.Common;
3+
4+
namespace CR_RemoveQuotesFromString
5+
{
6+
[Export(typeof(IVsixPluginExtension))]
7+
public class CR_RemoveQuotesFromStringExtension : IVsixPluginExtension { }
8+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
using DevExpress.CodeRush.Common;
5+
6+
[assembly: DXCoreAssembly(DXCoreAssemblyType.PlugIn, "CR_RemoveQuotesFromString", PlugInLoadType.Demand, LoadAbilityType.LoadEnabled)]
7+
8+
// General Information about an assembly is controlled through the following
9+
// set of attributes. Change these attribute values to modify the information
10+
// associated with an assembly.
11+
[assembly: AssemblyTitle("CR_RemoveQuotesFromString")]
12+
[assembly: AssemblyDescription("")]
13+
[assembly: AssemblyConfiguration("")]
14+
[assembly: AssemblyCompany("")]
15+
[assembly: AssemblyProduct("CR_RemoveQuotesFromString")]
16+
[assembly: AssemblyCopyright("Copyright © 2013")]
17+
[assembly: AssemblyTrademark("")]
18+
[assembly: AssemblyCulture("")]
19+
20+
// Setting ComVisible to false makes the types in this assembly not visible
21+
// to COM components. If you need to access a type in this assembly from
22+
// COM, set the ComVisible attribute to true on that type.
23+
[assembly: ComVisible(false)]
24+
25+
// The following GUID is for the ID of the typelib if this project is exposed to COM
26+
[assembly: Guid("280a8f30-1984-422d-bec5-e67eb3bf41b8")]
27+
28+
// Version information for an assembly consists of the following four values:
29+
//
30+
// Major Version
31+
// Minor Version
32+
// Build Number
33+
// Revision
34+
//
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Vsix xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
3+
<Identifier Id="CR_RemoveQuotesFromString">
4+
<Name>RemoveQuotesFromString for CodeRush </Name>
5+
<Author>Rory Becker</Author>
6+
<Version>1.0</Version>
7+
<Description xml:space="preserve">RemoveQuotesFromString provides a new bindable command which, when triggered, will cause coderush to remove the quotes surrounding a string on which the caret is positioned.</Description>
8+
<Locale>1033</Locale>
9+
<SupportedProducts>
10+
<VisualStudio Version="10.0">
11+
<Edition>Pro</Edition>
12+
</VisualStudio>
13+
<VisualStudio Version="11.0">
14+
<Edition>Pro</Edition>
15+
</VisualStudio>
16+
<VisualStudio Version="12.0">
17+
<Edition>Pro</Edition>
18+
</VisualStudio>
19+
</SupportedProducts>
20+
<SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.0" />
21+
</Identifier>
22+
<References />
23+
<Content>
24+
<MefComponent>|%CurrentProject%|</MefComponent>
25+
</Content>
26+
</Vsix>

0 commit comments

Comments
 (0)