Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Virgo + RAP + OSGi: Extension Points and Fancy Theme
Virgo + RAP + OSGi: Extension Points and Fancy Theme [message #1037285] Tue, 09 April 2013 07:30 Go to next message
Tobias P. is currently offline Tobias P.
Messages: 43
Registered: April 2012
Member
Hello guys,

as mentioned in another thread, we are developing an OSGi based application together with RAP 2.0

The target runtime is Eclipse Virgo 3.6.0

The Application is deployed as a .jar file.

My rap-context.xml looks as follows

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
			http://www.springframework.org/schema/context 
			http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="de.hswt.stoffident.ui"/>
	<context:annotation-config />

	<bean id="simpleConfiguration" class="de.hswt.stoffident.ui.SIApplicationConfiguration" />

</beans>


And the SIApplicationConfiguration like


public void configure(Application application) {
		Map<String, String> properties = new HashMap<String, String>();
		properties.put(WebClient.THEME_ID, RWT.DEFAULT_THEME_ID);
		application.addStyleSheet(RWT.DEFAULT_THEME_ID, "css/ri.css");
            application.setOperationMode(Application.OperationMode.SWT_COMPATIBILITY);
		application.addEntryPoint("/app", SIApplication.class, properties);
	}


We want to use the Fancy respectively the Buisness.

This works fine in a standalone application using the extension point org.eclipse.rap.ui.serviceHandler

But how can i include the themes using our setup mentioned before?

What works is using the css.file, but then the additional Widgets are missing (Top menu and so on...)

If you need further information feel free to ask

Thanks in advance
Re: Virgo + RAP + OSGi: Extension Points and Fancy Theme [message #1037958 is a reply to message #1037285] Wed, 10 April 2013 04:19 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

Hi Tobias,

It seems that you're trying to run a workbench application. In this
case, you should not register an ApplicationConfiguration - the
workbench does this under the hood. Actually, registering your own
application while the workbench bundle is active will lead to problems
in Equinox because of bug 386504 [1].

The workbench requires the Equinox extension registry to be present. The
workbench styling (layout and theme) provided by the business and fancy
example is also registered using an extension point. So you have to
ensure that the equinox.registry bundle is running.

HTH, Ralf

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=386504

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Virgo + RAP + OSGi: Extension Points and Fancy Theme [message #1041580 is a reply to message #1037285] Mon, 15 April 2013 05:15 Go to previous messageGo to next message
Tobias P. is currently offline Tobias P.
Messages: 43
Registered: April 2012
Member
Hello Ralph,

thank you for your reply.

You are right, we are running a Workbench Application which is registered through the Application Configuration.

Can you provide an alternative deploy method or an entry where i can find more information?

Thanks for your help
Re: Virgo + RAP + OSGi: Extension Points and Fancy Theme [message #1042713 is a reply to message #1041580] Tue, 16 April 2013 15:40 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

If you're running a workbench application, you must not register an
ApplicationConfiguration. The workbench bundle starts an application
automatically. Instead of an application configuration, define your
entrypoints etc. using extensions.

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Virgo + RAP + OSGi: Extension Points and Fancy Theme [message #1047447 is a reply to message #1042713] Tue, 23 April 2013 04:02 Go to previous messageGo to next message
Tobias P. is currently offline Tobias P.
Messages: 43
Registered: April 2012
Member
Hello Ralph,

thanks for your reply but i dont understand it:

You have mentioned the following:

Quote:
Instead of an application configuration, define your
entrypoints etc. using extensions.


Can you provide an example or point me into the right direction to do this?
Re: Virgo + RAP + OSGi: Extension Points and Fancy Theme [message #1047457 is a reply to message #1047447] Tue, 23 April 2013 04:23 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

Hi Tobias,

if you're writing a workbench application, your plugins will contain a
plugin.xml. In this file, each plugin registers extensions with the
framework. The workbench provides extension points, e.g. to register
views and perspectives, and RAP also provides a number of extension
points to register themes, entrypoints, etc. Maybe this article gets you
started:

http://eclipse.org/rap/developers-guide/devguide.php?topic=application-setup.html&version=2.0

HTH, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Virgo + RAP + OSGi: Extension Points and Fancy Theme [message #1049197 is a reply to message #1047457] Thu, 25 April 2013 09:52 Go to previous message
Tobias P. is currently offline Tobias P.
Messages: 43
Registered: April 2012
Member
I was wrong informed:

One of my colleagues knew about about the extension Point mechanism but he had trouble getting it to work.

Is it possible for Virgo to handle the Extension Point mechanism and start a RAP Application deployed as a .jar file and the failure was on our site or is Virgo not capable to handle the plugin.xml?

The JAR approach works if we provide our configuration as mentioned in the first post. I have found an example where the Application was deployed as a .war file but we want to avoid a .war file.
Previous Topic:Status Handlers for RAP
Next Topic:Input validation - decoration / visual feedback - howto
Goto Forum:
  


Current Time: Sun Aug 31 06:42:35 EDT 2014

Powered by FUDForum. Page generated in 0.01871 seconds