Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 240309 - [regression] "Could not open the editor: Argument not valid" message when you try to open a file with an error in php code.
Summary: [regression] "Could not open the editor: Argument not valid" message when you...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-10 07:15 EDT by Kalin CLA
Modified: 2020-05-14 11:46 EDT (History)
5 users (show)

See Also:


Attachments
Could not open the editor: Argument not valid (156.61 KB, image/pjpeg)
2008-07-10 07:15 EDT, Kalin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin CLA 2008-07-10 07:15:04 EDT
Created attachment 107057 [details]
Could not open the editor: Argument not valid

Create new PHP file and type the next code in PHP editor:
<?php
echo;   
?>

Save the file.
Double click on filename in PHP Explorer.

Expeted:
The file should be open successfully.


Actual:
The php file cannot be open. The user gets a message in PHP Editor field:
"Could not open the editor: Argument not valid"

See attachement for more details.



java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:3761)
	at org.eclipse.swt.SWT.error(SWT.java:3695)
	at org.eclipse.swt.SWT.error(SWT.java:3666)
	at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:7914)
	at org.eclipse.swt.custom.StyledText.replaceStyleRanges(StyledText.java:6376)
	at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer.java:4442)
	at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4521)
	at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.applyTextRegionCollection(StructuredPresentationReconciler.java:1086)
	at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler.processDamage(StructuredPresentationReconciler.java:1061)
	at org.eclipse.wst.sse.ui.internal.provisional.style.StructuredPresentationReconciler$InternalListener.textChanged(StructuredPresentationReconciler.java:613)
	at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2650)
	at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3293)
	at org.eclipse.jface.text.source.AnnotationPainter.invalidateTextPresentation(AnnotationPainter.java:962)
	at org.eclipse.jface.text.source.AnnotationPainter.updatePainting(AnnotationPainter.java:944)
	at org.eclipse.jface.text.source.AnnotationPainter.paint(AnnotationPainter.java:1654)
	at org.eclipse.ui.texteditor.SourceViewerDecorationSupport.updateAnnotationPainter(SourceViewerDecorationSupport.java:837)
	at org.eclipse.ui.texteditor.SourceViewerDecorationSupport.updateTextDecorations(SourceViewerDecorationSupport.java:322)
	at org.eclipse.ui.texteditor.SourceViewerDecorationSupport.install(SourceViewerDecorationSupport.java:285)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:396)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1583)
	at org.eclipse.php.internal.ui.editor.PHPStructuredEditor.createPartControl(Unknown Source)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:266)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2820)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2643)
	at org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:409)
	at org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:189)
	at org.eclipse.dltk.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:44)
	at org.eclipse.dltk.ui.actions.OpenAction.run(OpenAction.java:235)
	at org.eclipse.dltk.ui.actions.OpenAction.run(OpenAction.java:216)
	at org.eclipse.dltk.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:259)
	at org.eclipse.dltk.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:235)
	at org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerActionGroup.handleOpen(ScriptExplorerActionGroup.java:295)
	at org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerPart$5.open(ScriptExplorerPart.java:660)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:880)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297)
	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.Display.runDeferredEvents(Display.java:3823)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
	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:193)
	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:382)
	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:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Comment 1 Roy Ganor CLA 2008-07-10 12:26:33 EDT
Hi Kalin,
Please provide full description for the steps (1,2,3...)

I follow your description and nothing happen.

Comment 2 Sylvia Tancheva CLA 2008-07-11 02:38:12 EDT
Hi Roy,
It is exactly the same on my machine. Steps are:
1. Create a new php file
2. Paste the code:
<?php
echo;   
?>
3. Save the file and close it.
4. Try to open it again by double-click in PHP Explorer -> you get the error.

Seems that the error in the code is in some way responsible for that, although I tried with other files with different errors but they were opening without any problems. However this specific one does NOT!
I explained it to Gadi - I think he also tried.
Comment 3 Gadi Goldbarg CLA 2008-07-13 08:27:53 EDT
This happens on a file , and when it does - the projects in the explorer seem 
empty
Comment 4 Roy Ganor CLA 2008-07-14 08:50:06 EDT
you are right, I copy&paste it instead of typing it.

now it is fixed.
Comment 5 Gadi Goldbarg CLA 2008-09-29 06:34:45 EDT
Verified Fixed.
Tested under Eclipse SDK
Version: 3.4.1
Build id: M20080911-1700

PDT 2.0.0 v20080923-1839

[Kalin Yanev kalin.a@zend.com]
Comment 6 Roy Ganor CLA 2009-09-17 11:40:39 EDT
*** Bug 289735 has been marked as a duplicate of this bug. ***