@@ -35,6 +35,9 @@ import xsbti.compile.ClassFileManager
35
35
import xsbti .compile .IncOptions
36
36
import xsbti .compile .Output
37
37
import xsbti .compile .analysis .ReadStamps
38
+ import xsbti .{Action , DiagnosticCode , DiagnosticRelatedInformation }
39
+
40
+ import collection .JavaConverters ._
38
41
39
42
/**
40
43
* This class provides a thread-safe implementation of `xsbti.AnalysisCallback` which is required to compile with the
@@ -123,21 +126,56 @@ final class ConcurrentAnalysisCallback(
123
126
startSource(converter.toVirtualFile(source.toPath()))
124
127
}
125
128
126
- def problem (
129
+ def problem2 (
127
130
category : String ,
128
131
pos : Position ,
129
132
msg : String ,
130
133
severity : Severity ,
131
- reported : Boolean
134
+ reported : Boolean ,
135
+ rendered : ju.Optional [String ],
136
+ diagnosticCode : ju.Optional [DiagnosticCode ],
137
+ diagnosticRelatedInformation : ju.List [DiagnosticRelatedInformation ],
138
+ actions : ju.List [Action ]
132
139
): Unit = {
133
140
for (source <- InterfaceUtil .jo2o(pos.sourceFile)) {
134
141
val map = if (reported) reportedProblems else unreportedProblems
135
142
map
136
143
.getOrElseUpdate(source.toPath(), new ConcurrentLinkedQueue )
137
- .add(InterfaceUtil .problem(category, pos, msg, severity, None , None , Nil ))
144
+ .add(
145
+ InterfaceUtil .problem(
146
+ category,
147
+ pos,
148
+ msg,
149
+ severity,
150
+ None ,
151
+ InterfaceUtil .toOption(diagnosticCode),
152
+ diagnosticRelatedInformation.asScala.toList,
153
+ actions.asScala.toList
154
+ )
155
+ )
138
156
}
139
157
}
140
158
159
+ def problem (
160
+ category : String ,
161
+ pos : Position ,
162
+ msg : String ,
163
+ severity : Severity ,
164
+ reported : Boolean
165
+ ): Unit = {
166
+ problem2(
167
+ category,
168
+ pos,
169
+ msg,
170
+ severity,
171
+ reported,
172
+ rendered = ju.Optional .empty(),
173
+ diagnosticCode = ju.Optional .empty(),
174
+ diagnosticRelatedInformation = Nil .asJava,
175
+ actions = Nil .asJava
176
+ )
177
+ }
178
+
141
179
def classDependency (
142
180
onClassName : String ,
143
181
sourceClassName : String ,
0 commit comments