Skip to content

Commit aed311d

Browse files
committed
v0.1.6 to fix multiple file extensions in VS2015 (see #5)
1 parent f12bed0 commit aed311d

File tree

8 files changed

+181
-8
lines changed

8 files changed

+181
-8
lines changed

GcodeClassifierProvider.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,33 @@ internal sealed class GcodeClassifierProvider : ITaggerProvider
5555
internal static ContentTypeDefinition GcodeContentType = null;
5656

5757
[Export]
58-
[FileExtension(".gcode;.nc;.mpt;.mpf")] // semi-colon delimited file extensions
58+
[FileExtension(".gcode")] // semi-colon delimited file extensions work only in VS2017/2019 - so we create multiple FileExtensionToContentTypeDefinition
5959
[ContentType("Gcode")]
6060
[BaseDefinition("code")]
6161
[BaseDefinition("projection")]
6262
internal static FileExtensionToContentTypeDefinition GcodeFileType = null;
6363

64+
[Export]
65+
[FileExtension(".mpf")] // semi-colon delimited file extensions work only in VS2017/2019 - so we create multiple FileExtensionToContentTypeDefinition
66+
[ContentType("Gcode")]
67+
[BaseDefinition("code")]
68+
[BaseDefinition("projection")]
69+
internal static FileExtensionToContentTypeDefinition GcodeFileTypeMPF = null;
70+
71+
[Export]
72+
[FileExtension(".mpt")] // semi-colon delimited file extensions work only in VS2017/2019 - so we create multiple FileExtensionToContentTypeDefinition
73+
[ContentType("Gcode")]
74+
[BaseDefinition("code")]
75+
[BaseDefinition("projection")]
76+
internal static FileExtensionToContentTypeDefinition GcodeFileTypeMPT = null;
77+
78+
[Export]
79+
[FileExtension(".nc")] // semi-colon delimited file extensions work only in VS2017/2019 - so we create multiple FileExtensionToContentTypeDefinition
80+
[ContentType("Gcode")]
81+
[BaseDefinition("code")]
82+
[BaseDefinition("projection")]
83+
internal static FileExtensionToContentTypeDefinition GcodeFileTypeNC = null;
84+
6485
[Import]
6586
internal IClassificationTypeRegistryService ClassificationTypeRegistry = null;
6687

GcodeLanguageExtension.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@
173173
<HintPath>packages\Microsoft.VisualStudio.Threading.14.1.111\lib\net45\Microsoft.VisualStudio.Threading.dll</HintPath>
174174
<Private>True</Private>
175175
</Reference>
176-
<Reference Include="Microsoft.VisualStudio.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
177-
<HintPath>packages\Microsoft.VisualStudio.Utilities.14.3.25407\lib\net45\Microsoft.VisualStudio.Utilities.dll</HintPath>
178-
<Private>True</Private>
179-
</Reference>
180176
<Reference Include="Microsoft.VisualStudio.Validation, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
181177
<HintPath>packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll</HintPath>
182178
<Private>True</Private>

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// You can specify all the values or you can default the Build and Revision Numbers
3030
// by using the '*' as shown below:
3131
// [assembly: AssemblyVersion("1.0.*")]
32-
[assembly: AssemblyVersion("0.1.5.1")]
33-
[assembly: AssemblyFileVersion("0.1.5.1")]
32+
[assembly: AssemblyVersion("0.1.6.0")]
33+
[assembly: AssemblyFileVersion("0.1.6.0")]
3434
[assembly: Guid("63CEA96E-E88D-4966-ACAA-BF97CDDC31E4")]
3535

source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<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">
33
<Metadata>
4-
<Identity Id="GcodeLanguage Extension.63CEA96E-E88D-4966-ACAA-BF97CDDC31E4" Version="0.1.5.1" Language="en-US" Publisher="gojimmypi" />
4+
<Identity Id="GcodeLanguage Extension.63CEA96E-E88D-4966-ACAA-BF97CDDC31E4" Version="0.1.6.0" Language="en-US" Publisher="gojimmypi" />
55
<DisplayName>Gcode Language Extension</DisplayName>
66
<Description xml:space="preserve">G-Code highlighting extension to the Visual Studio Editor. </Description>
77
<MoreInfo>https://github.com/gojimmypi/GcodeLanguageExtension</MoreInfo>

testfiles/mpf_fileU.MPF

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
%
2+
O0000
3+
N10 (MACH3 MILL - )
4+
N20 (AUTHOR - {SCOTT SHAFER}) G0 ( second comment )
5+
N30 (GROUP - TOOLPATH GROUP #1)
6+
N40 (SYSTEM- ONECNC-XR2 MILL ADVANTAGE - VERSION 8.12)
7+
N50 (NOTES - NONE)
8+
N60 G0 G40 G49 G50 G80 G94
9+
N70 (.1875 INCH 3/16 HSS END MILL ) ( )
10+
N80 T4 M06 G43 H4
11+
N90 S3411.0 F25.0 M3 M07
12+
N100 G4 P3
13+
N110 G00 X14.9375 Y1.4106 Z0.1
14+
N120 Z0.05
15+
N130 G01 X14.9358 Y1.3786 Z0.0466 F25.0
16+
N140 X14.9376 Y1.3149 Z0.0399
17+
N150 X14.9445 Y1.2515 Z0.0332
18+
N160 X14.9564 Y1.1889 Z0.0265
19+
N170 X14.9734 Y1.1275 Z0.0198
20+
N180 X15.0049 Y1.0575 Z0.0118
21+
N190 X15.0484 Y0.9943 Z0.0037
22+
N200 X15.1023 Y0.9398 Z-0.0044
23+
N210 X15.1652 Y0.8957 Z-0.0124
24+
N220 X15.2348 Y0.8636 Z-0.0205
25+
N230 X15.309 Y0.8443 Z-0.0285

testfiles/mpt_fileU.MPT

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
%
2+
O0000
3+
N10 (MACH3 MILL - )
4+
N20 (AUTHOR - {SCOTT SHAFER}) G0 ( second comment )
5+
N30 (GROUP - TOOLPATH GROUP #1)
6+
N40 (SYSTEM- ONECNC-XR2 MILL ADVANTAGE - VERSION 8.12)
7+
N50 (NOTES - NONE)
8+
N60 G0 G40 G49 G50 G80 G94
9+
N70 (.1875 INCH 3/16 HSS END MILL ) ( )
10+
N80 T4 M06 G43 H4
11+
N90 S3411.0 F25.0 M3 M07
12+
N100 G4 P3
13+
N110 G00 X14.9375 Y1.4106 Z0.1
14+
N120 Z0.05
15+
N130 G01 X14.9358 Y1.3786 Z0.0466 F25.0
16+
N140 X14.9376 Y1.3149 Z0.0399
17+
N150 X14.9445 Y1.2515 Z0.0332
18+
N160 X14.9564 Y1.1889 Z0.0265
19+
N170 X14.9734 Y1.1275 Z0.0198
20+
N180 X15.0049 Y1.0575 Z0.0118
21+
N190 X15.0484 Y0.9943 Z0.0037
22+
N200 X15.1023 Y0.9398 Z-0.0044
23+
N210 X15.1652 Y0.8957 Z-0.0124
24+
N220 X15.2348 Y0.8636 Z-0.0205
25+
N230 X15.309 Y0.8443 Z-0.0285

testfiles/nc_fileU.NC

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
%
2+
O0000
3+
N10 (MACH3 MILL - )
4+
N20 (AUTHOR - {SCOTT SHAFER}) G0 ( second comment )
5+
N30 (GROUP - TOOLPATH GROUP #1)
6+
N40 (SYSTEM- ONECNC-XR2 MILL ADVANTAGE - VERSION 8.12)
7+
N50 (NOTES - NONE)
8+
N60 G0 G40 G49 G50 G80 G94
9+
N70 (.1875 INCH 3/16 HSS END MILL ) ( )
10+
N80 T4 M06 G43 H4
11+
N90 S3411.0 F25.0 M3 M07
12+
N100 G4 P3
13+
N110 G00 X14.9375 Y1.4106 Z0.1
14+
N120 Z0.05
15+
N130 G01 X14.9358 Y1.3786 Z0.0466 F25.0
16+
N140 X14.9376 Y1.3149 Z0.0399
17+
N150 X14.9445 Y1.2515 Z0.0332
18+
N160 X14.9564 Y1.1889 Z0.0265
19+
N170 X14.9734 Y1.1275 Z0.0198
20+
N180 X15.0049 Y1.0575 Z0.0118
21+
N190 X15.0484 Y0.9943 Z0.0037
22+
N200 X15.1023 Y0.9398 Z-0.0044
23+
N210 X15.1652 Y0.8957 Z-0.0124
24+
N220 X15.2348 Y0.8636 Z-0.0205
25+
N230 X15.309 Y0.8443 Z-0.0285

testfiles/testfileU.GCODE

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
%
2+
O0000
3+
N10 (MACH3 MILL - )
4+
N20 (AUTHOR - {SCOTT SHAFER}) G0 ( second comment )
5+
N30 (GROUP - TOOLPATH GROUP #1)
6+
N40 (SYSTEM- ONECNC-XR2 MILL ADVANTAGE - VERSION 8.12)
7+
N50 (NOTES - NONE)
8+
N60 G0 G40 G49 G50 G80 G94
9+
N70 (.1875 INCH 3/16 HSS END MILL ) ( )
10+
N80 T4 M06 G43 H4
11+
N90 S3411.0 F25.0 M3 M07
12+
N100 G4 P3
13+
N110 G00 X14.9375 Y1.4106 Z0.1
14+
N120 Z0.05
15+
N130 G01 X14.9358 Y1.3786 Z0.0466 F25.0
16+
N140 X14.9376 Y1.3149 Z0.0399
17+
N150 X14.9445 Y1.2515 Z0.0332
18+
N160 X14.9564 Y1.1889 Z0.0265
19+
N170 X14.9734 Y1.1275 Z0.0198
20+
N180 X15.0049 Y1.0575 Z0.0118
21+
N190 X15.0484 Y0.9943 Z0.0037
22+
N200 X15.1023 Y0.9398 Z-0.0044
23+
N210 X15.1652 Y0.8957 Z-0.0124
24+
N220 X15.2348 Y0.8636 Z-0.0205
25+
N230 X15.309 Y0.8443 Z-0.0285
26+
27+
X12 G1.1 (c)G1 G1 (C) G1
28+
G01 this is text () G01 ; this is a comment
29+
G34 x12 Y12 Z12
30+
M12
31+
N12 X12 () test ;7684
32+
12
33+
23
34+
A21X21 d; as asd s
35+
36+
G10 this is txt(but this is a comment!)G1 X12 G1 () G1
37+
A12 x1
38+
B12
39+
o12 goto 20
40+
G10
41+
o13
42+
not a commentgwerwerqwerv werqwr wqeo gwerq
43+
44+
(material acrzlic 50x50x3 mm)
45+
(zero point -> plate center, material surface)
46+
(tool -> 1.6 mm end mill)
47+
48+
g21 (Millimeter)
49+
g61 (path mode)
50+
g0 z5
51+
g0 x10 y-10
52+
m6 t55 (loading tool no. 55)
53+
m3 s14000 (spindle ON, 14000 rpm)
54+
g0 z0.5
55+
g1 z-1 f30
56+
g1 x0 y10 f80
57+
g1 x-10 y-10
58+
g1 x10
59+
g0 z5
60+
g0 x18 y-18
61+
g0 z0.5
62+
g1 z-1.1 f30
63+
g1 y18 f80
64+
g1 x-18
65+
g1 y-18
66+
g1 x18
67+
g1 z-2.2 f30
68+
g1 y18 f80
69+
g1 x-18
70+
g1 y-18
71+
g1 x18
72+
g1 z-3.3 f30
73+
g1 y18 f80
74+
g1 x-18
75+
g1 y-18
76+
g1 x18
77+
g0 z5
78+
m5
79+
g0 x0 y0
80+
m02 (end of program)
81+

0 commit comments

Comments
 (0)