Menu

#9 Exception when used in Eclipse 3.4

open
nobody
None
5
2008-07-24
2008-07-24
No

java.lang.NullPointerException
at org.eclipse.ui.model.WorkbenchLabelProvider.getImage(WorkbenchLabelProvider.java:162)
at org.eclipse.jface.viewers.DecoratingLabelProvider.getImage(DecoratingLabelProvider.java:85)
at org.un4given.editorviewer.views.EditorViewerLabelProvider.getImage(EditorViewerLabelProvider.java:25)
at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getImage(WrappedViewerLabelProvider.java:117)
at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:165)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:145)

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Please correct this bug. This is a very useful plugin for me.

    Thank you.

     
  • Mihai Sz.

    Mihai Sz. - 2008-10-13

    I really miss this plugin in 3.4.x Eclipse.

     
  • Nobody/Anonymous

    This is a very useful plugin! Please amend this!

     
  • Jeff Schiller

    Jeff Schiller - 2009-05-01

    It seems that this plugin has bit-rotted and is not being maintained anymore? Fails with NullPointerExceptions in Eclipse 3.4

     
  • Nobody/Anonymous

    please anybody fix this bug. I need this plugin. (or is there an alternative plugin?)

     
  • Rémi Carton

    Rémi Carton - 2009-09-14

    I looked up -quickly- at this bug, it seems to be related to eclipse 3.3
    http://help.eclipse.org/help33/topic/org.eclipse.platform.doc.isv/porting/3.3/incompatibilities.html#jface-backcalls

    Basically you can either catch the nullpointer ex in EditorViewer//getImage() and return null, you won't have the icons for filetypes, but the plugin is still working.

    I'll try to figure out how to make the icons work, but I haven't got much time and I'm not an Eclipse expert. Plus I'm tinkering with 0.1.5 sources (could not find 0.1.6)

     
  • Mihai Sz.

    Mihai Sz. - 2009-09-14

    To return null, you will get into a lot of pop up messages from Eclipse (for each image this method returns null).
    Modify EditorViewerLabelProvider.getImage(Object element) method to return
    WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider().getImage(element);
    this worked for me.

     
  • Rémi Carton

    Rémi Carton - 2009-09-14

    Here is a fix for eclipse 3.4 : http://jophn.free.fr/dev/EditorViewer.zip
    Made on sources from version 0.5.1, a friend made the fix, credits aren't for me ;)

     
  • Rémi Carton

    Rémi Carton - 2009-09-14

    Quick note - the fix is not only catching the null, it makes the icons work! The catch is only a workaround, this is the 'real' fix :-)

     

Log in to post a comment.

MongoDB Logo MongoDB