File tree Expand file tree Collapse file tree 3 files changed +18
-17
lines changed
java/com/github/_1c_syntax/bsl/languageserver/diagnostics
resources/com/github/_1c_syntax/bsl/languageserver/configuration
test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics Expand file tree Collapse file tree 3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 43
43
44
44
)
45
45
public class ExternalAppStartingDiagnostic extends AbstractFindMethodDiagnostic {
46
- private static final String MAIN_PATTERN_STRING =
46
+ private static final String DEFAULT_PATTERN_STRING =
47
47
"КомандаСистемы|System|ЗапуститьСистему|RunSystem|ЗапуститьПриложение|RunApp" +
48
48
"|НачатьЗапускПриложения|BeginRunningApplication" +
49
49
"|ЗапуститьПриложениеАсинх|RunAppAsync|ЗапуститьПрограмму|ОткрытьПроводник|ОткрытьФайл" ;
50
50
private static final String PATTERN_STRING_FOR_NAVI =
51
51
"|ПерейтиПоНавигационнойСсылке|GotoURL|ОткрытьНавигационнуюСсылку" ;
52
- private static final Pattern FULL_PATTERN = CaseInsensitivePattern .compile (
53
- MAIN_PATTERN_STRING + PATTERN_STRING_FOR_NAVI );
52
+ private static final Pattern DEFAULT_PATTERN = CaseInsensitivePattern .compile (DEFAULT_PATTERN_STRING );
54
53
private static final boolean CHECK_GOTO_URL = false ;
55
54
56
55
@ DiagnosticParameter (
@@ -61,12 +60,12 @@ public class ExternalAppStartingDiagnostic extends AbstractFindMethodDiagnostic
61
60
62
61
@ DiagnosticParameter (
63
62
type = String .class ,
64
- defaultValue = MAIN_PATTERN_STRING
63
+ defaultValue = DEFAULT_PATTERN_STRING
65
64
)
66
- private String userPatternString = MAIN_PATTERN_STRING ;
65
+ private String userPatternString = DEFAULT_PATTERN_STRING ;
67
66
68
67
public ExternalAppStartingDiagnostic () {
69
- super (FULL_PATTERN );
68
+ super (DEFAULT_PATTERN );
70
69
}
71
70
72
71
@ Override
Original file line number Diff line number Diff line change 653
653
"properties" : {
654
654
"checkGotoUrl" : {
655
655
"description" : " Check navigation links" ,
656
- "default" : true ,
656
+ "default" : false ,
657
657
"type" : " boolean" ,
658
658
"title" : " Check navigation links"
659
659
},
Original file line number Diff line number Diff line change @@ -75,10 +75,12 @@ void testConfigure_checkGotoUrl() {
75
75
.hasRange (9 , 4 , 23 )
76
76
.hasRange (10 , 4 , 23 )
77
77
.hasRange (12 , 4 , 26 )
78
- .hasRange (14 , 4 , 32 )
78
+
79
+ .hasRange (14 , 4 , 32 )
79
80
.hasRange (15 , 26 , 52 )
80
81
.hasRange (16 , 26 , 52 )
81
- .hasRange (18 , 26 , 44 )
82
+
83
+ .hasRange (18 , 26 , 44 )
82
84
.hasRange (19 , 26 , 44 )
83
85
.hasRange (20 , 20 , 38 )
84
86
.hasRange (21 , 20 , 38 )
@@ -105,26 +107,26 @@ void testConfigure_userPatternString() {
105
107
106
108
assertThat (diagnostics , true )
107
109
.hasRange (8 , 4 , 18 )
108
-
109
- .hasRange (14 , 4 , 32 )
110
- .hasRange (15 , 26 , 52 )
111
- .hasRange (16 , 26 , 52 )
112
-
113
- .hasSize (4 );
110
+ .hasSize (1 );
114
111
}
115
112
116
113
@ Test
117
114
void testConfigure_userPatternString_checkGotoUrl () {
118
115
119
116
Map <String , Object > configuration = diagnosticInstance .info .getDefaultConfiguration ();
120
- configuration .put ("checkGotoUrl" , false );
117
+ configuration .put ("checkGotoUrl" , true );
121
118
configuration .put ("userPatternString" , "КомандаСистемы" );
122
119
diagnosticInstance .configure (configuration );
123
120
124
121
List <Diagnostic > diagnostics = getDiagnostics ();
125
122
126
123
assertThat (diagnostics , true )
127
124
.hasRange (8 , 4 , 18 )
128
- .hasSize (1 );
125
+
126
+ .hasRange (14 , 4 , 32 )
127
+ .hasRange (15 , 26 , 52 )
128
+ .hasRange (16 , 26 , 52 )
129
+
130
+ .hasSize (4 );
129
131
}
130
132
}
You can’t perform that action at this time.
0 commit comments