Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Editor not opening .php that contains html
Editor not opening .php that contains html [message #78059] Tue, 12 August 2008 17:46 Go to next message
Shawn Clark is currently offline Shawn ClarkFriend
Messages: 70
Registered: July 2009
Member
Hi,

Not sure if this should be logged as a bug or not. I have noticed that
if I try to open a .php file that starts with html tags (ie mainly an
html page with some <?php ?> tags inside) the editor errors with the
below message. Is this something specific with the PDT editor or is it
an Eclipse Editor bug? If I right-click the file and select "Open With"
it shows the "PHP Editor" as being selected. If I select to open it in
the text editor then it shows up fine but has no syntax highlighting.

--
Shawn


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(StyledT ext.java:6376)
at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer .java:4442)
at
org.eclipse.jface.text.TextViewer.changeTextPresentation(Tex tViewer.java:4521)
at
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.applyTextRegionCollection(StructuredP resentationReconciler.java:1086)
at
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.processDamage(StructuredPresentationR econciler.java:1061)
at
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler$InternalListener.inputDocumentChanged (StructuredPresentationReconciler.java:470)
at
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.install(StructuredPresentationReconci ler.java:805)
at
org.eclipse.wst.sse.ui.internal.StructuredTextViewer.updateH ighlighter(StructuredTextViewer.java:933)
at
org.eclipse.wst.sse.ui.internal.StructuredTextViewer.setDocu ment(StructuredTextViewer.java:791)
at
org.eclipse.jface.text.source.SourceViewer.setDocument(Sourc eViewer.java:496)
at
org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourc eViewer(AbstractTextEditor.java:3807)
at
org.eclipse.ui.texteditor.AbstractTextEditor.createPartContr ol(AbstractTextEditor.java:3363)
at
org.eclipse.ui.texteditor.StatusTextEditor.createPartControl (StatusTextEditor.java:53)
at
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.create PartControl(AbstractDecoratedTextEditor.java:394)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.createPartContro l(StructuredTextEditor.java:1583)
at
org.eclipse.php.internal.ui.editor.PHPStructuredEditor.creat ePartControl(Unknown
Source)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
at
org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:266)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2820)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2729)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2721)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2673)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2668)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2652)
at
org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u.openEditor(OpenModelElementWithMenu.java:339)
at
org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u.access$0(OpenModelElementWithMenu.java:331)
at
org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u$2.handleEvent(OpenModelElementWithMenu.java:197)
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.ja va:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
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(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:382)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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)
Re: Editor not opening .php that contains html [message #78134 is a reply to message #78059] Wed, 13 August 2008 05:48 Go to previous messageGo to next message
Roy Ganor is currently offline Roy GanorFriend
Messages: 150
Registered: July 2009
Senior Member
What version do you use? what is your environment?

Seems like an important bug...


Shawn Clark wrote:
> Hi,

> Not sure if this should be logged as a bug or not. I have noticed that
> if I try to open a .php file that starts with html tags (ie mainly an
> html page with some <?php ?> tags inside) the editor errors with the
> below message. Is this something specific with the PDT editor or is it
> an Eclipse Editor bug? If I right-click the file and select "Open With"
> it shows the "PHP Editor" as being selected. If I select to open it in
> the text editor then it shows up fine but has no syntax highlighting.

> --
> Shawn


> 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(StyledT ext.java:6376)
> at org.eclipse.jface.text.TextViewer.addPresentation(TextViewer .java:4442)
> at
>
org.eclipse.jface.text.TextViewer.changeTextPresentation(Tex tViewer.java:4521)
> at
>
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.applyTextRegionCollection(StructuredP resentationReconciler.java:1086)
> at
>
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.processDamage(StructuredPresentationR econciler.java:1061)
> at
>
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler$InternalListener.inputDocumentChanged (StructuredPresentationReconciler.java:470)
> at
>
org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.install(StructuredPresentationReconci ler.java:805)
> at
>
org.eclipse.wst.sse.ui.internal.StructuredTextViewer.updateH ighlighter(StructuredTextViewer.java:933)
> at
>
org.eclipse.wst.sse.ui.internal.StructuredTextViewer.setDocu ment(StructuredTextViewer.java:791)
> at
> org.eclipse.jface.text.source.SourceViewer.setDocument(Sourc eViewer.java:496)
> at
>
org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourc eViewer(AbstractTextEditor.java:3807)
> at
>
org.eclipse.ui.texteditor.AbstractTextEditor.createPartContr ol(AbstractTextEditor.java:3363)
> at
>
org.eclipse.ui.texteditor.StatusTextEditor.createPartControl (StatusTextEditor.java:53)
> at
>
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.create PartControl(AbstractDecoratedTextEditor.java:394)
> at
>
org.eclipse.wst.sse.ui.StructuredTextEditor.createPartContro l(StructuredTextEditor.java:1583)
> at
>
org.eclipse.php.internal.ui.editor.PHPStructuredEditor.creat ePartControl(Unknown
> Source)
> at
>
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
> at
>
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
> at
> org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:266)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2820)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2729)
> at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2721)
> at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2673)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2668)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2652)
> at
>
org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u.openEditor(OpenModelElementWithMenu.java:339)
> at
>
org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u.access$0(OpenModelElementWithMenu.java:331)
> at
>
org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u$2.handleEvent(OpenModelElementWithMenu.java:197)
> 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.ja va:3823)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
> 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(Work bench.java:488)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
>
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
> at
>
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:382)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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)
Re: Editor not opening .php that contains html [message #78238 is a reply to message #78134] Thu, 14 August 2008 16:43 Go to previous message
Shawn Clark is currently offline Shawn ClarkFriend
Messages: 70
Registered: July 2009
Member
Bug Logged including environment settings:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=244205

Roy wrote:
> What version do you use? what is your environment?
> Seems like an important bug...
>
>
> Shawn Clark wrote:
>> Hi,
>
>> Not sure if this should be logged as a bug or not. I have noticed that
>> if I try to open a .php file that starts with html tags (ie mainly an
>> html page with some <?php ?> tags inside) the editor errors with the
>> below message. Is this something specific with the PDT editor or is it
>> an Eclipse Editor bug? If I right-click the file and select "Open
>> With" it shows the "PHP Editor" as being selected. If I select to open
>> it in the text editor then it shows up fine but has no syntax
>> highlighting.
>
>> --
>> Shawn
>
>
>> 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(StyledT ext.java:6376)
>>
>> at
>> org.eclipse.jface.text.TextViewer.addPresentation(TextViewer .java:4442)
>> at
> org.eclipse.jface.text.TextViewer.changeTextPresentation(Tex tViewer.java:4521)
>
>> at
> org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.applyTextRegionCollection(StructuredP resentationReconciler.java:1086)
>
>> at
> org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.processDamage(StructuredPresentationR econciler.java:1061)
>
>> at
> org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler$InternalListener.inputDocumentChanged (StructuredPresentationReconciler.java:470)
>
>> at
> org.eclipse.wst.sse.ui.internal.provisional.style.Structured PresentationReconciler.install(StructuredPresentationReconci ler.java:805)
>
>> at
> org.eclipse.wst.sse.ui.internal.StructuredTextViewer.updateH ighlighter(StructuredTextViewer.java:933)
>
>> at
> org.eclipse.wst.sse.ui.internal.StructuredTextViewer.setDocu ment(StructuredTextViewer.java:791)
>
>> at
>> org.eclipse.jface.text.source.SourceViewer.setDocument(Sourc eViewer.java:496)
>>
>> at
> org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourc eViewer(AbstractTextEditor.java:3807)
>
>> at
> org.eclipse.ui.texteditor.AbstractTextEditor.createPartContr ol(AbstractTextEditor.java:3363)
>
>> at
> org.eclipse.ui.texteditor.StatusTextEditor.createPartControl (StatusTextEditor.java:53)
>
>> at
> org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.create PartControl(AbstractDecoratedTextEditor.java:394)
>
>> at
> org.eclipse.wst.sse.ui.StructuredTextEditor.createPartContro l(StructuredTextEditor.java:1583)
>
>> at
> org.eclipse.php.internal.ui.editor.PHPStructuredEditor.creat ePartControl(Unknown
>
>> Source)
>> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
>
>> at
>> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:428)
>>
>> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
>
>> at
>> org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:266)
>>
>> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2820)
>
>> at
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2729)
>>
>> at
>> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2721)
>> at
>> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2673)
>> at
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2668)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2652)
>> at
> org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u.openEditor(OpenModelElementWithMenu.java:339)
>
>> at
> org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u.access$0(OpenModelElementWithMenu.java:331)
>
>> at
> org.eclipse.dltk.internal.ui.actions.OpenModelElementWithMen u$2.handleEvent(OpenModelElementWithMenu.java:197)
>
>> 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.ja va:3823)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>> 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(Work bench.java:488)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
>> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:382)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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)
>
>
Previous Topic:Open Method / Type
Next Topic:problem in executing a php script
Goto Forum:
  


Current Time: Sun Jan 29 07:04:53 GMT 2023

Powered by FUDForum. Page generated in 0.02794 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top