Community
Participate
Working Groups
Eclipse 3.7M4 (Eclipse SDK 3.7.0.I20101208-1300) The line of code looks like: SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); I'm seeing the following API error: Description Resource Path Location Type The method SAXTransformerFactory.newInstance() referenced in org.eclipse.cdt.internal.ui.wizards.settingswizards.ProjectSettingsExportStrategy.finish(IProjectSettingsWizardPage) is not defined in the bundle's required execution environment: J2SE-1.5 ProjectSettingsExportStrategy.java /org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/settingswizards line 95 API Usage Problem According to: http://download.oracle.com/javase/1.5.0/docs/api/javax/xml/transform/sax/SAXTransformerFactory.html this method is defined as TransformerFactory.newInstance() which is extended by SAXTransformerFactory. If I change this to: TransformerFactory.newInstance(); The error goes away. I have a Java 4, Java 5, and Java 6 execution environment installed. However I think this may be related to the PDE/API tools I've recently installed: PDE/API Tools Environment Descriptions 1.0.100.v20101028-7C-7BF9JgLWLMBMMAMsLL
(In reply to comment #0) > However I think this may be related to the PDE/API tools I've recently > installed: > PDE/API Tools Environment Descriptions > 1.0.100.v20101028-7C-7BF9JgLWLMBMMAMsLL Could you please give me the exact bundle ids from the installation page ? What version of CDT should I install to reproduce ?
Created attachment 186748 [details] configuration attached is my current eclipse configuration. I'm using Eclipse Classic 3.7M4 with PDE API Tools installed from here: http://download.eclipse.org/releases/indigo To see the CDT plugins where this occurs, checkout from: dev.eclipse.org/cvsroot/tools Two plugins (should be sufficient): org.eclipse.cdt/all/org.eclipse.cdt.core org.eclipse.cdt/all/org.eclipse.cdt.ui The error occurs in cdt ui: src/org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSettingsExportStrategy.java
Reproduced with a simple test case. The problem comes from the fact that I don't do any lookup for static methods while checking the EEs defined for the project. Working on it.
In fact the compiler generates the actual receiver type even if the method is static and it is defined in a super class. So we actually need a method lookup when resolving the static method for checking the EEs defined for the bundle.
Created attachment 186767 [details] Proposed fix
Michael, please review.
Released for 3.7M5. Michael, please verify.
verified in I20110126-0800