Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » org.eclipse.jface.text.source.SourceViewer in standalone SWT/JFace application
org.eclipse.jface.text.source.SourceViewer in standalone SWT/JFace application [message #457705] Sun, 03 July 2005 10:50 Go to next message
Eclipse UserFriend
Originally posted by: prokopiev.stc.donpac.ru

Hi,

How can I use org.eclipse.jface.text.source.SourceViewer in in
standalone SWT/JFace application?

Code:

public class TestApp extends ApplicationWindow {

public TestApp() {
super(null);
}

protected Control createContents(Composite parent) {

Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new FillLayout());
new SourceViewer(container, null, SWT.BORDER | SWT.H_SCROLL |
SWT.V_SCROLL);
return parent;
}

public static void main(String[] args) throws IOException {
TestApp w = new TestApp();
w.setBlockOnOpen(true);
w.open();
}

}

jar files in project:

org.eclipse.core.resources_3.1.0.jar
org.eclipse.core.resources.compatibility_3.1.0.jar
org.eclipse.core.resources.linux_3.1.0.jar
org.eclipse.core.runtime_3.1.0.jar
org.eclipse.core.runtime.compatibility_3.1.0.jar
org.eclipse.jface_3.1.0.jar
org.eclipse.jface.text_3.1.0.jar
org.eclipse.osgi_3.1.0.jar
org.eclipse.swt_3.1.0.jar
org.eclipse.ui_3.1.0.jar
org.eclipse.ui.browser_3.1.0.jar
org.eclipse.ui.cheatsheets_3.1.0.jar
org.eclipse.ui.console_3.1.0.jar
org.eclipse.ui.editors_3.1.0.jar
org.eclipse.ui.externaltools_3.1.0.jar
org.eclipse.ui.forms_3.1.0.jar
org.eclipse.ui.ide_3.1.0.jar
org.eclipse.ui.intro_3.1.0.jar
org.eclipse.ui.presentations.r21_3.1.0.jar
org.eclipse.ui.views_3.1.0.jar
org.eclipse.ui.workbench_3.1.0.jar
org.eclipse.ui.workbench.texteditor_3.1.0.jar

Compilation is well but on running I got:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/jface/text/BadLocationException
at testapp.TestApp.createContents(TestApp.java:40)
at org.eclipse.jface.window.Window.create(Window.java:418)
at org.eclipse.jface.window.Window.open(Window.java:776)
at testapp.TestApp.main(TestApp.java:47)

Line 40 in TestApp.java is:

new SourceViewer(container, null, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);

Need I add any other jar into project? I can't find class
org.eclipse.jface.text.BadLocationException in any *jface*.jar in
Eclipse directory.


--
Thanks,
Eugene Prokopiev
Re: org.eclipse.jface.text.source.SourceViewer in standalone SWT/JFace application [message #457708 is a reply to message #457705] Sun, 03 July 2005 10:56 Go to previous message
Eclipse UserFriend
Originally posted by: prokopiev.stc.donpac.ru

> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/eclipse/jface/text/BadLocationException
> at testapp.TestApp.createContents(TestApp.java:40)
> at org.eclipse.jface.window.Window.create(Window.java:418)
> at org.eclipse.jface.window.Window.open(Window.java:776)
> at testapp.TestApp.main(TestApp.java:47)
>
> Line 40 in TestApp.java is:
>
> new SourceViewer(container, null, SWT.BORDER | SWT.H_SCROLL |
> SWT.V_SCROLL);
>
> Need I add any other jar into project? I can't find class
> org.eclipse.jface.text.BadLocationException in any *jface*.jar in
> Eclipse directory.

I found this class in org.eclipse.text_3.1.0.jar
Previous Topic:Roadmap for SWT?
Next Topic:SourceViewer example
Goto Forum:
  


Current Time: Tue Apr 16 21:11:25 GMT 2024

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

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

Back to the top