Skip to content

Commit

Permalink
Merge branch 'release/2.9.42'
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava Buynov authored and Slava Buynov committed Mar 15, 2017
2 parents afa5fa8 + b253a74 commit 358c2ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions QuickNavigate/Forms/Nodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using ASCompletion;
using ASCompletion.Model;
using JetBrains.Annotations;
using PluginCore.Managers;

namespace QuickNavigate.Forms
{
Expand Down Expand Up @@ -69,10 +70,10 @@ public ClassNode([NotNull] ClassModel model, int imageIndex, int selectedImageIn
In = Path.GetFileNameWithoutExtension(InFile.FileName);
if (!string.IsNullOrEmpty(Package)) In = $"{Package}.{In}";
}
if (InFile.Context.Features.hasModules)
else if (InFile.Context.Features.hasModules)
{
var module = InFile.Module;
if (!string.IsNullOrEmpty(module) && module != Name) In = !string.IsNullOrEmpty(In)? $"{In}.{module}" : module;
if (!string.IsNullOrEmpty(module) && module != Name) In = !string.IsNullOrEmpty(In) ? $"{In}.{module}" : module;
}
ImageIndex = imageIndex;
SelectedImageIndex = selectedImageIndex;
Expand Down
18 changes: 9 additions & 9 deletions QuickNavigate/PluginMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ static void ShowInProjectManager([NotNull] Form sender, [NotNull] MemberModel mo
((Control) PluginBase.MainForm).BeginInvoke((MethodInvoker) (() =>
{
var ui = FormHelper.GetProjectManagerPluginUI();
Debug.Assert(ui != null, "ProjectManager.PluginMain.pluginUI != null");
Debug.Assert(ui != null, "ProjectManager.PluginMain.pluginUI is null");
ui.Parent.Show();
ui.Tree.Select(model.InFile.FileName);
}));
Expand All @@ -356,7 +356,7 @@ static void ShowInFileExplorer([NotNull] Form sender, [NotNull] MemberModel mode
((Control) PluginBase.MainForm).BeginInvoke((MethodInvoker) (() =>
{
var ui = FormHelper.GetFileExplorerPluginUI();
Debug.Assert(ui != null, "FileExplorer.PluginMain.pluginUI != null");
Debug.Assert(ui != null, "FileExplorer.PluginMain.pluginUI is null");
ui.BrowseTo(Path.GetDirectoryName(model.InFile.FileName));
ui.Parent.Show();
}));
Expand Down Expand Up @@ -420,7 +420,7 @@ static void SetDocumentClass([NotNull] MemberModel model)
project.SetDocumentClass(model.InFile.FileName, true);
project.Save();
var ui = FormHelper.GetProjectManagerPluginUI();
Debug.Assert(ui != null, "ProjectManager.PluginMain.pluginUI != null");
Debug.Assert(ui != null, "ProjectManager.PluginMain.pluginUI is null");
ui.Tree.RefreshTree();
}

Expand All @@ -429,42 +429,42 @@ static void SetDocumentClass([NotNull] MemberModel model)
void OnSetDocumentClassMenuClick(object sender, EventArgs e)
{
var node = (ClassNode) openedForm.SelectedNode;
Debug.Assert(node != null, "node != null");
Debug.Assert(node != null, "node is null");
SetDocumentClass(node.Model);
}

void OnGotoPositionOrLineMenuClick(object sender, EventArgs e)
{
var node = (ClassNode) openedForm.SelectedNode;
Debug.Assert(node != null, "node != null");
Debug.Assert(node != null, "node is null");
GotoPositionOrLine(openedForm, node.Model);
}

void OnShowInQuickOutlineMenuClick(object sender, EventArgs e)
{
var node = (ClassNode) openedForm.SelectedNode;
Debug.Assert(node != null, "node != null");
Debug.Assert(node != null, "node is null");
ShowQuickOutline(openedForm, node.Model);
}

void OnShowInClassHierarchyMenuClick(object sender, EventArgs e)
{
var node = (ClassNode) openedForm.SelectedNode;
Debug.Assert(node != null, "node != null");
Debug.Assert(node != null, "node is null");
ShowClassHierarchy(openedForm, node.Model);
}

void OnShowInProjectManagerMenuClick(object sender, EventArgs e)
{
var node = (ClassNode) openedForm.SelectedNode;
Debug.Assert(node != null, "node != null");
Debug.Assert(node != null, "node is null");
ShowInProjectManager(openedForm, node.Model);
}

void OnShowInFileExplorerMenuClick(object sender, EventArgs e)
{
var node = (ClassNode) openedForm.SelectedNode;
Debug.Assert(node != null, "node != null");
Debug.Assert(node != null, "node is null");
ShowInFileExplorer(openedForm, node.Model);
}

Expand Down

0 comments on commit 358c2ab

Please sign in to comment.