Skip to content

Commit bcca198

Browse files
authored
Merge pull request #129 from rainers/master
Visual D 1.0.1
2 parents 92ec7a2 + 4e084dc commit bcca198

File tree

6 files changed

+64
-26
lines changed

6 files changed

+64
-26
lines changed

CHANGES

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,12 +1268,16 @@ Version history
12681268
* installer:
12691269
- full installer now bundled with dmd 2.092.1 and LDC 1.22.0
12701270

1271-
unreleased version 1.0.1
1271+
2020-08-21 version 1.0.1
12721272
* projects:
12731273
- bugzilla 21024: VS2017/2019 new project: fixed unrelated files listed in New Project Dialog
12741274
- bugzilla 21028: project templates not visible when VS started as standard/restricted user
12751275
* dmdserver:
1276-
- updated to dmd 2.093
1276+
- updated to DMD 2.093.1
12771277
- fixed showing documentation for template functions
1278+
* editor:
1279+
- now extra mouse buttons to navigate backward/forward supported
12781280
* mago debugger expression evaluator:
12791281
- fixed wrong values displayed eventually when switching stack frames
1282+
* installer:
1283+
- full installer now bundled with DMD 2.091.1 and LDC 1.23.0

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define VERSION_MAJOR 1
22
#define VERSION_MINOR 0
33
#define VERSION_REVISION 1
4-
#define VERSION_BETA -beta
5-
#define VERSION_BUILD 1
4+
#define VERSION_BETA
5+
#define VERSION_BUILD 0

nsis/visuald.nsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929

3030
; define DMD source path to include dmd installation
3131
; !define DMD
32-
!define DMD_VERSION "2.093.0"
32+
!define DMD_VERSION "2.093.1"
3333
!define DMD_SRC c:\d\dmd-${DMD_VERSION}
3434

3535
; define LDC to include ldc installation
3636
; !define LDC
37-
!define LDC_VERSION "1.22.0"
37+
!define LDC_VERSION "1.23.0"
3838
!define LDC_SRC c:\d\ldc2-${LDC_VERSION}-windows-multilib
3939

4040
; define VS2019 to include VS2019 support

tools/pipedmd.d

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ string eatArg(string cmd)
6161
while (cmd.length && cmd[0] != '"')
6262
cmd = cmd[1..$];
6363
if (cmd.length)
64-
cmd = cmd[1..$];
64+
cmd = cmd[1..$];
6565
}
6666
else
6767
cmd = cmd[1..$];
6868
}
69-
return cmd;
69+
return cmd;
7070
}
7171

7272
version(pipeLink)
@@ -85,7 +85,7 @@ version(pipeLink)
8585
int exitCode = runProcess(cmd, null, true, true, false, true, false);
8686
return exitCode;
8787
}
88-
88+
8989
}
9090
else
9191
int main(string[] argv)
@@ -313,7 +313,7 @@ int runProcess(string command, string depsfile, bool doDemangle, bool demangleAl
313313

314314
if(!bSuccess)
315315
{
316-
printf("failed launching %s\n", szCommand);
316+
printf("failed launching %ls\n", szCommand);
317317
return 1;
318318
}
319319

@@ -514,11 +514,11 @@ void processLine(ubyte[] output, ref size_t writepos, bool optlink, int cp)
514514
writepos = q;
515515
fwrite("\"".ptr, 1, 1, stdout);
516516
fwrite(symbolName.ptr, symbolName.length, 1, stdout);
517-
fwrite("\" (".ptr, 3, 1, stdout);
517+
fwrite("\" (".ptr, 3, 1, stdout);
518518
if(p > writepos)
519519
fwrite(output.ptr + writepos, p - writepos, 1, stdout);
520520
writepos = p;
521-
fwrite(")".ptr, 1, 1, stdout);
521+
fwrite(")".ptr, 1, 1, stdout);
522522
}
523523
else
524524
{
@@ -531,7 +531,7 @@ void processLine(ubyte[] output, ref size_t writepos, bool optlink, int cp)
531531
writepos = p;
532532
fwrite(" (".ptr, 2, 1, stdout);
533533
fwrite(symbolName.ptr, symbolName.length, 1, stdout);
534-
fwrite(")".ptr, 1, 1, stdout);
534+
fwrite(")".ptr, 1, 1, stdout);
535535
}
536536
}
537537
}
@@ -609,7 +609,7 @@ string findTracker(bool x64, ref string trackerArgs)
609609
if (!exe.empty && isExe64bit(exe) != x64)
610610
exe = null;
611611
if (exe.indexOf("14.0") >= 0)
612-
trackerArgs = x64 ? " /d FileTracker64.dll" : " /d FileTracker32.dll";
612+
trackerArgs = x64 ? " /d FileTracker64.dll" : " /d FileTracker32.dll";
613613

614614
if (exe.empty)
615615
exe = findTrackerInVS2017();
@@ -646,7 +646,7 @@ string findTrackerInMSBuild(const(wchar)* keyname, bool x64, string* trackerArgs
646646
string path = readRegistry(keyname, "MSBuildToolsPath"w.ptr, x64);
647647
string exe = trackerPath(path, x64);
648648
if (exe && trackerArgs)
649-
*trackerArgs = x64 ? " /d FileTracker64.dll" : " /d FileTracker32.dll";
649+
*trackerArgs = x64 ? " /d FileTracker64.dll" : " /d FileTracker32.dll";
650650
return exe;
651651
}
652652

@@ -659,7 +659,7 @@ string findTrackerInVS2017()
659659
string exe = dir ~ r"MSBuild\15.0\Bin\Tracker.exe";
660660
if (!std.file.exists(exe))
661661
return null;
662-
// can handle both x86 and x64
662+
// can handle both x86 and x64
663663
return exe;
664664
}
665665

vdextensions/gotodef.cs

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ internal sealed class GoToDefMouseHandlerProvider : IMouseProcessorProvider
180180
public IMouseProcessor GetAssociatedProcessor(IWpfTextView view)
181181
{
182182
var buffer = view.TextBuffer;
183+
IVsUIShell vsUIShell = GetVsUIShell();
183184

184185
IOleCommandTarget shellCommandDispatcher = GetShellCommandDispatcher(view);
185186

@@ -196,6 +197,7 @@ public IMouseProcessor GetAssociatedProcessor(IWpfTextView view)
196197

197198
return new GoToDefMouseHandler(view,
198199
shellCommandDispatcher,
200+
vsUIShell,
199201
_aggregatorFactory.GetClassifier(buffer),
200202
_navigatorService.GetTextStructureNavigator(buffer),
201203
CtrlKeyState.GetStateForView(view));
@@ -211,26 +213,36 @@ private IOleCommandTarget GetShellCommandDispatcher(ITextView view)
211213
return _globalServiceProvider.GetService(typeof(SUIHostCommandDispatcher)) as IOleCommandTarget;
212214
}
213215

216+
/// <summary>
217+
/// Get the SVsUIShell from the global service provider.
218+
/// </summary>
219+
private IVsUIShell GetVsUIShell()
220+
{
221+
return _globalServiceProvider.GetService(typeof(SVsUIShell)) as IVsUIShell;
222+
}
223+
214224
#endregion
215225
}
216226

217-
/// <summary>
218-
/// Handle ctrl+click on valid elements to send GoToDefinition to the shell. Also handle mouse moves
219-
/// (when control is pressed) to highlight references for which GoToDefinition will (likely) be valid.
220-
/// </summary>
221-
internal sealed class GoToDefMouseHandler : MouseProcessorBase
227+
/// <summary>
228+
/// Handle ctrl+click on valid elements to send GoToDefinition to the shell. Also handle mouse moves
229+
/// (when control is pressed) to highlight references for which GoToDefinition will (likely) be valid.
230+
/// </summary>
231+
internal sealed class GoToDefMouseHandler : MouseProcessorBase
222232
{
223233
private IWpfTextView _view;
224234
private CtrlKeyState _state;
225235
private IClassifier _aggregator;
226236
private ITextStructureNavigator _navigator;
227237
private IOleCommandTarget _commandTarget;
238+
private IVsUIShell _vsUIShell;
228239

229-
public GoToDefMouseHandler(IWpfTextView view, IOleCommandTarget commandTarget,
240+
public GoToDefMouseHandler(IWpfTextView view, IOleCommandTarget commandTarget, IVsUIShell vsUIShell,
230241
IClassifier aggregator, ITextStructureNavigator navigator, CtrlKeyState state)
231242
{
232243
_view = view;
233244
_commandTarget = commandTarget;
245+
_vsUIShell = vsUIShell;
234246
_state = state;
235247
_aggregator = aggregator;
236248
_navigator = navigator;
@@ -315,12 +327,34 @@ public override void PreprocessMouseUp(MouseButtonEventArgs e)
315327
_mouseDownAnchorPoint = null;
316328
}
317329

330+
// Support backward/forward navigation via extended mouse buttons.
331+
// Derived from https://github.com/tunnelvisionlabs/MouseNavigation/blob/master/Tvl.VisualStudio.MouseNavigation/MouseNavigationProcessor.cs.
332+
public override void PostprocessMouseUp(MouseButtonEventArgs e)
333+
{
334+
if (_vsUIShell == null)
335+
return;
336+
337+
uint cmdId;
338+
if (e.ChangedButton == MouseButton.XButton1)
339+
cmdId = (uint) VSConstants.VSStd97CmdID.ShellNavBackward;
340+
else if (e.ChangedButton == MouseButton.XButton2)
341+
cmdId = (uint) VSConstants.VSStd97CmdID.ShellNavForward;
342+
else
343+
return;
344+
345+
object obj = null;
346+
_vsUIShell.PostExecCommand(VSConstants.GUID_VSStandardCommandSet97, cmdId,
347+
(uint) OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref obj);
348+
349+
e.Handled = true;
350+
}
351+
318352

319-
#endregion
353+
#endregion
320354

321-
#region Private helpers
355+
#region Private helpers
322356

323-
private Point RelativeToView(Point position)
357+
private Point RelativeToView(Point position)
324358
{
325359
return new Point(position.X + _view.ViewportLeft, position.Y + _view.ViewportTop);
326360
}

0 commit comments

Comments
 (0)