Project: JDT
Bug 198375 [introduce factory] CoreException using Introduce Factory
Reported: 2007-07-31 06:31:47 | Status: resolved fixed

3.3M7 Introduce Factory for a constructor with the signature: public Identifier(String stringIdentifier, Class<T> baseType) failed with the following exception: java.lang.reflect.InvocationTargetException at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run( WorkbenchRunnableAdapter.java:91) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Modal Context.java:113) Caused by: org.eclipse.core.runtime.CoreException: Unexpected AST node type for constructor search hit: 'org.eclipse.jdt.core.dom.MethodRef('#Identifier(String, Class)')' in compilation unit 'Identifier.java' at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.getCtorCallAt(IntroduceFactoryRefactoring.java:1022) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.replaceConstructorCalls(IntroduceFactoryRefactoring.java:945) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.addAllChangesFor(IntroduceFactoryRefactoring.java:883) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.createChange(IntroduceFactoryRefactoring.java:1086) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChan geOperation.java:121) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797 ) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run( WorkbenchRunnableAdapter.java:87) ... 1 more Root exception: org.eclipse.core.runtime.CoreException: Unexpected AST node type for constructor search hit: 'org.eclipse.jdt.core.dom.MethodRef('#Identifier(String,Class)')' i n compilation unit 'Identifier.java' at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.getCtorCallAt(IntroduceFactoryRefactoring.java:1022) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.replaceConstructorCalls(IntroduceFactoryRefactoring.java:945) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.addAllChangesFor(IntroduceFactoryRefactoring.java:883) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefa ctoring.createChange(IntroduceFactoryRefactoring.java:1086) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChan geOperation.java:121) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797 ) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run( WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Modal Context.java:113)

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/positive/JavadocRef.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/positive/JavadocRef_in.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringCoreMessages.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java