File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed
src/com/goide/codeInsight/imports Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 26
26
)
27
27
public class GoCodeInsightSettings implements PersistentStateComponent <GoCodeInsightSettings > {
28
28
private boolean myShowImportPopup = true ;
29
- private boolean myOptimizeImportsOnTheFly = false ;
29
+ private boolean myOptimizeImportsOnTheFly = true ;
30
30
private boolean myAddUnambiguousImportsOnTheFly = true ;
31
31
32
32
public static GoCodeInsightSettings getInstance () {
Original file line number Diff line number Diff line change @@ -26,12 +26,10 @@ public void setUp() throws Exception {
26
26
super .setUp ();
27
27
setUpProjectSdk ();
28
28
((CodeInsightTestFixtureImpl )myFixture ).canChangeDocumentDuringHighlighting (true );
29
- GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (true );
30
29
}
31
30
32
31
@ Override
33
32
protected void tearDown () throws Exception {
34
- GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (false );
35
33
super .tearDown ();
36
34
}
37
35
Original file line number Diff line number Diff line change 17
17
package com .goide .inspections ;
18
18
19
19
import com .goide .GoCodeInsightFixtureTestCase ;
20
+ import com .goide .codeInsight .imports .GoCodeInsightSettings ;
20
21
import com .goide .inspections .unresolved .*;
21
22
import com .goide .project .GoModuleLibrariesService ;
22
23
import com .intellij .openapi .command .WriteCommandAction ;
@@ -54,6 +55,13 @@ public void setUp() throws Exception {
54
55
GoTestSignaturesInspection .class ,
55
56
GoAssignmentNilWithoutExplicitType .class
56
57
);
58
+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (false );
59
+ }
60
+
61
+ @ Override
62
+ protected void tearDown () throws Exception {
63
+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (true );
64
+ super .tearDown ();
57
65
}
58
66
59
67
private void doTest () {
Original file line number Diff line number Diff line change 16
16
17
17
package com .goide .inspections ;
18
18
19
+ import com .goide .codeInsight .imports .GoCodeInsightSettings ;
19
20
import com .goide .quickfix .GoQuickFixTestBase ;
20
21
import com .intellij .testFramework .LightProjectDescriptor ;
21
22
22
23
public class GoTestSignaturesInspectionTest extends GoQuickFixTestBase {
24
+ @ Override
25
+ protected void tearDown () throws Exception {
26
+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (true );
27
+ super .tearDown ();
28
+ }
29
+
23
30
@ Override
24
31
protected void setUp () throws Exception {
25
32
super .setUp ();
26
33
setUpProjectSdk ();
27
34
myFixture .enableInspections (GoTestSignaturesInspection .class );
35
+ GoCodeInsightSettings .getInstance ().setOptimizeImportsOnTheFly (false );
28
36
}
29
37
30
38
@ Override
You can’t perform that action at this time.
0 commit comments