Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326890

Summary: StructuredTextViewer Exception
Product: [WebTools] WTP Source Editing Reporter: Anuj Mehta <anuj.mehta>
Component: wst.sseAssignee: wst.sse <wst.sse-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: ankur_sharma, nsand.dev
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Anuj Mehta CLA 2010-10-04 03:49:30 EDT
Build Identifier: M20100211-1343

I am getting Null pointer Exception while editing the css file. Following is the stack trace
java.lang.NullPointerException
at org.eclipse.wst.css.ui.internal.autoedit.StructuredAutoEditStrategyCSS$CompoundRegion.getType(StructuredAutoEditStrategyCSS.java:62)
at org.eclipse.wst.css.ui.internal.autoedit.StructuredAutoEditStrategyCSS.getPrevKeyRegion(StructuredAutoEditStrategyCSS.java:233)
at org.eclipse.wst.css.ui.internal.autoedit.StructuredAutoEditStrategyCSS.autoIndentAfterNewLine(StructuredAutoEditStrategyCSS.java:123)
at org.eclipse.wst.css.ui.internal.autoedit.StructuredAutoEditStrategyCSS.customizeDocumentCommand(StructuredAutoEditStrategyCSS.java:154)
at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3734)
at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3764)
at org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1276)
at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.handleVerifyEvent(StructuredTextViewer.java:706)
at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:433)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:6605)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:7446)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2442)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5817)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5842)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5542)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1368)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4053)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:346)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3946)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:342)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4619)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2411)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3501)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)




Reproducible: Always

Steps to Reproduce:
1.Create sample.css file.
2.In the sample .css file press Enter key  
3.Exception will be logged in the error log
Comment 1 Ankur Sharma CLA 2010-10-04 04:30:01 EDT
forwarding to WTP
Comment 2 Nick Sandonato CLA 2010-10-05 11:33:45 EDT
This problem was fixed in Helios. From your build identifier, it looks like you are still using Galileo. Upgrading to Helios should fix your problem.

Thanks.

*** This bug has been marked as a duplicate of bug 252983 ***