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

Bug 370052

Summary: opening CSS with CSS editor causes stack trace
Product: z_Archived Reporter: Edson Richter <edsonrichter>
Component: WindowBuilderAssignee: Konstantin Scheglov <Konstantin.Scheglov>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: clayberg, laurent.caron, makki.messer, thatnitind
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
CSS that causes the stack trace
none
Screenshot of the issue
none
Additional screen show (error log)
none
Comment out the charset command in the first line and the css-file can be opened none

Description Edson Richter CLA 2012-01-28 16:48:36 EST
I'm trying to edit CSS, but I always get Stack Trace.
I'll attach the CSS. The stack trace is:

java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:4263)
	at org.eclipse.swt.SWT.error(SWT.java:4197)
	at org.eclipse.swt.SWT.error(SWT.java:4168)
	at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9680)
	at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9774)
	at org.eclipse.jface.text.TextViewer.applyTextPresentation(TextViewer.java:4836)
	at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4888)
	at org.eclipse.jface.text.presentation.PresentationReconciler.applyTextRegionCollection(PresentationReconciler.java:579)
	at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:568)
	at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:564)
	at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inputDocumentChanged(PresentationReconciler.java:119)
	at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2888)
	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2937)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:640)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:588)
	at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:4030)
	at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3558)
	at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:440)
	at org.eclipse.wb.internal.css.editors.multi.MultiPageEditor.super_createPartControl(MultiPageEditor.java:76)
	at org.eclipse.wb.internal.css.editors.multi.SourcePage.createControl(SourcePage.java:74)
	at org.eclipse.wb.internal.css.editors.multi.DefaultMultiMode.createTab(DefaultMultiMode.java:65)
	at org.eclipse.wb.internal.css.editors.multi.MultiPagesMode.create(MultiPagesMode.java:80)
	at org.eclipse.wb.internal.css.editors.multi.MultiPageEditor.createPartControl(MultiPageEditor.java:46)
	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.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:179)
	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:3755)
	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:129)
	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:578)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1411)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)





-- Configuration Details --
Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.wst.xml_ui.feature 3.3.1.v201108102009-7H7EFZ3DxumTlaI6nheRdHo2p1KaDIL1Uz-S3PL
Comment 1 Edson Richter CLA 2012-01-28 16:49:22 EST
Created attachment 210235 [details]
CSS that causes the stack trace
Comment 2 Nitin Dahyabhai CLA 2012-01-29 20:39:52 EST
Can you attach a file that does this consistently?
Comment 3 Edson Richter CLA 2012-01-29 20:54:11 EST
it is already there...
Comment 4 Nitin Dahyabhai CLA 2012-01-29 21:05:40 EST
Sorry, for some reason I only registered "stack trace".
Comment 5 Nick Sandonato CLA 2012-01-30 09:37:52 EST
Is this within WindowBuilder? I see nothing in here to indicate that it would be WTP's CSS Editor. Even opening this in our editor does not cause an exception to be thrown.
Comment 6 Edson Richter CLA 2012-01-30 10:44:58 EST
In Package Explorer, right click CSS file and then Open With...
Select "(S)Css Editor", whereas (S) is the icon at side.

You can see the attached screen shot for your reference.
Comment 7 Edson Richter CLA 2012-01-30 10:46:18 EST
Created attachment 210266 [details]
Screenshot of the issue
Comment 8 Edson Richter CLA 2012-01-30 10:49:34 EST
Created attachment 210267 [details]
Additional screen show (error log)
Comment 9 Nick Sandonato CLA 2012-01-30 11:19:54 EST
Looks like the WindowBuilder CSS editor.
Comment 10 Edson Richter CLA 2012-02-22 16:56:11 EST
(In reply to comment #9)
> Looks like the WindowBuilder CSS editor.
Hum, I've no idea about which editor is being used. Sorry, I don't know anything about Eclipse internals...
I just try to open CSS editor and get this error.
Comment 11 Andreas Groll CLA 2013-09-08 12:31:45 EDT
Created attachment 235284 [details]
Comment out the charset command in the first line and the css-file can be opened

I got the same error. Solved it by commenting out the Charset definition in the first line and the css file could be opened. See my attachment.
Comment 12 Laurent CARON CLA 2020-12-30 12:46:24 EST
The CSS editor of WB does not exist anymore => bug closed