Community
Participate
Working Groups
I20050324-1400 When I loaded org.eclipse.ui.workbench from HEAD the class org.eclipse.ui.actions.BaseNewWizardMenu had two missing class references: import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.dynamicHelpers.IExtensionChangeHandler; For these we got unused import errors - they are in use just not resolved. When we loaded runtime we were fine - no error.
Please describe exact steps to reproduce. What did your workspace contain initially ? In original case, if removing the imports, is any error diagnosed ? If not, why do you think they are useful ?
Or are you saying that originally you had 2 unresolved imports, which also got flagged as unused ?
The complaint is that in the Java Editor it is flagged as an unused import when later on its known as an unresolved class. In the problems view, there is an error for the unused import as well as errors within the source that the type cannot be found. The import org.eclipse.core.runtime.dynamicHelpers.IExtensionChangeHandler cannot be resolved (line 24) IExtensionChangeHandler cannot be resolved to a type (line 58) My personal view is that this boils down to cascading errors. Since the type in the code can't be resolved, the import is flagged unused.
Exactly. I had two unresolved references that showed up as unused imports. As these were the first errors displayed it was confusing as to what was going on.
Agreed. The check for unused imports was only disabled in presence of syntax errors. But in certain situations, some errors may hinder its accuracy. Changed check to only perform if after resolution no error got detected. *** This bug has been marked as a duplicate of 95909 ***