Hi Julien,
On 08/30/2010 06:51 PM, jurevert wrote:
Hi Marius,
Marius Dumitru Florea wrote:
Extending the link plugin is a bit easier because it already supports
external links. You just have to add a new menu entry (
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-cli…
) and create a new WizardStep to display your Alfresco document browser.
I can help you with this.
I'm trying to modify link plugin of gwt editor as you said and I don't know
exactly why but I can't compile the code. I have this sort of error :
Le type org.xwiki.gwt.user.client.ui.wizard.SourcesNavigationEvents ne peut
pas être résolu. Il est référencé indirectement à partir de fichiers .class
requis.
I'm using 2.4 XWiki release and in fact this class is not in the path, it's
true ! :)
Can you explain the reason of this error ? Is it a GWT developments
specificity ?
GWT compiler needs the Java sources (not just the bytecode, i.e. the
.class files that are usually found in a jar) to be able to generate the
JavaScript code. In you case, the compiler detects that
SourcesNavigationEvents interface is uses but is not able to find its
source code in order to convert it to JavaScript.
I think you are not building the WYSIWYG editor in the right way. In
http://lists.xwiki.org/pipermail/devs/2010-August/019653.html I
explained a bit how to build the WYSIWYG editor. To summarize:
* xwiki-gwt-dom, xwiki-gwt-user (which includes SourcesNavigationEvents)
and xwiki-gwt-wysiwyg-client modules generate jars when build. This jars
contain both the .class files and the .java (source) files. This GWT
modules are not directly compiled to JavaScript. In other words, when
you build these modules the GWT compiler is not called. Only the Java
compiler.
* xwiki-gwt-wysiwyg-server module generates a war with the JavaScript
code of the WYSIWYG editor, the rest of the client resource (style
sheets, images) and some jars that are needed on the server side (e.g.
the code that implements the GWT-RPC services used by the editor). The
GWT (i.e. Java) code from xwiki-gwt-dom, xwiki-gwt-user and
xwiki-gwt-wysiwyg-client jars is compiled to JavaScript while building
the xwiki-gwt-wysiwyg-server module.
* if you change classes in xwiki-gwt-wysiwyg-client you have to build it
with maven (mvn clean install) to generate the corresponding jar and
then build xwiki-gwt-wysiwyg-server (mvn clean install, with optional
-Pdev to generate only one permutation, for Firefox+En). In the end you
have to update the editor on your XWiki instance by removing
resources/js/xwiki/wysiwyg/xwe directory and copying the one from the war.
Note that I'm building from console, but I'm sure you can achieve the
same thing from Eclipse with m2eclipse.
Hope this helps,
Marius
Thanks,
Julien