Community
Participate
Working Groups
ViewerColumn should throw an AssertionException if the LabelProvider is missing for a column to provide a helpful error message.
Created attachment 151812 [details] added assertion
Wouldn't this potentially break existing code?
The patch changes a NPE to an AssertionFailedException exception to make it easier to locate a mistake in setting up the ColumnViewer. The NPE can only happen if you forgot to assign a LabelProvider and catching and handling this would be a very weird thing to do.
You are right, sorry for not realizing this (can be seen by just looking at the patch :-/ ). Patch released to HEAD.
Verified on Windows XP with I20091208-0100. Verified with both a simple test case without a label provider and source code inspection of ViewerColumn.java. Thanks for the patch, Ralf.