Skip to content

Commit 78267c9

Browse files
committed
Merge branch 'develop' into release
2 parents fe0e3cd + a73fa81 commit 78267c9

32 files changed

Lines changed: 316 additions & 158 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ local.properties
4040
*.suo
4141
*.user
4242
*.sln.docstates
43+
storage.ide
4344

4445
# Build results
4546
[Dd]ebug/

CodeAlignment.Common.WinForms/FormKeyGrabber.cs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,28 @@ void OnKeyDown(object sender, KeyEventArgs e)
5959
}
6060
}
6161

62-
const int KEY_UP = 257,
63-
LEFT_CONTROL = -1071841279,
64-
RIGHT_CONTROL = -1055064063;
62+
const int KEY_UP = 257;
63+
const long LEFT_CONTROL = 3223126017,
64+
RIGHT_CONTROL = 3239903233;
6565

6666
protected override void WndProc(ref Message m)
6767
{
68-
if (m_isChained && m.Msg == KEY_UP
69-
&& (m.LParam.ToInt32() == LEFT_CONTROL || m.LParam.ToInt32() == RIGHT_CONTROL))
68+
if (m_isChained && m.Msg == KEY_UP)
7069
{
71-
Close();
70+
long value = m.LParam.ToInt64();
71+
if (value < 0)
72+
value = ToUnsigned(value);
73+
74+
if (value == LEFT_CONTROL || value == RIGHT_CONTROL)
75+
Close();
7276
}
7377

7478
base.WndProc(ref m);
7579
}
7680

77-
public void Display()
78-
{
79-
ShowDialog();
80-
}
81+
long ToUnsigned(long intValue) => intValue & 0xffffffffL;
82+
83+
public void Display() => ShowDialog();
8184

8285
public void SetBounds(Rectangle bounds)
8386
{

CodeAlignment.Common.WinForms/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
//
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
34-
[assembly: AssemblyVersion ("13.0.0.*")]
35-
[assembly: AssemblyFileVersion("13.0.0.0")]
34+
[assembly: AssemblyVersion ("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

CodeAlignment.Common/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
//
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
34-
[assembly: AssemblyVersion ("13.0.0.*")]
35-
[assembly: AssemblyFileVersion("13.0.0.0")]
34+
[assembly: AssemblyVersion ("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

CodeAlignment.Npp/CodeAlignment.Npp.csproj

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,6 @@
1111
<AssemblyName>CodeAlignmentNpp</AssemblyName>
1212
<OutputPath>bin\Debug\</OutputPath>
1313
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14-
<FileUpgradeFlags>
15-
</FileUpgradeFlags>
16-
<OldToolsVersion>3.5</OldToolsVersion>
17-
<UpgradeBackupLocation />
18-
<PublishUrl>publish\</PublishUrl>
19-
<Install>true</Install>
20-
<InstallFrom>Disk</InstallFrom>
21-
<UpdateEnabled>false</UpdateEnabled>
22-
<UpdateMode>Foreground</UpdateMode>
23-
<UpdateInterval>7</UpdateInterval>
24-
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
25-
<UpdatePeriodically>false</UpdatePeriodically>
26-
<UpdateRequired>false</UpdateRequired>
2714
<MapFileExtensions>true</MapFileExtensions>
2815
<ApplicationRevision>0</ApplicationRevision>
2916
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
@@ -32,7 +19,7 @@
3219
<BootstrapperEnabled>true</BootstrapperEnabled>
3320
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
3421
</PropertyGroup>
35-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
3623
<DebugSymbols>true</DebugSymbols>
3724
<DefineConstants>DEBUG;TRACE</DefineConstants>
3825
<DebugType>full</DebugType>
@@ -42,13 +29,13 @@
4229
<PlatformTarget>x86</PlatformTarget>
4330
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
4431
</PropertyGroup>
45-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
32+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
4633
<StartAction>Program</StartAction>
4734
<StartArguments>
4835
</StartArguments>
4936
<StartProgram>C:\Program Files (x86)\Notepad++\notepad++.exe</StartProgram>
5037
</PropertyGroup>
51-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
38+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
5239
<DefineConstants>TRACE</DefineConstants>
5340
<Optimize>true</Optimize>
5441
<OutputPath>bin\Release</OutputPath>
@@ -63,13 +50,28 @@
6350
<PropertyGroup>
6451
<AssemblyOriginatorKeyFile>..\CodeAlignment.snk</AssemblyOriginatorKeyFile>
6552
</PropertyGroup>
53+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
54+
<DebugSymbols>true</DebugSymbols>
55+
<OutputPath>bin\x64\Debug\</OutputPath>
56+
<DefineConstants>DEBUG;TRACE</DefineConstants>
57+
<DebugType>full</DebugType>
58+
<PlatformTarget>x64</PlatformTarget>
59+
<ErrorReport>prompt</ErrorReport>
60+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
61+
</PropertyGroup>
62+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
63+
<OutputPath>bin\x64\Release\</OutputPath>
64+
<DefineConstants>TRACE</DefineConstants>
65+
<Optimize>true</Optimize>
66+
<DebugType>pdbonly</DebugType>
67+
<PlatformTarget>x64</PlatformTarget>
68+
<ErrorReport>prompt</ErrorReport>
69+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
70+
</PropertyGroup>
6671
<ItemGroup>
67-
<Reference Include="Microsoft.VisualBasic" />
6872
<Reference Include="System" />
69-
<Reference Include="System.Data" />
7073
<Reference Include="System.Drawing" />
7174
<Reference Include="System.Windows.Forms" />
72-
<Reference Include="System.Xml" />
7375
</ItemGroup>
7476
<ItemGroup>
7577
<Compile Include="Implementations\Edit.cs" />
@@ -94,23 +96,6 @@
9496
<SubType>Designer</SubType>
9597
</EmbeddedResource>
9698
</ItemGroup>
97-
<ItemGroup>
98-
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
99-
<Visible>False</Visible>
100-
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
101-
<Install>false</Install>
102-
</BootstrapperPackage>
103-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
104-
<Visible>False</Visible>
105-
<ProductName>.NET Framework 3.5 SP1</ProductName>
106-
<Install>true</Install>
107-
</BootstrapperPackage>
108-
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
109-
<Visible>False</Visible>
110-
<ProductName>Windows Installer 3.1</ProductName>
111-
<Install>true</Install>
112-
</BootstrapperPackage>
113-
</ItemGroup>
11499
<ItemGroup>
115100
<None Include="..\..\..\CMcG.snk">
116101
<Link>Properties\CMcG.snk</Link>
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
// NPP plugin platform for .Net v0.93.96 by Kasper B. Graversen etc.
2+
using System;
23
using System.Runtime.InteropServices;
34

45
namespace NppPlugin.DllExport
@@ -9,26 +10,20 @@ partial class DllExportAttribute : Attribute
910
public DllExportAttribute()
1011
{
1112
}
13+
1214
public DllExportAttribute(string exportName)
1315
: this(exportName, CallingConvention.StdCall)
1416
{
1517
}
18+
1619
public DllExportAttribute(string exportName, CallingConvention callingConvention)
1720
{
1821
ExportName = exportName;
1922
CallingConvention = callingConvention;
2023
}
21-
CallingConvention _callingConvention;
22-
public CallingConvention CallingConvention
23-
{
24-
get { return _callingConvention; }
25-
set { _callingConvention = value; }
26-
}
27-
string _exportName;
28-
public string ExportName
29-
{
30-
get { return _exportName; }
31-
set { _exportName = value; }
32-
}
24+
25+
public CallingConvention CallingConvention { get; set; }
26+
27+
public string ExportName { get; set; }
3328
}
3429
}

CodeAlignment.Npp/NppPluginNETHelper.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ public void Add(FuncItem funcItem)
7474
RtlMoveMemory(newPointer, _nativePointer, oldSize);
7575
Marshal.FreeHGlobal(_nativePointer);
7676
}
77-
IntPtr ptrPosNewItem = (IntPtr)((int)newPointer + oldSize);
77+
IntPtr ptrPosNewItem = (IntPtr)(newPointer.ToInt64() + oldSize);
7878
byte[] aB = Encoding.Unicode.GetBytes(funcItem._itemName + "\0");
7979
Marshal.Copy(aB, 0, ptrPosNewItem, aB.Length);
80-
ptrPosNewItem = (IntPtr)((int)ptrPosNewItem + 128);
80+
ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 128);
8181
IntPtr p = (funcItem._pFunc != null) ? Marshal.GetFunctionPointerForDelegate(funcItem._pFunc) : IntPtr.Zero;
8282
Marshal.WriteIntPtr(ptrPosNewItem, p);
83-
ptrPosNewItem = (IntPtr)((int)ptrPosNewItem + IntPtr.Size);
83+
ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + IntPtr.Size);
8484
Marshal.WriteInt32(ptrPosNewItem, funcItem._cmdID);
85-
ptrPosNewItem = (IntPtr)((int)ptrPosNewItem + 4);
85+
ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 4);
8686
Marshal.WriteInt32(ptrPosNewItem, Convert.ToInt32(funcItem._init2Check));
87-
ptrPosNewItem = (IntPtr)((int)ptrPosNewItem + 4);
87+
ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 4);
8888
if (funcItem._pShKey._key != 0)
8989
{
9090
IntPtr newShortCutKey = Marshal.AllocHGlobal(4);
@@ -103,15 +103,15 @@ public void RefreshItems()
103103
{
104104
FuncItem updatedItem = new FuncItem();
105105
updatedItem._itemName = _funcItems[i]._itemName;
106-
ptrPosItem = (IntPtr)((int)ptrPosItem + 128);
106+
ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 128);
107107
updatedItem._pFunc = _funcItems[i]._pFunc;
108-
ptrPosItem = (IntPtr)((int)ptrPosItem + IntPtr.Size);
108+
ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + IntPtr.Size);
109109
updatedItem._cmdID = Marshal.ReadInt32(ptrPosItem);
110-
ptrPosItem = (IntPtr)((int)ptrPosItem + 4);
110+
ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 4);
111111
updatedItem._init2Check = _funcItems[i]._init2Check;
112-
ptrPosItem = (IntPtr)((int)ptrPosItem + 4);
112+
ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 4);
113113
updatedItem._pShKey = _funcItems[i]._pShKey;
114-
ptrPosItem = (IntPtr)((int)ptrPosItem + IntPtr.Size);
114+
ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + IntPtr.Size);
115115

116116
_funcItems[i] = updatedItem;
117117
}
@@ -1082,7 +1082,7 @@ public struct Sci_NotifyHeader
10821082
* hwndFrom is really an environment specific window handle or pointer
10831083
* but most clients of Scintilla.h do not have this type visible. */
10841084
public IntPtr hwndFrom;
1085-
public uint idFrom;
1085+
public IntPtr idFrom;
10861086
public uint code;
10871087
}
10881088

@@ -1098,8 +1098,8 @@ public struct SCNotification
10981098
public int length; /* SCN_MODIFIED */
10991099
public int linesAdded; /* SCN_MODIFIED */
11001100
public int message; /* SCN_MACRORECORD */
1101-
public uint wParam; /* SCN_MACRORECORD */
1102-
public int lParam; /* SCN_MACRORECORD */
1101+
public IntPtr wParam; /* SCN_MACRORECORD */
1102+
public IntPtr lParam; /* SCN_MACRORECORD */
11031103
public int line; /* SCN_MODIFIED */
11041104
public int foldLevelNow; /* SCN_MODIFIED */
11051105
public int foldLevelPrev; /* SCN_MODIFIED */

CodeAlignment.Npp/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
2323
[assembly: Guid("31492674-6fe0-485c-91f0-2e17244588ff")]
2424

25-
[assembly: AssemblyVersion ("13.0.0.*")]
26-
[assembly: AssemblyFileVersion("13.0.0.0")]
25+
[assembly: AssemblyVersion ("1.0.0.0")]
26+
[assembly: AssemblyFileVersion("1.0.0.0")]

CodeAlignment.VisualStudio/CodeAlignment.VisualStudio.csproj

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,25 @@
4444
<WarningLevel>4</WarningLevel>
4545
<RunCodeAnalysis>true</RunCodeAnalysis>
4646
<Prefer32Bit>false</Prefer32Bit>
47+
<DeployExtension>False</DeployExtension>
4748
</PropertyGroup>
4849
<ItemGroup>
4950
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
5051
<EmbedInteropTypes>True</EmbedInteropTypes>
5152
<Private>True</Private>
5253
<HintPath>..\packages\VSSDK.DTE.7.0.4\lib\net20\envdte.dll</HintPath>
5354
</Reference>
54-
<Reference Include="Microsoft.VisualStudio.CoreUtility, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
55-
<HintPath>..\packages\VSSDK.CoreUtility.11.0.4\lib\net45\Microsoft.VisualStudio.CoreUtility.dll</HintPath>
56-
<Private>False</Private>
55+
<Reference Include="Microsoft.VisualStudio.CoreUtility, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
56+
<HintPath>..\packages\VSSDK.CoreUtility.12.0.4\lib\net45\Microsoft.VisualStudio.CoreUtility.dll</HintPath>
57+
<Private>True</Private>
5758
</Reference>
58-
<Reference Include="Microsoft.VisualStudio.Editor, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
59-
<HintPath>..\packages\VSSDK.Editor.11.0.4\lib\net45\Microsoft.VisualStudio.Editor.dll</HintPath>
60-
<Private>False</Private>
59+
<Reference Include="Microsoft.VisualStudio.Editor, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
60+
<HintPath>..\packages\VSSDK.Editor.12.0.4\lib\net45\Microsoft.VisualStudio.Editor.dll</HintPath>
61+
<Private>True</Private>
6162
</Reference>
62-
<Reference Include="Microsoft.VisualStudio.GraphModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
63-
<HintPath>..\packages\VSSDK.GraphModel.11.0.4\lib\net45\Microsoft.VisualStudio.GraphModel.dll</HintPath>
64-
<Private>False</Private>
63+
<Reference Include="Microsoft.VisualStudio.GraphModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
64+
<HintPath>..\packages\VSSDK.GraphModel.12.0.4\lib\net45\Microsoft.VisualStudio.GraphModel.dll</HintPath>
65+
<Private>True</Private>
6566
</Reference>
6667
<Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
6768
<Private>True</Private>
@@ -102,21 +103,21 @@
102103
<Private>True</Private>
103104
<HintPath>..\packages\VSSDK.Shell.Interop.9.9.0.4\lib\net20\Microsoft.VisualStudio.Shell.Interop.9.0.dll</HintPath>
104105
</Reference>
105-
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
106-
<HintPath>..\packages\VSSDK.Text.11.0.4\lib\net45\Microsoft.VisualStudio.Text.Data.dll</HintPath>
107-
<Private>False</Private>
106+
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
107+
<HintPath>..\packages\VSSDK.Text.12.0.4\lib\net45\Microsoft.VisualStudio.Text.Data.dll</HintPath>
108+
<Private>True</Private>
108109
</Reference>
109-
<Reference Include="Microsoft.VisualStudio.Text.Logic, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
110-
<HintPath>..\packages\VSSDK.Text.11.0.4\lib\net45\Microsoft.VisualStudio.Text.Logic.dll</HintPath>
111-
<Private>False</Private>
110+
<Reference Include="Microsoft.VisualStudio.Text.Logic, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
111+
<HintPath>..\packages\VSSDK.Text.12.0.4\lib\net45\Microsoft.VisualStudio.Text.Logic.dll</HintPath>
112+
<Private>True</Private>
112113
</Reference>
113-
<Reference Include="Microsoft.VisualStudio.Text.UI, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
114-
<HintPath>..\packages\VSSDK.Text.11.0.4\lib\net45\Microsoft.VisualStudio.Text.UI.dll</HintPath>
115-
<Private>False</Private>
114+
<Reference Include="Microsoft.VisualStudio.Text.UI, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
115+
<HintPath>..\packages\VSSDK.Text.12.0.4\lib\net45\Microsoft.VisualStudio.Text.UI.dll</HintPath>
116+
<Private>True</Private>
116117
</Reference>
117-
<Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
118-
<HintPath>..\packages\VSSDK.Text.11.0.4\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>
119-
<Private>False</Private>
118+
<Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
119+
<HintPath>..\packages\VSSDK.Text.12.0.4\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>
120+
<Private>True</Private>
120121
</Reference>
121122
<Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
122123
<Private>True</Private>

CodeAlignment.VisualStudio/CodeAlignmentPackage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
namespace CMcG.CodeAlignment
66
{
77
[PackageRegistration(UseManagedResourcesOnly = true)]
8-
[InstalledProductRegistration("#110", "#112", "13.1", IconResourceID = 400)]
8+
[InstalledProductRegistration("#110", "#112", "1.0.0.0", IconResourceID = 400)]
99
[ProvideMenuResource("Menus.ctmenu", 1)]
1010
[Guid(GuidList.PackageGuidStr)]
1111
public sealed class CodeAlignmentPackage : Package
1212
{
1313
}
14-
}
14+
}

0 commit comments

Comments
 (0)