Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-vex-dev] documentation or example of use of vex in an applet

Am Freitag, den 27.04.2012, 20:22 +0200 schrieb Florian Thienel:
> The repository at github contains an Eclipse Plug-in project. You need 
> to get it (via 'git clone git://github.com/ftl/vex-examples.git' or as 
> download https://github.com/ftl/vex-examples/zipball/master) and import 
> it into Eclipse.
yes that was what I did
> 
> To run it, create a new launch configuration of type "Eclipse 
> Application" (the defaults should work fine in the first place). You can 
> find the interesting code in ft.vex.examples.dialog.CommentDialog.
this fails with many missing dependencies
!SESSION 2012-04-28 13:58:40.798
-----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments:  -product org.eclipse.platform.ide
Command-line arguments:  -product org.eclipse.platform.ide
-data /home/jonas/programming/java/../runtime-EclipseApplication -dev
file:/home/jonas/programming/java/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY org.eclipse.osgi 2 0 2012-04-28 13:58:46.181
!MESSAGE One or more bundles are not resolved because the following root
constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.182
!MESSAGE Bundle
reference:file:/home/jonas/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/org.w3c.dom.svg_1.1.0.v200806040011.jar was not resolved.
!SUBENTRY 2 org.w3c.dom.svg 2 0 2012-04-28 13:58:46.183
!MESSAGE Missing required bundle org.w3c.dom.smil_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.184
!MESSAGE Bundle
reference:file:/home/jonas/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/org.eclipse.m2e.usagedata_1.0.100.20110804-1717.jar was not resolved.
!SUBENTRY 2 org.eclipse.m2e.usagedata 2 0 2012-04-28 13:58:46.184
!MESSAGE Missing required bundle
org.eclipse.epp.usagedata.gathering_0.0.0.

!ENTRY org.eclipse.osgi 2 0 2012-04-28 13:58:46.198
!MESSAGE The following is a complete list of bundles which are not
resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.198
!MESSAGE Bundle org.apache.batik.css_1.7.0.v201011041433 [19] was not
resolved.
!SUBENTRY 2 org.apache.batik.css 2 0 2012-04-28 13:58:46.198
!MESSAGE Missing imported package org.w3c.dom.svg_[1.1.0,1.3.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.198
!MESSAGE Bundle org.eclipse.m2e.usagedata_1.0.100.20110804-1717 [222]
was not resolved.
!SUBENTRY 2 org.eclipse.m2e.usagedata 2 0 2012-04-28 13:58:46.198
!MESSAGE Missing required bundle
org.eclipse.epp.usagedata.gathering_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.199
!MESSAGE Bundle org.eclipse.vex.core_1.0.0.201201040405 [283] was not
resolved.
!SUBENTRY 2 org.eclipse.vex.core 2 0 2012-04-28 13:58:46.199
!MESSAGE Missing required bundle org.apache.batik.css_1.7.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.199
!MESSAGE Bundle org.eclipse.vex.dita_1.0.0.201201040405 [284] was not
resolved.
!SUBENTRY 2 org.eclipse.vex.dita 2 0 2012-04-28 13:58:46.200
!MESSAGE Missing required bundle org.eclipse.vex.core_[1.0.0,2.0.0).
!SUBENTRY 2 org.eclipse.vex.dita 2 0 2012-04-28 13:58:46.200
!MESSAGE Missing required bundle org.eclipse.vex.ui_[1.0.0,2.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.200
!MESSAGE Bundle org.eclipse.vex.docbook_1.0.0.201201040405 [285] was not
resolved.
!SUBENTRY 2 org.eclipse.vex.docbook 2 0 2012-04-28 13:58:46.201
!MESSAGE Missing required bundle org.eclipse.vex.core_[1.0.0,2.0.0).
!SUBENTRY 2 org.eclipse.vex.docbook 2 0 2012-04-28 13:58:46.201
!MESSAGE Missing required bundle org.eclipse.vex.ui_[1.0.0,2.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.201
!MESSAGE Bundle org.eclipse.vex.projectplan_1.0.0.201201040405 [287] was
not resolved.
!SUBENTRY 2 org.eclipse.vex.projectplan 2 0 2012-04-28 13:58:46.201
!MESSAGE Missing required bundle org.eclipse.vex.ui_[1.0.0,2.0.0).
!SUBENTRY 2 org.eclipse.vex.projectplan 2 0 2012-04-28 13:58:46.201
!MESSAGE Missing required bundle org.eclipse.vex.xhtml_[1.0.0,2.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.202
!MESSAGE Bundle org.eclipse.vex.ui_1.0.0.201201040405 [288] was not
resolved.
!SUBENTRY 2 org.eclipse.vex.ui 2 0 2012-04-28 13:58:46.202
!MESSAGE Missing required bundle org.eclipse.vex.core_[1.0.0,2.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.202
!MESSAGE Bundle org.eclipse.vex.xhtml_1.0.0.201201040405 [289] was not
resolved.
!SUBENTRY 2 org.eclipse.vex.xhtml 2 0 2012-04-28 13:58:46.202
!MESSAGE Missing required bundle org.eclipse.vex.ui_[1.0.0,2.0.0).
!SUBENTRY 2 org.eclipse.vex.xhtml 2 0 2012-04-28 13:58:46.202
!MESSAGE Missing required bundle org.eclipse.vex.core_[1.0.0,2.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.203
!MESSAGE Bundle org.w3c.dom.svg_1.1.0.v200806040011 [331] was not
resolved.
!SUBENTRY 2 org.w3c.dom.svg 2 0 2012-04-28 13:58:46.203
!MESSAGE Missing required bundle org.w3c.dom.smil_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-04-28 13:58:46.203
!MESSAGE Bundle ft.vex.examples.dialog_1.0.0.qualifier [466] was not
resolved.
!SUBENTRY 2 ft.vex.examples.dialog 2 0 2012-04-28 13:58:46.203
!MESSAGE Missing required bundle org.eclipse.vex.core_1.0.0.
!SUBENTRY 2 ft.vex.examples.dialog 2 0 2012-04-28 13:58:46.203
!MESSAGE Missing required bundle org.eclipse.vex.ui_1.0.0.


I set up an repo with my code, where I try to port it to a pure swt
panel... and an applet in the future... 
https://github.com/jbrekle/vex-applet
but when I enter any character into the widget, i get an exception:
Exception in thread "main" java.lang.NullPointerException
	at
org.eclipse.wst.xml.core.internal.contentmodel.factory.CMDocumentFactoryRegistryReader.readRegistry(CMDocumentFactoryRegistryReader.java:43)
	at
org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager.getCMDocumentFactoryRegistry(ContentModelManager.java:63)
	at
org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager.createCMDocument(ContentModelManager.java:55)
	at
org.eclipse.vex.core.internal.dom.DocumentContentModel.createCMDocument(DocumentContentModel.java:80)
	at
org.eclipse.vex.core.internal.dom.DocumentContentModel.getDTD(DocumentContentModel.java:74)
	at
org.eclipse.vex.core.internal.validator.WTPVEXValidator.getDTD(WTPVEXValidator.java:112)
	at
org.eclipse.vex.core.internal.validator.WTPVEXValidator.getSchema(WTPVEXValidator.java:82)
	at
org.eclipse.vex.core.internal.validator.WTPVEXValidator.isValidSequence(WTPVEXValidator.java:277)
	at
org.eclipse.vex.core.internal.validator.WTPVEXValidator.isValidSequence(WTPVEXValidator.java:312)
	at
org.eclipse.vex.core.internal.dom.Document.insertText(Document.java:486)
	at
org.eclipse.vex.core.internal.widget.VexWidgetImpl.insertChar(VexWidgetImpl.java:668)
	at
org.eclipse.vex.ui.internal.swt.VexWidget.insertChar(VexWidget.java:267)
	at org.eclipse.vex.ui.internal.swt.VexWidget
$5.keyPressed(VexWidget.java:569)
	at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
	at org.eclipse.swt.widgets.Widget.sendIMKeyEvent(Widget.java:1344)
	at org.eclipse.swt.widgets.Control.gtk_commit(Control.java:2840)
	at org.eclipse.swt.widgets.Canvas.gtk_commit(Canvas.java:160)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1733)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5016)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4408)
	at
org.eclipse.swt.internal.gtk.OS._gtk_im_context_filter_keypress(Native
Method)
	at
org.eclipse.swt.internal.gtk.OS.gtk_im_context_filter_keypress(OS.java:7821)
	at org.eclipse.swt.widgets.Control.filterKey(Control.java:2250)
	at
org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3012)
	at
org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5016)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4408)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8422)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1245)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
Method)
	at
org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2276)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3207)
	at jb.vex.examples.panel.VexPanel.main(VexPanel.java:79)

all this is probably some weird dependency issue...

also i found that VEXCorePlugin has a strange implementation of a
singleton... shouldn't getInstance create the instance if it doesn't
exist yet? i have to call the constructor manually to avoid a null
pointer exception:
Exception in thread "main" java.lang.NullPointerException
	at
org.eclipse.vex.core.internal.layout.RootBox.layout(RootBox.java:140)
	at
org.eclipse.vex.core.internal.widget.VexWidgetImpl.iterateLayout(VexWidgetImpl.java:1319)
	at
org.eclipse.vex.core.internal.widget.VexWidgetImpl.relayout(VexWidgetImpl.java:1390)
	at
org.eclipse.vex.core.internal.widget.VexWidgetImpl.moveTo(VexWidgetImpl.java:816)
	at
org.eclipse.vex.core.internal.widget.VexWidgetImpl.moveTo(VexWidgetImpl.java:772)
	at
org.eclipse.vex.core.internal.widget.VexWidgetImpl.setDocument(VexWidgetImpl.java:1073)
	at
org.eclipse.vex.ui.internal.swt.VexWidget.setDocument(VexWidget.java:393)
	at jb.vex.examples.panel.VexPanel.main(VexPanel.java:65)


Thanks for the support!

> 
> Florian
> 
> 
> Am 27.04.2012 20:15, schrieb Jonas Brekle:
> > thank you for the quick reply.
> >
> > what kind of dialog is this? how do I run it?
> >
> > Am Freitag, den 27.04.2012, 19:14 +0200 schrieb Florian Thienel:
> >> Hi Jonas,
> >>
> >> there is this little example project that I built for an article in the
> >> German Eclipse Magazin: https://github.com/ftl/vex-examples. It uses Vex
> >> as a widget within a dialog. This might hopefully be what you were
> >> looking for.
> >>
> >> Vex does not have a public API yet, this means
> >> 1) we give no guarantee yet that everything will stay as it is today
> >> 2) if you need any functionality exposed, it is no problem to do this.
> >>
> >> If you find any problems or need help, don't hesitate to contact us.
> >>
> >> Best Regards,
> >>
> >> Florian
> >>
> >> Am 27.04.2012 19:03, schrieb Jonas Brekle:
> >>> Hi,
> >>>
> >>> the documentation on sourceforge says "The Vex editor widget is
> >>> available as a pure Java, cross-platform component with bindings to
> >>> Swing and SWT. Developers can re-use this widget, for example as an
> >>> applet in a web-based application."
> >>>
> >>> I would like to do that. I plan to setup a Wiki to collaboratively edit
> >>> some XML files and would like to pack vex into an applet that is a word
> >>> processor / WYSIWYG editor that validates the input client side against
> >>> a XSD and does some smart auto completion. At best it uses a nice CSS to
> >>> hide as much XML-syntax as possible to be non-programmer-friendly, but
> >>> thats optional.
> >>>
> >>> Has something like this been done before? Any project where I can see it
> >>> working? :)
> >>> I am not familiar with Vex or Eclipse RCP stuff but would be willing to
> >>> invest some time to get into it, as its for my master thesis...
> >>> Any hints for me?
> >>>
> >>> Regards,
> >>> Jonas	
> >>>
> >>> _______________________________________________
> >>> mylyn-vex-dev mailing list
> >>> mylyn-vex-dev@xxxxxxxxxxx
> >>> http://dev.eclipse.org/mailman/listinfo/mylyn-vex-dev
> >> _______________________________________________
> >> mylyn-vex-dev mailing list
> >> mylyn-vex-dev@xxxxxxxxxxx
> >> http://dev.eclipse.org/mailman/listinfo/mylyn-vex-dev
> >
> >
> > _______________________________________________
> > mylyn-vex-dev mailing list
> > mylyn-vex-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/mylyn-vex-dev
> _______________________________________________
> mylyn-vex-dev mailing list
> mylyn-vex-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/mylyn-vex-dev




Back to the top