#423 closed Bugs (worksforme)
Code formatter error
| Reported by: | nobody | Owned by: | nobody |
|---|---|---|---|
| Priority: | 5 | Milestone: | |
| Component: | PHP Editor | Version: | 1.2.0-nightly |
| Keywords: | formatter | Cc: |
Description (last modified by ed_mann)
I have a simple php source file like this: <?php /* * Created on Jan 23, 2006 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ /** ensure this file is being included by an index page: Front Controller */ defined( 'INDEX_PAGE' ) or die( 'Direct Access to this location is not allowed.' ); require_once (APPLICATION_PATH . 'database.php'); echo 'Edit'; // Editing is done or not. Submited or not $status = ''; ?> When I try to re-format it with Ctrl+Shift+F, an error occurs. PHPEclipse build 22/1/2006 Eclipse 3.2M4 Java 6.0 b68 Windows XP SP2 Error log: !ENTRY org.eclipse.ui 4 0 2006-01-25 22:25:04.062 !MESSAGE Index: 14, Size: 14 !STACK 0 java.lang.IndexOutOfBoundsException: Index: 14, Size: 14 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.eclipse.jface.text.formatter.ContentFormatter.updateAffectedPositions(ContentFormatter.java:721) at org.eclipse.jface.text.formatter.ContentFormatter$UpdateAffectedPositions.update(ContentFormatter.java:252) at org.eclipse.jface.text.AbstractDocument.updatePositions(AbstractDocument.java:1161) at org.eclipse.jface.text.AbstractDocument.updateDocumentStructures(AbstractDocument.java:663) at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:751) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1112) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1119) at net.sourceforge.phpeclipse.phpeditor.PartiallySynchronizedDocument.replace(PartiallySynchronizedDocument.java:92) at org.eclipse.jface.text.formatter.ContentFormatter.format(ContentFormatter.java:526) at org.eclipse.jface.text.formatter.ContentFormatter.formatRegion(ContentFormatter.java:428) at org.eclipse.jface.text.formatter.ContentFormatter.format(ContentFormatter.java:380) at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:781) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1489) at net.sourceforge.phpeclipse.phpeditor.JavaSourceViewer.doOperation(JavaSourceViewer.java:148) at net.sourceforge.phpeclipse.phpeditor.PHPUnitEditor$AdaptedSourceViewer.doOperation(PHPUnitEditor.java:312) at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:122) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:120) at org.eclipse.jface.action.Action.runWithEvent(Action.java:492) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:182) at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:108) at org.eclipse.core.commands.Command.execute(Command.java:306) at org.eclipse.core.commands.ParameterizedCommand.execute(ParameterizedCommand.java:401) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:461) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:833) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:555) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:498) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:118) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:978) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:913) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:951) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:947) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1261) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3311) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3212) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3963) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) Thanks, pcdinh http://www.goldenkey.edu.vn/en
Change History (2)
comment:1 Changed 7 years ago by nobody
comment:2 Changed 5 years ago by ed_mann
- billable set to 0
- Description modified (diff)
- Keywords formatter added
- os_platform set to Linux
- Resolution changed from None to worksforme
- Status changed from assigned to closed
- Version changed from None to 1.2.0-nightly
This is working in the nightly, and i am not getting the crash. I had another developer try and it works for him as well.
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/eclipsebutton_med.png)