Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ListViewer runtime error
ListViewer runtime error [message #446147] Wed, 17 November 2004 19:53 Go to next message
Pierce is currently offline PierceFriend
Messages: 42
Registered: July 2009
Member
My apologies for asking a JFace question in the SWT group, but I don't see
a JFace group listed in the categories on the eclipse.org website.

I am trying to use a ListViewer in a Dialog. To this end I am looking at
the SectionsDialog source in the readmetool example source. My platform
is Windows 2000, and the source of my dialog class is as follows:

public class OpenPatientDialog
//extends ViewPart
extends Dialog
implements
SelectionListener {
protected IAdaptable input; // test only, remove later
public OpenPatientDialog(Shell arg0, String title) {
super(arg0);
m_title = title;
}
...
protected Control createDialogArea(Composite parent) {

...
// following is functionally verbatim from the example
List list = new List(grp, SWT.BORDER);
GridData data = new GridData(GridData.FILL_BOTH);
list.setLayoutData(data);
ListViewer viewer = new ListViewer(list);
viewer.setContentProvider(new WorkbenchContentProvider());
viewer.setLabelProvider(new WorkbenchLabelProvider());
viewer.setInput(input);
...
}
...
}

At runtime, the error I get is the following:

Unhandled event loop exception
Reason:
org/eclipse/ui/model/WorkbenchContentProvider

The code I have above is functionally the same as the example, meaning the
only change is the names of some of the variables (like the name of the
composite used to create the List object).

Any ideas?
Re: ListViewer runtime error [message #446199 is a reply to message #446147] Fri, 19 November 2004 22:27 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
jface questions should be asked on the eclipse.platform newsgroup.

"Pierce Krouse" <pkrouse@austin.rr.com> wrote in message
news:cnga8m$qul$1@www.eclipse.org...
> My apologies for asking a JFace question in the SWT group, but I don't see
> a JFace group listed in the categories on the eclipse.org website.
>
> I am trying to use a ListViewer in a Dialog. To this end I am looking at
> the SectionsDialog source in the readmetool example source. My platform
> is Windows 2000, and the source of my dialog class is as follows:
>
> public class OpenPatientDialog
> //extends ViewPart
> extends Dialog
> implements
> SelectionListener {
> protected IAdaptable input; // test only, remove later
> public OpenPatientDialog(Shell arg0, String title) {
> super(arg0);
> m_title = title;
> }
> ..
> protected Control createDialogArea(Composite parent) {
>
> ..
> // following is functionally verbatim from the example
> List list = new List(grp, SWT.BORDER);
> GridData data = new GridData(GridData.FILL_BOTH);
> list.setLayoutData(data);
> ListViewer viewer = new ListViewer(list);
> viewer.setContentProvider(new WorkbenchContentProvider());
> viewer.setLabelProvider(new WorkbenchLabelProvider());
> viewer.setInput(input);
> ..
> }
> ..
> }
>
> At runtime, the error I get is the following:
>
> Unhandled event loop exception
> Reason:
> org/eclipse/ui/model/WorkbenchContentProvider
>
> The code I have above is functionally the same as the example, meaning the
> only change is the names of some of the variables (like the name of the
> composite used to create the List object).
>
> Any ideas?
>
>
Previous Topic:eclipse Preferences
Next Topic:yet another library path issue
Goto Forum:
  


Current Time: Sat Apr 27 04:31:26 GMT 2024

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

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

Back to the top