Extending Eclipse WSIWYG Plugin

Hi All,

I want to extend Vaading eclipse plugin for generating xml files. I could not find the source code of the plugin, plugin also does not have any extention point for that purpose. how can I find the source code of the plugin?

I am going to generate two files:

1 XML file for widget definitions (i.e layouts, widget properties etc.)
1 java file for event/action handling.

thanks alot,
Alper.

You can find the source code in SVN:
http://dev.vaadin.com/svn/wysiwyg/eclipse-plugin/
.

The visual editor uses a simple model that is in
http://dev.vaadin.com/svn/wysiwyg/eclipse-plugin/VisualDesigner/src/com/vaadin/visualdesigner/model/
. This model is communicated between the visual editor part (a Vaadin application) and the Eclipse plugin (Java generation and parsing). In your case, you might want to bypass most or all of the Java parser/generator code and work directly with the model.

The generic parts of the Java parser and generator are in
http://dev.vaadin.com/svn/wysiwyg/eclipse-plugin/VisualDesigner/src/com/vaadin/visualdesigner/java/
(also containing a prototype of a text only Java parser and generator, but it is not very robust or otherwise finished). The Eclipse specific parts of parsing and generation are in
http://dev.vaadin.com/svn/wysiwyg/eclipse-plugin/src/com/vaadin/visualdesigner/eclipse/java/
.

Note that there are some special cases in the parsers and generators for certain layouts and components, so you would need to take them into account.

It would be interesting to hear back if you make progress with this.

Hi Henri,

I’ve started to implement through my needs. Actually, XML ->Internl model-> Component and vice versa transformations are done.
I changed mainLayout handling, the mainlayout is kept in another ComponentModel and this component model is a member of EditorModel (not just the LayoutClassName but the related properties are being kept in this component model)

The XML structure is like this:
[font=Courier New]
[
[size=2]

<?xml version="1.0" encoding="UTF-8" standalone="no"?> [color=#e81554]

false

980px

100.0%

true

[/color]

100.0%

100.0%

false

100.0%

100.0%

false

false

-1px

-1px

top:22.0px;left:22.0px;

Button

false

200px

-1px

top:22.0px;left:242.0px;

true

310px

120px

top:22.0px;left:492.0px;

false

100.0%

100.0%

false

Tab

Button

false

-1px

-1px

top:19.0px;left:29.0px;

[/size]
[/font]

Meanwhile, I found a small bug (I guess) in ComponentHierarcy class constructor while adding the action handler; If the “target” is null editor fails to open.
[font=Courier New]
[
[size=2]

public Action[] getActions(Object target, Object sender) {

			List<Action> actions = new ArrayList<Action>();


if (target != null) {

// Allow deleting item if it is not the root or direct child
// of the root component nor panel content
boolean isRootOrChildOfRoot = (target instanceof RootComponent || ((Component) target).getParent() instanceof RootComponent);
boolean isPanelContent = ((Component) target).getParent() instanceof Panel;
boolean isLoginFormContent = ((Component) target).getParent() instanceof LoginForm;
if (!isRootOrChildOfRoot && !isPanelContent && !isLoginFormContent) {
actions.add(ACTION_DELETE);
}


}

[/size]
[/font]

I will inform you for further progresses.

Great that you got started this quickly.
The change concerning mainLayout is something I have also been contemplating for quite a while but never took the time to do, so probably coming to the trunk at some point.

I created
ticket #7167
about this.
If you find other bugs, please
report them directly
.

Hello!
Faced the same challenge - Mr. Alper Turkyilmaz could your show how to get from the Visual editor of this XML?

Hello! Is it possible to run the Visual editor with Vaadin 7?

There is no official version of the visual editor with XML support at the moment. If Alper implemented such support, maybe he can provide the necessary extensions to it.

Visual editor does not support Vaadin 7 at the moment, although some things might (or might not) work. Proper support for Vaadin 7 will probably be implemented close to the release of Vaadin 7.

Unfortunately, no implementation to support V7 from my side…
kinds,

Mr. Alper Turkyilmaz, could show your method how to get from the Visual editor of demonstrated XML?

Hi Bred,

I typically followed the steps what Henri explained in this thread (Model is the key point). Since this XML editor is becoming a part of a commercial product, I couldn’t tell the details of the implementation sorry for that. But Ikarus Visual Editor, is composition of the following:

  • XML based layouting (rendering)
  • Event handler implementation in Java (events are impleneted in java)
  • a visual editor enriched with ikarus widgets

kinds,
Alper.
12390.png
12391.png
12392.png

Hello,

I want to extend the Vaadin Eclipse Plugin as well.
I followed your links and checked out the source code from the svn repository.
But after importing the project in Eclipse I get the following Build errors:

Unbound classpath variable: 'VAADIN_DOWNLOAD/gwt-dev/2.1.1/gwt-dev.jar' in project
Unbound classpath variable: 'VAADIN_DOWNLOAD/gwt-user/2.1.1/gwt-user.jar' in project

The variable VAADIN_DOWNLOAD is defined by the Vaadin Eclipse plug-in, pointing to the directory in which automatically downloaded GWT files etc. are put. However, you can also just replace those classpath entries with ones pointing to the corresponding files you have downloaded yourself or maybe define the classpath variable by hand in Eclipse preferences.

Note that the GWT version used there is old, matching the old Vaadin version in the visual editor. I would recommend not upgrading it unless you are willing to check whether all the add-ons used there work with the latest Vaadin version and maybe update them etc. I would expect the visual editor to switch to a new Vaadin version sometime in the future.

Hi All,
I’ve changed the Vaadin verison of the editor plugin to 6.7.9 and did not face any problem yet.

for your information…
Alper

Hi Alper,
Looks very interesting indeed! Any comments on how you plan to handle addons? I saw your note on the Clara Addon page, have you looked at VulComposer also? It seems to be barking upa very similar tree, and strongly influenced by ZK, (which I also work with).

Any ideas when your tools will be available? I’m particularly impressed with and interested in the screen designer.
Regards,
Anthony