Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Editor throws NPE on enabled code folding as it parses a single line of a PHPDoc like comment
Editor throws NPE on enabled code folding as it parses a single line of a PHPDoc like comment [message #45747] Thu, 23 August 2007 13:13 Go to next message
Eclipse UserFriend
Originally posted by: Patrick.Schulz.brand-implementation-group.de

Regards: I20070816

Hi all,

I think it's a bug...

If I have a PHP file like this...

<?
/** PHPDoc like block comment */
?>

...the editor throws the NullPointerException shown below and doesn't come
up.
This is only the case as code folding as such is enabled. But...

<?
/* Simple block comment */

// OR

/**
PHPDoc like block comment
*/
?>

...works fine.

Sometimes, if the first example in PHPDoc like syntax comes up anywhere in
a function or at the end of a class definition or something like that, it
may not crash.

Best regards,
Patrick



Stacktrace:
java.lang.NullPointerException
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createCommentPosition(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createDocBlockAnnotations(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.createFileAnnotations(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterPHP.updateAdapter(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterHTML.updateAdapter(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.projection.ProjectionMod elNodeAdapterFactoryPHP.createAdapter(Unknown
Source)
at
org.eclipse.wst.sse.core.internal.provisional.AbstractAdapte rFactory.adaptNew(AbstractAdapterFactory.java:120)
at
org.eclipse.wst.sse.core.internal.provisional.AbstractAdapte rFactory.adapt(AbstractAdapterFactory.java:64)
at
org.eclipse.wst.sse.core.internal.provisional.AbstractNotifi er.getAdapterFor(AbstractNotifier.java:93)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.addAdapterToNodeAndChildren(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.addAllAdapters(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.initialize(Unknown
Source)
at
org.eclipse.php.internal.ui.folding.StructuredTextFoldingPro viderPHP.projectionEnabled(Unknown
Source)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.fi reProjectionEnabled(ProjectionViewer.java:481)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.en ableProjection(ProjectionViewer.java:529)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.do Operation(ProjectionViewer.java:1419)
at
org.eclipse.wst.sse.ui.internal.StructuredTextViewer.doOpera tion(StructuredTextViewer.java:502)
at
org.eclipse.php.internal.ui.editor.PHPStructuredTextViewer.d oOperation(Unknown
Source)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.installProjectio nSupport(StructuredTextEditor.java:2777)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.initializeSource Viewer(StructuredTextEditor.java:2722)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.createPartContro l(StructuredTextEditor.java:1726)
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:426)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
at
org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:263)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2721)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2633)
at
org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:2625)
at
org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2577)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2572)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2556)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2547)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
at
org.eclipse.php.internal.ui.util.EditorUtility.openInEditor( Unknown
Source)
at
org.eclipse.php.internal.ui.util.EditorUtility.openInEditor( Unknown
Source)
at org.eclipse.php.internal.ui.actions.OpenActionUtil.open(Unkn own
Source)
at org.eclipse.php.internal.ui.actions.OpenAction.run(Unknown
Source)
at org.eclipse.php.internal.ui.actions.OpenAction.run(Unknown
Source)
at
org.eclipse.php.internal.ui.actions.SelectionDispatchAction. dispatchRun(Unknown
Source)
at
org.eclipse.php.internal.ui.actions.SelectionDispatchAction. run(Unknown
Source)
at
org.eclipse.php.internal.ui.explorer.ExplorerActionGroup.han dleOpen(Unknown
Source)
at
org.eclipse.php.internal.ui.explorer.ExplorerPart$5.open(Unk nown Source)
at
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:19 3)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:818)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1079)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1183)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:263)
at
org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:257)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:297)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Re: Editor throws NPE on enabled code folding as it parses a single line of a PHPDoc like comment [message #45777 is a reply to message #45747] Thu, 23 August 2007 13:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Patrick.Schulz.brand-implementation-group.de

Oh I forgot, should I put it into bugzilla?
Re: Editor throws NPE on enabled code folding as it parses a single line of a PHPDoc like comment [message #46298 is a reply to message #45777] Fri, 24 August 2007 15:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pavel.kunc.google.com

I have more cases, see testing code:

NPE:
/**
* Enter description here...
*
* @return void
*/
function Test() {}

NPE:
/** Enter description here... */
function Test() {

}

I've turn on PHPDoc folding and Funciton folding.

Regards Pavel

On Thu, 23 Aug 2007 15:15:30 +0200,
<Patrick.Schulz@brand-implementation-group.de> wrote:

> Oh I forgot, should I put it into bugzilla?



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: Editor throws NPE on enabled code folding as it parses a single line of a PHPDoc like comment [message #46388 is a reply to message #46298] Sun, 26 August 2007 05:11 Go to previous messageGo to next message
Roy Ganor is currently offline Roy GanorFriend
Messages: 149
Registered: July 2009
Senior Member
fixed in CVS, thanx!

We are going to have an integration build this week.
Re: Editor throws NPE on enabled code folding as it parses a single line of a PHPDoc like comment [message #47740 is a reply to message #46388] Wed, 29 August 2007 11:00 Go to previous message
Eclipse UserFriend
Originally posted by: pavel.kunc.google.com

Thanks, I tried N20070828 and I can confirm both issuses are fixed.

Pavel

On Sun, 26 Aug 2007 07:11:59 +0200, Roy <roy@zend.com> wrote:

> fixed in CVS, thanx!
>
> We are going to have an integration build this week.
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:But this is a debug bug?
Next Topic:Outline View doesn't work with Subclipse
Goto Forum:
  


Current Time: Wed Jan 15 15:18:52 GMT 2025

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

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

Back to the top