File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal
com.microsoft.java.debug.target Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ public final class CompletionProposalRequestor extends CompletionRequestor {
7272 CompletionItemKind .Text );
7373 // @formatter:on
7474
75+ private static boolean isFilterFailed = false ;
76+
7577 /**
7678 * Constructor.
7779 * @param typeRoot ITypeRoot
@@ -321,7 +323,7 @@ private boolean isFiltered(CompletionProposal proposal) {
321323 case CompletionProposal .JAVADOC_TYPE_REF :
322324 case CompletionProposal .TYPE_REF : {
323325 char [] declaringType = getDeclaringType (proposal );
324- return declaringType != null && org . eclipse . jdt . ls . core . internal . contentassist . TypeFilter . isFiltered (declaringType );
326+ return declaringType != null && isFiltered (declaringType );
325327 }
326328 default : // do nothing
327329 }
@@ -332,6 +334,22 @@ private boolean isFiltered(CompletionProposal proposal) {
332334 return false ;
333335 }
334336
337+ // Temp workaround for the completion error https://github.com/microsoft/java-debug/issues/534
338+ private static boolean isFiltered (char [] fullTypeName ) {
339+ if (isFilterFailed ) {
340+ return false ;
341+ }
342+
343+ try {
344+ return JavaLanguageServerPlugin .getInstance ().getTypeFilter ().filter (new String (fullTypeName ));
345+ } catch (NoSuchMethodError ex ) {
346+ isFilterFailed = true ;
347+ JavaLanguageServerPlugin .logException ("isFiltered for the completion failed." , ex );
348+ }
349+
350+ return false ;
351+ }
352+
335353 /**
336354 * copied from
337355 * org.eclipse.jdt.ui.text.java.CompletionProposalCollector.getDeclaringType(CompletionProposal)
Original file line number Diff line number Diff line change 1515 <unit id =" org.eclipse.equinox.p2.core.feature.source.feature.group" version =" 0.0.0" />
1616 <unit id =" org.eclipse.equinox.sdk.feature.group" version =" 0.0.0" />
1717 <unit id =" org.eclipse.jdt.source.feature.group" version =" 0.0.0" />
18- <unit id =" org.eclipse.sdk.feature.group" version =" 0.0.0" />
18+ <unit id =" org.eclipse.jdt.apt.pluggable.core" version =" 0.0.0" />
19+ <repository location =" https://download.eclipse.org/eclipse/updates/4.31-I-builds/I20240130-1800/" />
20+ </location >
21+ <location includeAllPlatforms =" false" includeConfigurePhase =" false" includeMode =" planner" includeSource =" true" type =" InstallableUnit" >
1922 <unit id =" org.eclipse.xtext.sdk.feature.group" version =" 0.0.0" />
2023 <repository location =" https://download.eclipse.org/releases/2023-12/" />
2124 </location >
Original file line number Diff line number Diff line change 1111 <properties >
1212 <base .name>Java Debug Server for Visual Studio Code</base .name>
1313 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
14- <tycho-version >4.0.3 </tycho-version >
14+ <tycho-version >4.0.5 </tycho-version >
1515 <checkstyleDir >${basedir}</checkstyleDir >
1616 </properties >
1717
You can’t perform that action at this time.
0 commit comments