Skip to content

Commit f9288fc

Browse files
author
SlavaRa
committed
fixes: organize imports from one or more
1 parent 102097e commit f9288fc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

External/Plugins/CodeRefactor/PluginMain.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,11 @@ private void UpdateMenuItems()
346346
IASContext context = ASContext.Context;
347347
if (context != null && context.CurrentModel != null)
348348
{
349-
bool truncate = langIsValid && context.CurrentModel.Imports.Count > 0;
350-
bool organize = (langIsValid && context.CurrentModel.Imports.Count > 1);
351-
this.refactorContextMenu.OrganizeMenuItem.Enabled = organize;
352-
this.refactorContextMenu.TruncateMenuItem.Enabled = truncate;
353-
this.refactorMainMenu.OrganizeMenuItem.Enabled = organize;
354-
this.refactorMainMenu.TruncateMenuItem.Enabled = truncate;
349+
bool enabled = langIsValid && context.CurrentModel.Imports.Count > 0;
350+
this.refactorContextMenu.OrganizeMenuItem.Enabled = enabled;
351+
this.refactorContextMenu.TruncateMenuItem.Enabled = enabled;
352+
this.refactorMainMenu.OrganizeMenuItem.Enabled = enabled;
353+
this.refactorMainMenu.TruncateMenuItem.Enabled = enabled;
355354
}
356355
this.surroundContextMenu.Enabled = false;
357356
this.refactorMainMenu.SurroundMenu.Enabled = false;

0 commit comments

Comments
 (0)