<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Cédric Bosdonnat - Eclipse</title><link href="https://bosdonnat.fr/" rel="alternate"></link><link href="https://bosdonnat.fr/feeds/tag/eclipse.atom.xml" rel="self"></link><id>https://bosdonnat.fr/</id><updated>2008-05-14T22:16:00+02:00</updated><subtitle>A geek's perspective</subtitle><entry><title>Eclipse RCP and AJAX</title><link href="https://bosdonnat.fr/eclipse-rcp-and-ajax.html" rel="alternate"></link><published>2008-05-14T22:16:00+02:00</published><updated>2008-05-14T22:16:00+02:00</updated><author><name>Cédric Bosdonnat</name></author><id>tag:bosdonnat.fr,2008-05-14:/eclipse-rcp-and-ajax.html</id><summary type="html">&lt;p&gt;Some time ago, I've discovered an Eclipse project which sounds
interesting to me. This project aims at providing an AJAX runtime target
for Eclipse RCP applications. I didn't have more time but to play a
little with the public demos. Thus I still wondered what is the gap for
an …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Some time ago, I've discovered an Eclipse project which sounds
interesting to me. This project aims at providing an AJAX runtime target
for Eclipse RCP applications. I didn't have more time but to play a
little with the public demos. Thus I still wondered what is the gap for
an Eclipse RCP applications developper before starting to create a RAP
application.&lt;/p&gt;
&lt;p&gt;Today I had some time to have a look at the sources of a RAP application
project. There is quite nothing more to do if you are already
programming Eclipse RCP applications as the differences are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding the &lt;code&gt;org.eclipse.rap.ui&lt;/code&gt; plugin to the dependencies.&lt;/li&gt;
&lt;li&gt;Importing the &lt;code&gt;javax.servlet&lt;/code&gt; and &lt;code&gt;javax.servlet.http&lt;/code&gt; packages&lt;/li&gt;
&lt;li&gt;Add an &lt;code&gt;org.eclipse.rap.ui.entrypoint&lt;/code&gt; extension to define the RAP
    application entry point&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To internationalization of a RAP application works also differently from
the standard Eclipse internationalization. This is described in the RAP
on-line help: internationalizing a RAP application shouldn't be a huge
problem.&lt;/p&gt;
&lt;p&gt;A RAP application can even be packaged in a WAR file as any other web
application. There is no wizard to perform this, but a sample Eclipse
feature projects with Ant build scripts are available on the Eclipse
CVS. There is also generic Equinox documentation on that topic at
&lt;a href="http://www.eclipse.org/equinox/server/http_in_container.php"&gt;http://www.eclipse.org/equinox/server/http_in_container.php&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thus creating a standard Web application by using the JFace and SWT APIs
is quite easy. When combined with &lt;a href="http://www.springframework.org/osgi"&gt;Spring-OSGi&lt;/a&gt;, let us imagine
creating powerful and sexy Web applications.&lt;/p&gt;
&lt;p&gt;The only thing I still would like to see before being a RAP fan is a
benchmark of an application used by hundreds or thousands of users. Does
it make a difference with toolkits like &lt;a href="http://code.google.com/webtoolkit/"&gt;GWT&lt;/a&gt; or &lt;a href="http://developer.yahoo.com/yui/"&gt;YUI&lt;/a&gt;? Can I use
RAP for business applications used every day by a whole company?  &lt;/p&gt;</content><category term="misc"></category><category term="Ajax"></category><category term="Eclipse"></category><category term="Java"></category></entry><entry><title>The Gecko and the Gull</title><link href="https://bosdonnat.fr/the-gecko-and-the-gull.html" rel="alternate"></link><published>2007-05-04T08:22:00+02:00</published><updated>2007-05-04T08:22:00+02:00</updated><author><name>Cédric Bosdonnat</name></author><id>tag:bosdonnat.fr,2007-05-04:/the-gecko-and-the-gull.html</id><summary type="html">&lt;p&gt;Is it a unknown fable from La Fontaine? Not really, in fact it
has more to do about OpenOffice.org and Mozilla. I was trying to tamper
with some web pages and I wanted to check whether we could integrate
easily a small web-browser inside OpenOffice.org.&lt;/p&gt;
&lt;p&gt;Hopefully, there is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Is it a unknown fable from La Fontaine? Not really, in fact it
has more to do about OpenOffice.org and Mozilla. I was trying to tamper
with some web pages and I wanted to check whether we could integrate
easily a small web-browser inside OpenOffice.org.&lt;/p&gt;
&lt;p&gt;Hopefully, there is an interesting feature coming up with Eclipse 3.3
which helps a lot: &lt;a href="http://download.eclipse.org/eclipse/downloads/drops/S-3.3M6-200703231616/eclipse-news-M6.html"&gt;SWT provides the ability to create a Browser&lt;/a&gt;
composite which runs the &lt;a href="http://en.wikipedia.org/wiki/XULRunner"&gt;xulrunner&lt;/a&gt; (&lt;a href="ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/"&gt;downloads&lt;/a&gt;). This means that
we could perfectly imagine a small Java extension to OpenOffice.org
which provides a UNO service to show any XUL or HTML page.&lt;/p&gt;
&lt;p&gt;Here is a small snippet I created to test this on windows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Display&lt;/span&gt; &lt;span class="n"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;Shell&lt;/span&gt; &lt;span class="n"&gt;shell&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Shell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;My OOo Browser&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setSize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setLayout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;GridLayout&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;org.eclipse.swt.browser.XULRunnerPath&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="s"&gt;&amp;quot;C:\\Documents and Settings\\Cbosdonnat\\Mes documents\\xulrunner&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;Browser&lt;/span&gt; &lt;span class="n"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Browser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SWT&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;MOZILLA&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setLayoutData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;GridData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GridData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;FILL_BOTH&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;http://fr.openoffice.org&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;isDisposed&lt;/span&gt; &lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readAndDispatch&lt;/span&gt; &lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;sleep&lt;/span&gt; &lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;dispose&lt;/span&gt; &lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I let you imagine the kind of interesting applications we could do using
this... Of course the same principle is working on Linux and I would
like to test it on MacOS, but I let you translate the above code for
it.  &lt;/p&gt;</content><category term="LibreOffice"></category><category term="Eclipse"></category><category term="Mozilla"></category><category term="OpenOffice.org"></category></entry></feed>