Community
Participate
Working Groups
Could be a bug in JDT/Core. Using 0912, I tried to define a class that implements javax.tools.JavaCompiler using the class wizard and I got an Internal Error in the .log file: Java Model Exception: Java Model Status [getStandardFileManager(javax.tools.DiagnosticListener, java.util.Locale, java.nio.charset.Charset) {key=Ljavax/tools/JavaCompiler;.getStandardFileManager(Ljavax/tools/DiagnosticListener;Ljava/util/Locale;Ljava/nio/charset/Charset;)Ljavax/tools/StandardJavaFileManager;} [in JavaCompiler [in JavaCompiler.class [in javax.tools [in D:\jdks\jdk6\jre\lib\rt.jar]]]] does not exist] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:485) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:516) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:249) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:235) at org.eclipse.jdt.internal.core.BinaryMethod.getParameterNames(BinaryMethod.java:167) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2.suggestArgumentNames(StubUtility2.java:922) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2.createParameters(StubUtility2.java:552) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2.createImplementationStub(StubUtility2.java:396) at org.eclipse.jdt.internal.corext.codemanipulation.AddUnimplementedMethodsOperation.run(AddUnimplementedMethodsOperation.java:208) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createInheritedMethods(NewTypeWizardPage.java:2470) at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createTypeMembers(NewClassWizardPage.java:262) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createType(NewTypeWizardPage.java:2031) at org.eclipse.jdt.internal.ui.wizards.NewClassCreationWizard.finishPage(NewClassCreationWizard.java:65) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:117) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4022) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) The signature of this method is: StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) From the javadoc. Might be related to the wildcard.
I got it because my compiler settings were set to 1.4 compliance and I used a 1.6 execution environment on the classpath. It worked fine once I switch to compliance 1.6.
IMethodBinding.getJavaElement seems to return a IMethod that doesn't exist. However, there is a existing IMethod that corresponds to that method. Would be better if IMethodBinding.getJavaElement can return an existing method of possible.
Jérôme, We might want to check the compliance to see what method should be returned.
Cannot reproduce the JME using 3.3 RC4 (compliance project was 1.4 and JRE 1.6)