Skip to main content



      Home
Home » Newcomers » Newcomers » Jface Viewer in Java Project??
Jface Viewer in Java Project?? [message #78843] Fri, 17 June 2005 23:39 Go to next message
Eclipse UserFriend
Is there a tutorial concerning Jface viewers, such as a TreeViewer, NOT in a
plugin? Or is this impossible? Thank you.
Re: Jface Viewer in Java Project?? [message #79135 is a reply to message #78843] Mon, 20 June 2005 16:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: myersj.gmail.com

J. Michael,

See: http://www-106.ibm.com/developerworks/opensource/library/os- ecgui1/
And: https://bugs.eclipse.org/bugs/show_bug.cgi?id=49497

Hope this helps,
- Jeff


J. Michael Dean wrote:
> Is there a tutorial concerning Jface viewers, such as a TreeViewer, NOT in a
> plugin? Or is this impossible? Thank you.
>
>
Re: Jface Viewer in Java Project?? [message #79642 is a reply to message #79135] Wed, 22 June 2005 07:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: BertinK.tiscali.nl

maybe you found out yourself, there is also a part two

http://www-106.ibm.com/developerworks/opensource/library/os- ecgui2/

and a part three

http://www-106.ibm.com/developerworks/opensource/library/os- ecgui3/


"Jeff Myers" <myersj@gmail.com> wrote in message
news:d97ahi$cl1$1@news.eclipse.org...
> J. Michael,
>
> See: http://www-106.ibm.com/developerworks/opensource/library/os- ecgui1/
> And: https://bugs.eclipse.org/bugs/show_bug.cgi?id=49497
>
> Hope this helps,
> - Jeff
>
>
> J. Michael Dean wrote:
>> Is there a tutorial concerning Jface viewers, such as a TreeViewer, NOT
>> in a
>> plugin? Or is this impossible? Thank you.
>>
Re: Jface Viewer in Java Project?? [message #80253 is a reply to message #79642] Thu, 23 June 2005 18:37 Go to previous message
Eclipse UserFriend
Thanks for the quick response. I did not convey my question properly. I am
trying to get a TreeViewer to work with an object tree that I retrieve via
Hibernate, but am stymied at a much earlier point. I have a Junit test that
sets up a shell, and then displays a label widget in a shell; after that, I
try to test a viewer, but it fails:

public class TestWidgets extends TestCase {


Display display = null;

Shell shell = null;

Label label = null;



protected void setUp() throws Exception {

super.setUp();

display = new Display();

shell = new Shell(display);


}




public void testLabelWidget() {

label = new Label (shell, SWT.CENTER);

label.setText("Hello world");

label.setBounds(shell.getClientArea());

shell.open();

while (!shell.isDisposed ()) {

if (!display.readAndDispatch ()) display.sleep (); }

display.dispose ();
}



NOTE - I CAN INSERT A SERIES OF LABEL WIDGET TESTS HERE, WITH DIFFERENT
NAMES, AND THEY ALL WORK IN SEQUENCE AS I CLOSE EACH SWT SHELL. THE NEXT
TEST FAILS, HOWEVER:

public void testListWidget(){

ListViewer viewer = new ListViewer(shell);
//ERROR OCCURS HERE
//viewer.setContentProvider(new TrialTreeContentProvider());

//viewer.setLabelProvider(new TrialTreeLabelProvider());

shell.open();

while (!shell.isDisposed ()) {

if (!display.readAndDispatch ()) display.sleep ();
}

display.dispose ();

}


}

BUT I get an error here, fired at the ListViewer viewer = new
ListViewer(shell):

java.lang.NoClassDefFoundError: org/eclipse/core/runtime/ISafeRunnable

at edu.utah.cdmcc.test.TestWidgets.testListWidget(TestWidgets.j ava:48)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
junit.framework.TestCase.runTest(TestCase.java:154)
at
junit.framework.TestCase.runBare(TestCase.java:127)
at
junit.framework.TestResult$1.protect(TestResult.java:106)
at
junit.framework.TestResult.runProtected(TestResult.java:124)
at
junit.framework.TestResult.run(TestResult.java:109)
at
junit.framework.TestCase.run(TestCase.java:118)
at
junit.framework.TestSuite.runTest(TestSuite.java:208)
at
junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRu
nner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.
java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner
..java:196)



On 6/22/05 5:51 AM, in article d9bjck$25a$1@news.eclipse.org, "Bertin"
<BertinK@tiscali.nl> wrote:

> maybe you found out yourself, there is also a part two
>
> http://www-106.ibm.com/developerworks/opensource/library/os- ecgui2/
>
> and a part three
>
> http://www-106.ibm.com/developerworks/opensource/library/os- ecgui3/
>
>
> "Jeff Myers" <myersj@gmail.com> wrote in message
> news:d97ahi$cl1$1@news.eclipse.org...
>> J. Michael,
>>
>> See: http://www-106.ibm.com/developerworks/opensource/library/os- ecgui1/
>> And: https://bugs.eclipse.org/bugs/show_bug.cgi?id=49497
>>
>> Hope this helps,
>> - Jeff
>>
>>
>> J. Michael Dean wrote:
>>> Is there a tutorial concerning Jface viewers, such as a TreeViewer, NOT
>>> in a
>>> plugin? Or is this impossible? Thank you.
>>>
>
Previous Topic:Eclipse 3.0 RCP Export Wizard
Next Topic:Installtion of EMF plugin
Goto Forum:
  


Current Time: Sat May 10 06:58:41 EDT 2025

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

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

Back to the top