Code Editor framework [message #1739363] |
Sat, 30 July 2016 12:27  |
Eclipse User |
|
|
|
I'd like to use the syntax highlighting code editor framework of e(fx)clipse. I have some familiarity with the standard Eclipse code editor framework (although not enough to start out of the box).
I've found some articles on Tomsondev blog, but they are primarily some highlights and I need some more. Are there any examples I can browse? Javadoc? A tutorial?
Also, I'd like to have features such as error/warning markers, code suggestions. I know they are present in the Eclipse standard framework, but have they also been implemented here yet?
|
|
|
|
|
|
|
|
Re: Code Editor framework [message #1740994 is a reply to message #1739566] |
Mon, 22 August 2016 05:23  |
Eclipse User |
|
|
|
I'm now trying to use the editor in a non-OSGi/Equinox environment, using the latest available on maven, 2.2.0 . As far as I know I've wired all the required objects, but e.g. the document partitioner is never called. To debug that I added the following code:
document.addDocumentPartitioningListener(new IDocumentPartitioningListener() {
@Override
public void documentPartitioningChanged(IDocument document) {
System.out.println("documentPartitioningChanged");
try {
System.out.println(" " + document.getPartition(0));
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
Without the "System.out.println(" " + document.getPartition(0));" I do get a notification, but no call to my document partitioner.
With the println the situation gets worse:
Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: org/eclipse/core/internal/runtime/Activator
at org.eclipse.core.runtime.SafeRunner.handleException(SafeRunner.java:55)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:44)
at org.eclipse.jface.text.AbstractDocument.log(AbstractDocument.java:1844)
at org.eclipse.jface.text.AbstractDocument.fireDocumentPartitioningChanged(AbstractDocument.java:619)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:755)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:736)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:721)
at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:796)
at org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1237)
at org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1217
|
|
|
Powered by
FUDForum. Page generated in 0.07940 seconds