Skip to content

Commit

Permalink
Handle quality checks
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <[email protected]>
  • Loading branch information
Rob Stryker committed Jun 13, 2024
1 parent 2bd145a commit 0f22682
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 9 additions & 0 deletions org.eclipse.jdt.core/.settings/.api_filters
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@
</message_arguments>
</filter>
</resource>
<resource path="dom/org/eclipse/jdt/core/dom/ICompilationUnitResolver.java" type="org.eclipse.jdt.core.dom.ICompilationUnitResolver">
<filter id="643846161">
<message_arguments>
<message_argument value="ICompilationUnit"/>
<message_argument value="ICompilationUnitResolver"/>
<message_argument value="toCompilationUnit(ICompilationUnit, boolean, IJavaProject, List&lt;FileSystemClasspath&gt;, int, int, Map&lt;String,String&gt;, WorkingCopyOwner, WorkingCopyOwner, int, IProgressMonitor)"/>
</message_arguments>
</filter>
</resource>
<resource path="dom/org/eclipse/jdt/core/dom/ImportDeclaration.java" type="org.eclipse.jdt.core.dom.ImportDeclaration">
<filter id="576778288">
<message_arguments>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class CompilationUnitResolverDiscovery {
private static boolean ERROR_LOGGED = false;


@SuppressWarnings("unchecked")
static ICompilationUnitResolver getInstance() {
String compilationUnitResolverId = System.getProperty(ICompilationUnitResolver.class.getSimpleName());
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, COMPILATION_UNIT_RESOLVER_EXTPOINT_ID);
Expand All @@ -32,20 +31,20 @@ static ICompilationUnitResolver getInstance() {
for (IExtension ext : extensions) {
IConfigurationElement[] configElements = ext.getConfigurationElements();
for (final IConfigurationElement configElement : configElements) {
String elementId = configElement.getAttribute("id");
String elementId = configElement.getAttribute("id"); //$NON-NLS-1$
if( compilationUnitResolverId.equals(elementId)) {
String elementName =configElement.getName();
if (!("resolver".equals(elementName))) { //$NON-NLS-1$
continue;
}
try {
Object executableExtension = configElement.createExecutableExtension("class");
Object executableExtension = configElement.createExecutableExtension("class"); //$NON-NLS-1$
if( executableExtension instanceof ICompilationUnitResolver icur) {
return icur;
}
} catch (CoreException e) {
if( !ERROR_LOGGED) {
ILog.get().error("Could not instantiate ICompilationUnitResolver: '" + elementId + "' with class: " + configElement.getAttribute("class"), e); //$NON-NLS-1$
ILog.get().error("Could not instantiate ICompilationUnitResolver: '" + elementId + "' with class: " + configElement.getAttribute("class"), e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ERROR_LOGGED = true;
}
}
Expand Down

0 comments on commit 0f22682

Please sign in to comment.