sl-wxx / coffee-bytes

Automatically exported from code.google.com/p/coffee-bytes
0 stars 0 forks source link

java.lang.StringIndexOutOfBoundsException on opening java file #43

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I just open a particular file in java editor. 

Tried to disactivate all folding options : still issued.

java.lang.StringIndexOutOfBoundsException: String index out of range: 49
    at java.lang.String.charAt(String.java:658)
    at com.cb.eclipse.folding.java.calculation.UserDefinedRegionHelper.isSentinel(UserDefinedRegionHelper.java:53)
    at com.cb.eclipse.folding.java.calculation.UserDefinedRegionHelper.isOpeningSentinel(UserDefinedRegionHelper.java:29)
    at com.cb.eclipse.folding.java.calculation.CommentHelper.isUserDefinedSentinel(CommentHelper.java:90)
    at com.cb.eclipse.folding.java.calculation.CommentHelper.handle(CommentHelper.java:67)
    at com.cb.eclipse.folding.java.calculation.AbstractBlockStrategy.handle(AbstractBlockStrategy.java:93)
    at com.cb.eclipse.folding.java.calculation.CompositeCalculationStrategy.handle(CompositeCalculationStrategy.java:24)
    at com.cb.eclipse.folding.java.calculation.CommentPrefixStrategy.handle(CommentPrefixStrategy.java:64)
    at com.cb.eclipse.folding.java.calculation.JavaProjectionCalculator.computeProjections(JavaProjectionCalculator.java:230)
    at com.cb.eclipse.folding.java.calculation.JavaProjectionCalculator.findAnnotations(JavaProjectionCalculator.java:96)
    at com.cb.eclipse.folding.java.calculation.JavaProjectionCalculator.findAnnotations(JavaProjectionCalculator.java:108)
    at com.cb.eclipse.folding.java.calculation.JavaProjectionCalculator.findAnnotations(JavaProjectionCalculator.java:108)
    at com.cb.eclipse.folding.java.calculation.JavaProjectionCalculator.findAnnotations(JavaProjectionCalculator.java:68)
    at com.cb.eclipse.folding.java.calculation.ProjectionChangeReconciler.reconstructAnnotations(ProjectionChangeReconciler.java:173)
    at com.cb.eclipse.folding.java.calculation.ProjectionChangeReconciler.initialize(ProjectionChangeReconciler.java:99)
    at com.cb.eclipse.folding.java.EnhancedJavaFoldingStructureProvider.initialize(EnhancedJavaFoldingStructureProvider.java:115)
    at com.cb.eclipse.folding.java.EnhancedJavaFoldingStructureProvider$ProjectionListener.projectionEnabled(EnhancedJavaFoldingStructureProvider.java:201)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:487)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:535)
    at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.setVisibleDocument(JavaSourceViewer.java:676)
    at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2938)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:642)
    at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:374)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:590)
    at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:4047)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3575)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447)
    at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.createPartControl(JavaEditor.java:3119)
    at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl(CompilationUnitEditor.java:1505)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:142)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:323)
    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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:877)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
    at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:119)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:333)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:254)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
    at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:90)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
    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:4688)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
    at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:619)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:331)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1046)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3112)
    at org.eclipse.ui.internal.WorkbenchPage.access$21(WorkbenchPage.java:3034)
    at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3016)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3012)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2976)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2967)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:534)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:493)
    at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:129)
    at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:181)
    at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:295)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:285)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:504)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:555)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:376)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:322)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:84)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
    at org.eclipse.swt.widgets.Shell.sendKeyEvent(Shell.java:1384)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
    at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1525)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4723)
    at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:344)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4611)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
    at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
    at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    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:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

Original issue reported on code.google.com by damien.cuvillier on 3 Sep 2014 at 3:22

GoogleCodeExporter commented 8 years ago
Fix in fixes_04_09_27 branch

Tested : it works

Jar available for convenience at 
http://www.damiencuvillier.com/doc/com.cb.eclipse.folding_1.0.6.jar and in 
attachment

Original comment by damien.cuvillier on 3 Sep 2014 at 3:40

Attachments: