0xCAB / idocit

Automatically exported from code.google.com/p/idocit
0 stars 0 forks source link

Importing existing Javadoc to iDocIt!'s Simple Javadoc fails often #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.1 Create the Javadoc grid for a method (with return value) in Eclipse without 
further documentation.
1.2 Save the changes.
1.3 Open the Java source file with iDocIt!

What is the expected output? What do you see instead?
iDocIt! editor shall open correctly, but I get following Exception:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at org.eclipse.jdt.core.dom.ASTNode$NodeList.get(ASTNode.java:1221)
    at de.akra.idocit.java.utils.JavadocUtils.readIdentifier(JavadocUtils.java:162)
    at de.akra.idocit.java.services.SimpleJavadocParser.createDocumentation(SimpleJavadocParser.java:714)
    at de.akra.idocit.java.services.SimpleJavadocParser.parseIDocItJavadoc(SimpleJavadocParser.java:829)
    at de.akra.idocit.java.services.JavaInterfaceParser.processMethodDeclaration(JavaInterfaceParser.java:475)
    at de.akra.idocit.java.services.JavaInterfaceParser.processAbstractTypeDeclaration(JavaInterfaceParser.java:351)
    at de.akra.idocit.java.services.JavaInterfaceParser.processTypeDeclaration(JavaInterfaceParser.java:232)
    at de.akra.idocit.java.services.JavaInterfaceParser.processCompilationUnit(JavaInterfaceParser.java:196)
    at de.akra.idocit.java.services.JavaInterfaceParser.parse(JavaInterfaceParser.java:149)
    at de.akra.idocit.java.services.JavaParser.parse(JavaParser.java:131)
    at de.akra.idocit.core.services.impl.EclipsePersistenceService.loadInterface(EclipsePersistenceService.java:132)
    at de.akra.idocit.ui.components.DocumentationEditor.init(DocumentationEditor.java:259)
    at de.akra.idocit.ui.components.DocumentationEditor$DocumentationEditorConfigListener$2.run(DocumentationEditor.java:119)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
    at de.akra.idocit.ui.components.DocumentationEditor$DocumentationEditorConfigListener.initializationFinished(DocumentationEditor.java:109)
    at de.akra.idocit.core.IDocItActivator.addConfigurationListener(IDocItActivator.java:124)
    at de.akra.idocit.ui.components.DocumentationEditor.createPartControl(DocumentationEditor.java:441)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    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.actions.OpenWithMenu.openEditor(OpenWithMenu.java:331)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor$18.openEditor(AbstractDecoratedTextEditor.java:1969)
    at org.eclipse.ui.actions.OpenWithMenu$3.handleEvent(OpenWithMenu.java:215)
    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:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    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:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

What steps will reproduce the problem?
2.1 Create the Javadoc grid for a method (without throws in method signature!!) 
in Eclipse without further documentation.
2.2 Add "@throws Exception" to the Javadoc, even if it is not in the signature.
2.3 Save the changes.
2.4 Open the Java source file with iDocIt!

What is the expected output? What do you see instead?
iDocIt! editor shall open without exception. How the documentation for the 
exception shall be mapped to the iDocIt! documentations needs to be discussed. 
At the moment I get following exception:

java.lang.IndexOutOfBoundsException: Index: 0
    at java.util.Collections$EmptyList.get(Collections.java:2970)
    at de.akra.idocit.java.services.SimpleJavadocParser.findParameterByName(SimpleJavadocParser.java:636)
    at de.akra.idocit.java.services.SimpleJavadocParser.createDocumentation(SimpleJavadocParser.java:786)
    at de.akra.idocit.java.services.SimpleJavadocParser.parseIDocItJavadoc(SimpleJavadocParser.java:829)
    at de.akra.idocit.java.services.JavaInterfaceParser.processMethodDeclaration(JavaInterfaceParser.java:475)
    at de.akra.idocit.java.services.JavaInterfaceParser.processAbstractTypeDeclaration(JavaInterfaceParser.java:351)
    at de.akra.idocit.java.services.JavaInterfaceParser.processTypeDeclaration(JavaInterfaceParser.java:232)
    at de.akra.idocit.java.services.JavaInterfaceParser.processCompilationUnit(JavaInterfaceParser.java:196)
    at de.akra.idocit.java.services.JavaInterfaceParser.parse(JavaInterfaceParser.java:149)
    at de.akra.idocit.java.services.JavaParser.parse(JavaParser.java:131)
    at de.akra.idocit.core.services.impl.EclipsePersistenceService.loadInterface(EclipsePersistenceService.java:132)
    at de.akra.idocit.ui.components.DocumentationEditor.init(DocumentationEditor.java:259)
    at de.akra.idocit.ui.components.DocumentationEditor$DocumentationEditorConfigListener$2.run(DocumentationEditor.java:119)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
    at de.akra.idocit.ui.components.DocumentationEditor$DocumentationEditorConfigListener.initializationFinished(DocumentationEditor.java:109)
    at de.akra.idocit.core.IDocItActivator.addConfigurationListener(IDocItActivator.java:124)
    at de.akra.idocit.ui.components.DocumentationEditor.createPartControl(DocumentationEditor.java:441)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    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.actions.OpenWithMenu.openEditor(OpenWithMenu.java:331)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor$18.openEditor(AbstractDecoratedTextEditor.java:1969)
    at org.eclipse.ui.actions.OpenWithMenu$3.handleEvent(OpenWithMenu.java:215)
    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:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    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:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

What steps will reproduce the problem?
3.1 Create the Javadoc grid for a method (without return value in method 
signature!!) in Eclipse without further documentation.
3.2 Add "@return foo" to the Javadoc, even if it is not in the signature.
3.3 Save the changes.
3.4 Open the Java source file with iDocIt!

What is the expected output? What do you see instead?
iDocIt! shall notice that inconsistancy and show a dialog to the user that he 
shall correct this issue. At the moment I get following exception:

java.lang.NullPointerException
    at de.akra.idocit.java.services.SimpleJavadocParser.createDocumentation(SimpleJavadocParser.java:744)
    at de.akra.idocit.java.services.SimpleJavadocParser.parseIDocItJavadoc(SimpleJavadocParser.java:829)
    at de.akra.idocit.java.services.JavaInterfaceParser.processMethodDeclaration(JavaInterfaceParser.java:475)
    at de.akra.idocit.java.services.JavaInterfaceParser.processAbstractTypeDeclaration(JavaInterfaceParser.java:351)
    at de.akra.idocit.java.services.JavaInterfaceParser.processTypeDeclaration(JavaInterfaceParser.java:232)
    at de.akra.idocit.java.services.JavaInterfaceParser.processCompilationUnit(JavaInterfaceParser.java:196)
    at de.akra.idocit.java.services.JavaInterfaceParser.parse(JavaInterfaceParser.java:149)
    at de.akra.idocit.java.services.JavaParser.parse(JavaParser.java:131)
    at de.akra.idocit.core.services.impl.EclipsePersistenceService.loadInterface(EclipsePersistenceService.java:132)
    at de.akra.idocit.ui.components.DocumentationEditor.init(DocumentationEditor.java:259)
    at de.akra.idocit.ui.components.DocumentationEditor$DocumentationEditorConfigListener$2.run(DocumentationEditor.java:119)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
    at de.akra.idocit.ui.components.DocumentationEditor$DocumentationEditorConfigListener.initializationFinished(DocumentationEditor.java:109)
    at de.akra.idocit.core.IDocItActivator.addConfigurationListener(IDocItActivator.java:124)
    at de.akra.idocit.ui.components.DocumentationEditor.createPartControl(DocumentationEditor.java:441)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    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.actions.OpenWithMenu.openEditor(OpenWithMenu.java:331)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor$18.openEditor(AbstractDecoratedTextEditor.java:1969)
    at org.eclipse.ui.actions.OpenWithMenu$3.handleEvent(OpenWithMenu.java:215)
    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:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    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:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Original issue reported on code.google.com by dirk.mei...@gmail.com on 5 Jul 2012 at 8:19

GoogleCodeExporter commented 8 years ago

Original comment by dirk.mei...@gmail.com on 5 Jul 2012 at 8:19

GoogleCodeExporter commented 8 years ago

Original comment by dirk.mei...@gmail.com on 16 Jul 2012 at 11:51

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r676.

Original comment by dirk.mei...@gmail.com on 25 Jul 2012 at 11:46