• Switching Notes ID causes throwing of many errors in the UI

    By Michael Gollmick 1 decade ago

    When switching the ID the FileTreeLabelProvider.dispose() function is called which disposes the dir and the file objects. When the UI rebuilds after the ID switch the File Navigator and its objects are created newly and so is the FileTreeLabelProvider. Unfortunately its image objects dir and file are then still referenced somewhere else and since the destruction of the first FileTreeLabelProvider object disposed them, PlatformUI.getWorkbench().getSharedImages().getImage will return the same disposed image objects when the new FileTreeLabelProvider object is created. The outcome is a set of error messages (java.lang.IllegalArgumentException) in the UI.

    My workaround for now is to remove the dispose() method of the FileTreeLabelProvider class but I really don't know if this is ok. I would guess so, since the image objects are referenced somewhere else (porbably the IWorkbench ImageRegistry) and so should be disposed by that.

    • By Xiao Lei 1 decade ago

      Thanks for your help, this will be fixed in next version.