Community
Participate
Working Groups
Created attachment 145500 [details] exported Eclipse error log The PHP editor fails to open for some files. The problem started with the header.php file that comes with the default WordPress template, but I've narrowed it down to a reproducible example with the following code: <style type="text/css" media="screen"> <?php // Checks to see whether it needs a sidebar or not if ( empty($withcomments) && !is_single() ) { ?> #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; } <?php } ?> </style> If I start the file with just about any PHP code, such as <?php echo "hello world"; ?> for example, the problem goes away and the PHP editor will open. If I remove either of the "<?php ?>" blocks nested within the HTML (or CSS, in this example), the problem goes away. I'll paste the details of the stack trace here: java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:3865) at org.eclipse.swt.SWT.error(SWT.java:3799) at org.eclipse.swt.SWT.error(SWT.java:3770) at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9031) at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:7167) at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4776) at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4855) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.applyTextRegionCollection(StructuredPresentationReconciler.java:891) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.processDamage(StructuredPresentationReconciler.java:866) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler$InternalListener.inputDocumentChanged(StructuredPresentationReconciler.java:270) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.install(StructuredPresentationReconciler.java:599) at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.updateHighlighter(StructuredTextViewer.java:944) at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.setDocument(StructuredTextViewer.java:802) at org.eclipse.php.internal.ui.editor.PHPStructuredTextViewer.setDocument(PHPStructuredTextViewer.java:117) at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:500) at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3951) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3466) at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:427) at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1334) at org.eclipse.php.internal.ui.editor.PHPStructuredEditor.createPartControl(PHPStructuredEditor.java:1933) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) at org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMenu.openEditor(OpenModelElementWithMenu.java:339) at org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMenu.access$0(OpenModelElementWithMenu.java:331) at org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMenu$2.handleEvent(OpenModelElementWithMenu.java:197) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112) 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(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:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Created attachment 145501 [details] example code which reproduces the error
basically it is a WebTools common issue, think I patched it already in another issue...
Created attachment 180833 [details] When trying to open this file the error arises
I have this error to (Could not open the editor: Argument not valid) when trying to open a php file with inline css and php code. If i delete this: <style type="text/css"> .fotoFrame {width:<?php echo CFG_WIDTH_IMG; ?>px;height:<?php echo CFG_HEIGHT_IMG; ?>px; display:table-cell; vertical-align:middle; text-align:center; } </style> from the file, the editor opens the file successfully.
It does sound like bug 282218 which was fixed with WTP 3.1.1. Can someone who is experiencing this issue apply any available updates and retry the scenario, or whether the same content causes problems in the plain HTML Editor?
(In reply to comment #5) > It does sound like bug 282218 which was fixed with WTP 3.1.1. Can someone who > is experiencing this issue apply any available updates and retry the scenario, > or whether the same content causes problems in the plain HTML Editor? Thanks Nitin for you interest. I just run "Check for updates", and "not updates found" was the message. I opened the file with HTML Editor successfully, the problem is only with the PHP Editor apparently (I can also open the file with the Text Editor) Something Im thinking now I was working in this project for a few weeks. I installed Zend Studio Beta 8 plugin 2 days ago. I opened this file and had this error, so I blame the Zend Studio and unistalled it. But the problem continued. I can not assure if this began with Zend Studio plug in or not, because I was working with Eclipse 3.5 before (just updated to 3.6 for installing Zend Plug in) and I can open the file in Eclipse 3.5 with no problems. (I tried again just now) btw, I downloaded the PHP Developer Eclipse Helios, so as far as i know, I'm using the PDT for opening the PHP files. If you need any further information please let me know. Regards Alex
This is the full error log, It looks pretty similar to the posted by ghgodmode java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:4064) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9683) at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:7705) at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4803) at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4882) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.applyTextRegionCollection(StructuredPresentationReconciler.java:893) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.processDamage(StructuredPresentationReconciler.java:868) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler$InternalListener.inputDocumentChanged(StructuredPresentationReconciler.java:271) at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.install(StructuredPresentationReconciler.java:600) at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.updateHighlighter(StructuredTextViewer.java:920) at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.setDocument(StructuredTextViewer.java:802) at org.eclipse.php.internal.ui.editor.PHPStructuredTextViewer.setDocument(PHPStructuredTextViewer.java:638) at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:584) at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3873) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3401) at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:432) at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1453) at org.eclipse.php.internal.ui.editor.PHPStructuredEditor.createPartControl(PHPStructuredEditor.java:2243) 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.PartPane.setVisible(PartPane.java:313) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207) at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606) at org.eclipse.ui.internal.PartStack.add(PartStack.java:497) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103) at org.eclipse.ui.internal.PartStack.add(PartStack.java:483) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112) at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63) at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225) at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682) at org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:405) at org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:166) at org.eclipse.php.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:54) at org.eclipse.php.internal.ui.actions.OpenAction.run(OpenAction.java:177) at org.eclipse.php.internal.ui.actions.OpenAction.run(OpenAction.java:151) at org.eclipse.php.internal.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:190) at org.eclipse.php.internal.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:168) at org.eclipse.php.internal.ui.actions.PHPExplorerActionGroup.handleOpen(PHPExplorerActionGroup.java:144) at org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerPart$4.open(ScriptExplorerPart.java:667) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) 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:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 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:369) 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:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
According to the example and the log file, it is a duplicate of bug #326247
(In reply to comment #8) > According to the example and the log file, it is a duplicate of bug #326247 Hi Roy there are a few patches there, but not sure how to apply them. Do I have to download WebTools source code, apply the patches and re-compile the tools? (http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg23696.html) If so I think I'll wait until a new WebTools update is available and just use the TextEditor when the problem arises.
Actually it is a pdt-only patch that needs to be applied to your Helios SR1 release. You can use the update site mentioned in the other bug
mark as duplicate *** This bug has been marked as a duplicate of bug 326247 ***
Verified.