Skip to content

Commit

Permalink
Same naming rule as vs diff project
Browse files Browse the repository at this point in the history
  • Loading branch information
heku committed Nov 6, 2021
1 parent 88bda19 commit af29817
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Kool.EditProject.Shared/Commands/BaseCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected static void Open(string file)
{
}

protected IEnumerable<Project> SelectedProjects => VS.SelectedItems.OfType<SelectedItem>().Where(x => x.Project != null).Select(x => x.Project);
protected IEnumerable<Project> SelectedProjects => IDE.SelectedItems.OfType<SelectedItem>().Where(x => x.Project != null).Select(x => x.Project);

protected virtual void OnBeforeQueryStatus()
{
Expand Down
2 changes: 1 addition & 1 deletion Kool.EditProject.Shared/Commands/EditSolutionCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private EditSolutionCommand() : base(Ids.EDIT_SOLUTION_MENU_COMMAND_ID)
{
}

protected override void OnBeforeQueryStatus() => _solutionFile = VS.Solution.FullName;
protected override void OnBeforeQueryStatus() => _solutionFile = IDE.Solution.FullName;

protected override void OnExecute()
{
Expand Down
4 changes: 2 additions & 2 deletions Kool.EditProject.Shared/EditProjectPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Kool.EditProject
delay: 1000)]
public sealed class EditProjectPackage : AsyncPackage
{
internal static DTE2 VS { get; private set; }
internal static DTE2 IDE { get; private set; }
internal static Options Options { get; private set; }
internal static EditProjectPackage Instance { get; private set; }

Expand All @@ -37,7 +37,7 @@ protected override async Tasks.Task InitializeAsync(CancellationToken cancellati

await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

VS = await GetServiceAsync(typeof(DTE)) as DTE2;
IDE = await GetServiceAsync(typeof(DTE)) as DTE2;
Options = (Options)GetDialogPage(typeof(Options));

var cmds = await GetServiceAsync(typeof(IMenuCommandService)) as IMenuCommandService;
Expand Down
4 changes: 2 additions & 2 deletions Kool.EditProject.Shared/Models/VsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private Document FindDocument(string projectFile)
{
var editingFile = FindEditingFile(projectFile);

foreach (Document document in VS.Documents)
foreach (Document document in IDE.Documents)
{
if (document.FullName == editingFile)
{
Expand All @@ -93,7 +93,7 @@ private Document FindDocument(string projectFile)

private void RegisterListeners()
{
_dteEvents = VS.Events; // Prevent it from GC.
_dteEvents = IDE.Events; // Prevent it from GC.
_documentEvents = _dteEvents.DocumentEvents; // Prevent it from GC.
_documentEvents.DocumentSaved += DocumentEvents_DocumentSaved;
_documentEvents.DocumentClosing += DocumentEvents_DocumentClosing;
Expand Down

0 comments on commit af29817

Please sign in to comment.