File tree Expand file tree Collapse file tree
src/com/goide/codeInsight/imports Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626)
2727public class GoCodeInsightSettings implements PersistentStateComponent <GoCodeInsightSettings > {
2828 private boolean myShowImportPopup = true ;
29- private boolean myOptimizeImportsOnTheFly = false ;
29+ private boolean myOptimizeImportsOnTheFly = true ;
3030 private boolean myAddUnambiguousImportsOnTheFly = true ;
3131
3232 public static GoCodeInsightSettings getInstance () {
Original file line number Diff line number Diff line change @@ -26,12 +26,10 @@ public void setUp() throws Exception {
2626 super .setUp ();
2727 setUpProjectSdk ();
2828 ((CodeInsightTestFixtureImpl )myFixture ).canChangeDocumentDuringHighlighting (true );
29- GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (true );
3029 }
3130
3231 @ Override
3332 protected void tearDown () throws Exception {
34- GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (false );
3533 super .tearDown ();
3634 }
3735
Original file line number Diff line number Diff line change 1717package com .goide .inspections ;
1818
1919import com .goide .GoCodeInsightFixtureTestCase ;
20+ import com .goide .codeInsight .imports .GoCodeInsightSettings ;
2021import com .goide .inspections .unresolved .*;
2122import com .goide .project .GoModuleLibrariesService ;
2223import com .intellij .openapi .command .WriteCommandAction ;
@@ -54,6 +55,13 @@ public void setUp() throws Exception {
5455 GoTestSignaturesInspection .class ,
5556 GoAssignmentNilWithoutExplicitType .class
5657 );
58+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (false );
59+ }
60+
61+ @ Override
62+ protected void tearDown () throws Exception {
63+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (true );
64+ super .tearDown ();
5765 }
5866
5967 private void doTest () {
Original file line number Diff line number Diff line change 1616
1717package com .goide .inspections ;
1818
19+ import com .goide .codeInsight .imports .GoCodeInsightSettings ;
1920import com .goide .quickfix .GoQuickFixTestBase ;
2021import com .intellij .testFramework .LightProjectDescriptor ;
2122
2223public class GoTestSignaturesInspectionTest extends GoQuickFixTestBase {
24+ @ Override
25+ protected void tearDown () throws Exception {
26+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (true );
27+ super .tearDown ();
28+ }
29+
2330 @ Override
2431 protected void setUp () throws Exception {
2532 super .setUp ();
2633 setUpProjectSdk ();
2734 myFixture .enableInspections (GoTestSignaturesInspection .class );
35+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (false );
2836 }
2937
3038 @ Override
You can’t perform that action at this time.
0 commit comments