Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Eclipse Indigo 3.7] Unable to create editor ID jd.ide.eclipse.editors.JDClassFileEditor: Editor could not be initialized. #13

Open
PrabakaranSK opened this issue Nov 27, 2015 · 1 comment

Comments

@PrabakaranSK
Copy link

First of all, appreciate your efforts in creating such an awesome tool.

Issue:
In Eclipse Indigo 3.7, while decompiling a certain .class file, the editor opened with error saying "Unable to create editor ID jd.ide.eclipse.editors.JDClassFileEditor: Editor could not be initialized.".
(Note: In Luna 4.4.1 Eclipse, the decompilation works fine).

Error log shows the following:
Unable to create editor ID jd.ide.eclipse.editors.JDClassFileEditor: Editor could not be initialized.

Exception Stack Trace:
java.lang.IllegalArgumentException
at org.eclipse.jdt.core.Signature.appendTypeArgumentSignatures(Signature.java:825)
at org.eclipse.jdt.core.Signature.appendClassTypeSignature(Signature.java:615)
at org.eclipse.jdt.core.Signature.appendTypeSignature(Signature.java:911)
at org.eclipse.jdt.core.Signature.appendTypeSignature(Signature.java:855)
at org.eclipse.jdt.core.Signature.toCharArray(Signature.java:2637)
at org.eclipse.jdt.core.Signature.getSignatureSimpleName(Signature.java:1870)
at org.eclipse.jdt.core.Signature.getSignatureSimpleName(Signature.java:1914)
at org.eclipse.jdt.internal.core.SourceMapper$LocalVariableElementKey.(SourceMapper.java:96)
at org.eclipse.jdt.internal.core.SourceMapper.enterAbstractMethod(SourceMapper.java:831)
at org.eclipse.jdt.internal.core.SourceMapper.enterMethod(SourceMapper.java:769)
at org.eclipse.jdt.internal.compiler.SourceElementNotifier.notifySourceElementRequestor(SourceElementNotifier.java:368)
at org.eclipse.jdt.internal.compiler.SourceElementNotifier.notifySourceElementRequestor(SourceElementNotifier.java:693)
at org.eclipse.jdt.internal.compiler.SourceElementNotifier.notifySourceElementRequestor(SourceElementNotifier.java:455)
at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:934)
at org.eclipse.jdt.internal.core.SourceMapper.mapSource(SourceMapper.java:1391)
at org.eclipse.jdt.internal.core.SourceMapper.mapSource(SourceMapper.java:1326)
at org.eclipse.jdt.internal.core.ClassFile.mapSource(ClassFile.java:659)
at org.eclipse.jdt.internal.core.ClassFile.openBuffer(ClassFile.java:635)
at org.eclipse.jdt.internal.core.Openable.getBuffer(Openable.java:288)
at org.eclipse.jdt.internal.core.ClassFile.getBuffer(ClassFile.java:359)
at org.eclipse.jdt.internal.core.ClassFile.getSourceRange(ClassFile.java:523)
at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.probeInputForSource(ClassFileEditor.java:759)
at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput(ClassFileEditor.java:658)
at jd.ide.eclipse.editors.JDClassFileEditor.doSetInput(JDClassFileEditor.java:73)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3200)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2649)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3218)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3245)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:368)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:174)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

Session Data:
eclipse.buildId=M20120208-0800
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product -showlocation -Duser.name=Prabakaran SK
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -showlocation -Duser.name=Prabakaran SK -data C:\Dev\WS4CRSIndigoNew

@PrabakaranSK PrabakaranSK changed the title Unable to create editor ID jd.ide.eclipse.editors.JDClassFileEditor: Editor could not be initialized. [Eclipse Indigo 3.7] Unable to create editor ID jd.ide.eclipse.editors.JDClassFileEditor: Editor could not be initialized. Nov 30, 2015
@luchuanbaker
Copy link

I found a reason is that eclipse indigo can not supported the grammar as fallows:

public void get(ClassA<Typ1, Type2>.InnerClass param1)

so we just have to replace the code as:

public void get(ClassA.InnerClass param1)

You need to modify the source code of jd-eclipse....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants