This commit is contained in:
Mikhail Arkhipov 2016-12-20 15:19:48 -08:00
Родитель 10c6655af2
Коммит 3fbcba8081
7 изменённых файлов: 71 добавлений и 31 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -122,3 +122,4 @@ TestFiles/
*.vstman
*.db-wal
*.db-shm
*.ipch

Просмотреть файл

@ -48,7 +48,9 @@ namespace Microsoft.R.ExecutionTracing {
}
internal RExecutionTracer(IRSession session) {
session = session ?? throw new ArgumentNullException(nameof(session));
if (session == null) {
throw new ArgumentNullException(nameof(session));
}
Session = session;
Session.Connected += RSession_Connected;

Просмотреть файл

@ -22,7 +22,9 @@ namespace Microsoft.Languages.Core.Tokens {
private bool _isEndOfStream;
public TokenStream(IReadOnlyTextRangeCollection<T> tokens, T endOfStreamToken) {
tokens = tokens ?? throw new ArgumentNullException(nameof(tokens));
if (tokens == null) {
throw new ArgumentNullException(nameof(tokens));
}
_index = 0;
_tokens = tokens;

Просмотреть файл

@ -67,7 +67,7 @@
</Menu>
<!-- REPL window toolbar -->
<Menu guid="guidRToolsCmdSet" id="replWindowToolBarId" type="ToolWindowToolbar" priority="0x100">
<Menu Condition="Defined(VS15)" guid="guidRToolsCmdSet" id="replWindowToolBarId" type="ToolWindowToolbar" priority="0x100">
<Parent guid="guidRToolsCmdSet" id="0" />
<CommandFlag>DefaultDocked</CommandFlag>
<CommandFlag>NoToolbarClose</CommandFlag>
@ -453,8 +453,19 @@
<Parent guid="guidRToolsCmdSet" id="sessionSubMenu"/>
</Group>
<Group guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" />
<Group guid="guidRToolsCmdSet" id="sessionRDebugGroup" />
<!-- Dev14 groups -->
<Group guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" priority="0x0300" Condition="Defined(VS14)">
<Parent guid="guidRToolsCmdSet" id="sessionSubMenu"/>
</Group>
<Group guid="guidRToolsCmdSet" id="sessionRDebugGroup" priority="0x0310" Condition="Defined(VS14)">
<Parent guid="guidRToolsCmdSet" id="sessionSubMenu"/>
</Group>
<!-- End Dev14 groups -->
<!-- Dev15 groups -->
<Group guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" Condition="Defined(VS15)" />
<Group guid="guidRToolsCmdSet" id="sessionRDebugGroup" Condition="Defined(VS15)" />
<!-- End Dev15 groups -->
<Group guid="guidRToolsCmdSet" id="sessionSubMenuResetGroup" priority="0x0320">
<Parent guid="guidRToolsCmdSet" id="sessionSubMenu"/>
@ -575,14 +586,29 @@
<Group guid="guidRToolsCmdSet" id="historyCopySelectedGroup" priority="0x100">
</Group>
<!-- InteractiveWindow -->
<Group guid="guidRToolsCmdSet" id="replGroup" priority="0x0100" >
<!-- InteractiveWindow Dev15 -->
<Group guid="guidRToolsCmdSet" id="replGroup" priority="0x0100" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replWindowToolBarId"/>
</Group>
<Group guid="guidRToolsCmdSet" id="sessionToolbarDirectoryGroup" priority="0x0650" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replWindowToolBarId"/>
</Group>
<!-- End InteractiveWindow Dev15 -->
<Group guid="guidRToolsCmdSet" id="sessionToolbarDirectoryGroup" priority="0x0650">
<Parent guid="guidRToolsCmdSet" id="replWindowToolBarId"/>
<!-- InteractiveWindow Dev14 -->
<Group guid="guidRToolsCmdSet" id="sessionSubMenuFileGroup" priority="0x0510" Condition="Defined(VS14)">
<Parent guid="guidInteractiveWindowCmdSet" id="menuIdInteractiveToolbar"/>
</Group>
<Group guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" priority="0x0520" Condition="Defined(VS14)">
<Parent guid="guidInteractiveWindowCmdSet" id="menuIdInteractiveToolbar"/>
</Group>
<Group guid="guidRToolsCmdSet" id="sessionRDebugGroup" priority="0x0530" Condition="Defined(VS14)">
<Parent guid="guidInteractiveWindowCmdSet" id="menuIdInteractiveToolbar"/>
</Group>
<Group guid="guidRToolsCmdSet" id="sessionToolbarDirectoryGroup" priority="0x0650" Condition="Defined(VS14)">
<Parent guid="guidInteractiveWindowCmdSet" id="menuIdInteractiveToolbar"/>
</Group>
<!-- End InteractiveWindow Dev14 -->
<Group guid="guidRToolsCmdSet" id="projectNodeContextMenuGroup" priority="0x300" />
<Group guid="guidRToolsCmdSet" id="projectAddItemContextMenuGroup" priority="0x310" />
@ -619,7 +645,7 @@
</Strings>
</Button>
<Button guid="guidRToolsCmdSet" id="icmdPrevHistoryRepl" priority="0x0120" type="Button">
<Button guid="guidRToolsCmdSet" id="icmdPrevHistoryRepl" priority="0x0120" type="Button" Condition="Defined(VS15)">
<Icon guid="ImageCatalogGuid" id="MoveUp"/>
<CommandFlag>IconIsMoniker</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
@ -630,7 +656,7 @@
</Strings>
</Button>
<Button guid="guidRToolsCmdSet" id="icmdNextHistoryRepl" priority="0x0130" type="Button">
<Button guid="guidRToolsCmdSet" id="icmdNextHistoryRepl" priority="0x0130" type="Button" Condition="Defined(VS15)">
<Icon guid="ImageCatalogGuid" id="MoveDown"/>
<CommandFlag>IconIsMoniker</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
@ -2431,36 +2457,36 @@
<Parent guid="guidRToolsCmdSet" id="directorySelectSubMenuGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="sessionRDebugGroup" priority="0x0310">
<CommandPlacement guid="guidRToolsCmdSet" id="sessionRDebugGroup" priority="0x0310" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="sessionSubMenu"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuFileGroup" priority="0x0500">
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuFileGroup" priority="0x0500" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="sessionSubMenu"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="icmdResetRepl" priority="0x0100">
<CommandPlacement guid="guidRToolsCmdSet" id="icmdResetRepl" priority="0x0100" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="icmdClearRepl" priority="0x0110">
<CommandPlacement guid="guidRToolsCmdSet" id="icmdClearRepl" priority="0x0110" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="icmdPrevHistoryRepl" priority="0x0120">
<CommandPlacement guid="guidRToolsCmdSet" id="icmdPrevHistoryRepl" priority="0x0120" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="icmdNextHistoryRepl" priority="0x0130">
<CommandPlacement guid="guidRToolsCmdSet" id="icmdNextHistoryRepl" priority="0x0130" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replGroup"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuFileGroup" priority="0x0140">
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuFileGroup" priority="0x0140" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replWindowToolBarId"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" priority="0x0150">
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" priority="0x0150" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replWindowToolBarId"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="sessionRDebugGroup" priority="0x0160">
<CommandPlacement guid="guidRToolsCmdSet" id="sessionRDebugGroup" priority="0x0160" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="replWindowToolBarId"/>
</CommandPlacement>
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" priority="0x0300">
<CommandPlacement guid="guidRToolsCmdSet" id="sessionSubMenuRInteractiveGroup" priority="0x0300" Condition="Defined(VS15)">
<Parent guid="guidRToolsCmdSet" id="sessionSubMenu"/>
</CommandPlacement>
@ -2948,6 +2974,9 @@
<!-- InteractiveWindow Guid -->
<GuidSymbol name="guidInteractiveWindowCmdSet" value="{00B8868B-F9F5-4970-A048-410B05508506}">
<!-- https://github.com/dotnet/roslyn/blob/master/src/InteractiveWindow/VisualStudio/InteractiveWindow.vsct -->
<!-- VS14 only -->
<IDSymbol name="menuIdInteractiveToolbar" value="0x2000"/>
<!-- End of VS14 only -->
<IDSymbol name="menuIdInteractiveContextMenu" value="0x2100" />
<IDSymbol name="cmdidReset" value="0x0105"/>
<IDSymbol name="cmdidHistoryNext" value="0x0106"/>

Просмотреть файл

@ -37,13 +37,13 @@ namespace Microsoft.VisualStudio.R.Package.Repl {
VsAppShell.Current.AssertIsOnMainThread();
IVsInteractiveWindow vsWindow;
#if VS14
vsWindow = _vsInteractiveWindowFactoryLazy.Value.Create(RGuidList.ReplInteractiveWindowProviderGuid, instanceId, string.Empty, evaluator);
#else
var vsf2 = _vsInteractiveWindowFactoryLazy.Value as IVsInteractiveWindowFactory2; // Temporary for VS 2017 RC2
if (vsf2 != null) {
vsWindow = vsf2.Create(RGuidList.ReplInteractiveWindowProviderGuid, instanceId, string.Empty, evaluator,
0, RGuidList.RCmdSetGuid, RPackageCommandId.replWindowToolBarId, null);
} else {
vsWindow = _vsInteractiveWindowFactoryLazy.Value.Create(RGuidList.ReplInteractiveWindowProviderGuid, instanceId, string.Empty, evaluator);
}
#endif
var contentType = _contentTypeRegistryService.GetContentType(RContentTypeDefinition.ContentType);
vsWindow.SetLanguage(RGuidList.RLanguageServiceGuid, contentType);

Просмотреть файл

@ -15,8 +15,12 @@ namespace Microsoft.R.Components.PackageManager.Implementation.ViewModel {
public RPackageSourceViewModel(string source, string name) : this(source, name, isEnabled: true) { }
public RPackageSourceViewModel(string source, string name, bool isEnabled) {
source = source ?? throw new ArgumentNullException(nameof(source));
name = name ?? throw new ArgumentNullException(nameof(name));
if (source == null) {
throw new ArgumentNullException(nameof(source));
}
if (name == null) {
throw new ArgumentNullException(nameof(name));
}
Name = name;
Source = source;

Просмотреть файл

@ -5,6 +5,8 @@ using System;
using System.IO;
using System.Text;
using Microsoft.Common.Core;
using Microsoft.Win32;
using static System.FormattableString;
namespace Microsoft.UnitTests.Core {
public static class Paths {
@ -26,8 +28,8 @@ namespace Microsoft.UnitTests.Core {
}
_vsRoot = testRunnerFolder.Substring(0, index + ideFolder.Length);
}
#endif
}
return _vsRoot;
}
}