Ian Bull | 2 Feb 18:30
Favicon
Gravatar

Showsplash vs SplashPath

Tom (and others),


What is the difference between the showsplash and splashpath parameters (properties)?  I am working on the publisher for a .product file, and I am trying to figure out what to do with the splash screen.  PDE export appears to use splashPath for the splash screen, and if the bundle that contains the splash screen is "org.foo", PDE export wold generate:
osgi.splashPath=platform:/base/plugins/org.foo Should p2 just use the prefix platform:/base/plugins?  Or is this something that will be determined at install time?  (i.e. does a shared install need a different prefix)? cheers,
Ian
--
R. Ian Bull, PhD
Software Developer, EclipseSource
http://www.ianbull.com
http://blog.ianbull.com
Andrew Niefer | 2 Feb 20:14
Picon

Re: Showsplash vs SplashPath


There are 3 ways to specify the splash screen: -showsplash, osgi.splashLocation and osgi.splashPath.

Order of precendence is as follows:
1) -showsplash
        this is interpreted by the native launcher, it displays the native "early" splash screen before starting the vm.  This requires a bitmap on the disk (ie in a folder shaped bundle).  
        There is some detail on the wiki http://wiki.eclipse.org/Equinox_Launcher#Command_line_arguments regard the possible values here.

        If -showsplash is specified to the launcher, and a bitmap is found there, then this will cause the property osgi.splashLocation to be set with the path to that bitmap.

2) osgi.splashLocation (in config.ini or system property).   Interpreted by Main,  this is a path to the bitmap on disk

3) osgi.splashPath (in config.ini or system property).   Interpreted by Main, is a url to a bundle
        platform:/base urls are resolved relative to osgi.install.area.  I don't recal if p2 is setting this, if it doesn't then osgi.install.area is based on the location of the equinox.launcher jar.
         file: urls would also work here, absolute urls being the best, (see bug 263280 for relative urls).
        When the final segment is something like "org.eclipse.platform", Main is just searching the disk for the highest version org.eclipse.platform_version, it doesn't know which bundles are actually installed into the running system (ie bundles.info)
        Once a bundle is resolved, we look inside it based on the current osgi.nl value, and we also support jars here (the bitmap is extraced and placed under the configuration area).

platform:/base is probably your best bet, however bundle pools may complicate this depending on how p2 manages osgi.install.area, and whether or not the splash bundle is colocated with org.eclipse.equinox.launcher

-Andrew




Ian Bull <irbull-yiTCNibefIkYhU31cYVdIwC/G2K4zDHf@public.gmane.org>
Sent by: equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

02/02/2009 12:30 PM

Please respond to
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>

To
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
cc
Subject
[equinox-dev] Showsplash vs SplashPath





Tom (and others),

What is the difference between the showsplash and splashpath parameters (properties)?  I am working on the publisher for a .product file, and I am trying to figure out what to do with the splash screen.  PDE export appears to use splashPath for the splash screen, and if the bundle that contains the splash screen is "org.foo", PDE export wold generate:
osgi.splashPath=platform:/base/plugins/org.foo
Should p2 just use the prefix platform:/base/plugins?  Or is this something that will be determined at install time?  (i.e. does a shared install need a different prefix)?
cheers,
Ian
--
R. Ian Bull, PhD
Software Developer, EclipseSource
http://www.ianbull.com
http://blog.ianbull.com_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Jens Goldhammer | 3 Feb 12:45

Using Equinox Hooks for handling application starting?


Hello,

We implemented a rcp application which can be started either by clicking the
application file (.exe) or by doubleclicking a file (with a certain
fileextension) on the filesystem. The problem is that we want to handle a
doubleclick on this file by extracting its information and show a dialog in
our application. There are two possibilites: There is already an running
instance or we have to start a new one.

It seems to me that the Equinox Hook can be a friend in this case. Read the
proposed solution under
http://www.ibm.com/developerworks/library/os-eclipse-rcpurl/index.html, I
have the idea to put the uri client into an Equinox hook. Either I can call
the other instance via TCP (and close the new one) or run the current
instance if there is no other instance open.

The problem is now that I have to parse the commandline to get out the
filepath of the file which was used to start our application. Is there a way
to do that in the hook frameworkstart method? How can I close the osgi
platform if there is another instance which can handle the file?

Thanks,
Jens
--

-- 
View this message in context: http://www.nabble.com/Using-Equinox-Hooks-for-handling-application-starting--tp21808278p21808278.html
Sent from the Equinox - Dev mailing list archive at Nabble.com.

Lars Martin | 3 Feb 12:48
Picon
Favicon

Eclipse JAAS / registerListener()

Sorry for cross posting to the equinox newsgroup:

Hi folks,

we're using Eclipse JAAS to add security to our RAP application.

[--------]

String configName = "myJAAS";
URL configUrl = Activator.getDefault().getBundle().getEntry(
             "data/jaas_config.txt");
System.setProperty("login.config.url.1", configUrl.toExternalForm());
ILoginContext secureContext = LoginContextFactory.createContext(
             configName, configUrl);
...
Subject s = secureContext.getSubject();
...
[--------]

The login works properly so far but now I want to register an event 
listener to give the user feedback if the login failed for some reason. 
The Eclipse JAAS API provides the method registerListener() to add an 
event listener.

[--------]

secureContext.registerListener(listener)

[--------]

But how do I register my login dialog that implements CallbackHandler 
and ILoginContextListener if the callbackhandler is defined in 
plugin.xml as an extension? So my application doesn't know the used 
LoginModule, CallbackHandler and actually used CallbackHandlerMapping.

Any help is appreciated.

Kindest regards, Lars
Thomas Watson | 3 Feb 16:12
Picon
Favicon

Re: Using Equinox Hooks for handling application starting?

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=178927 for an enhancement request that is similar to what you require.

The Equinox Hook (AdaptorHook.startFramework method) will not be sufficient for implementing this. You can get the command line by using the EnvironmentInfo service in you hook. You are passed a BundleContext which you could use to get the EnvironmentInfo service. This service has the methods you need to get the command line arguments. But there is no way from the startFramework method to tell the platform not to start the application. When Eclipse RCP is launched it is configured with an application to launch. You still want this application to be configured to launch in case there is no running instance of your application yet. So even though you processed the command line in your adaptor hook and communicated with another running instance the platform will continue to boot and attempt to start your application. At that point your application could determine that a command line was used to communicate with another instance and return immediately. If you already have to enter your application each time then you might as well just put all the TCP client/server logic directly in your application and have it determine whether it should pass the information off to another running instance of your application and return immediately or process the request directly because it is the first running instance of the application.

Tom



Jens Goldhammer ---02/03/2009 05:46:40 AM---Hello,


From:

Jens Goldhammer <goldhammerdev-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>

To:

equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

Date:

02/03/2009 05:46 AM

Subject:

[equinox-dev] Using Equinox Hooks for handling application starting?




Hello,

We implemented a rcp application which can be started either by clicking the
application file (.exe) or by doubleclicking a file (with a certain
fileextension) on the filesystem. The problem is that we want to handle a
doubleclick on this file by extracting its information and show a dialog in
our application. There are two possibilites: There is already an running
instance or we have to start a new one.

It seems to me that the Equinox Hook can be a friend in this case. Read the
proposed solution under
http://www.ibm.com/developerworks/library/os-eclipse-rcpurl/index.html, I
have the idea to put the uri client into an Equinox hook. Either I can call
the other instance via TCP (and close the new one) or run the current
instance if there is no other instance open.

The problem is now that I have to parse the commandline to get out the
filepath of the file which was used to start our application. Is there a way
to do that in the hook frameworkstart method? How can I close the osgi
platform if there is another instance which can handle the file?

Thanks,
Jens
--
View this message in context: http://www.nabble.com/Using-Equinox-Hooks-for-handling-application-starting--tp21808278p21808278.html
Sent from the Equinox - Dev mailing list archive at Nabble.com.

_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Thomas Watson | 3 Feb 16:17
Picon
Favicon

Equinox tagged for Galileo integration build

The map file has been updated for the following Bug changes:
+ Bug 91463. [launcher] Main#resolve should not set the osgi.framework property (FIXED)
+ Bug 241663. [user admin] Incorrect Password Save/Load (FIXED)
+ Bug 251152. Cannot run two different Eclipse applications back to back in the same JVM using EclipseStarter (FIXED)
+ Bug 252303. Uniqueness of bundleentry URLs with multiple frameworks in the same VM (NEW)
+ Bug 258209. When using new RFC-132 launch mechanism, CCL not being set correctly on Equinox threads (FIXED)
+ Bug 262249. NPE could append when class loading (FIXED)
+ Bug 262941. console chokes and dies with unclosed quotes (FIXED)
+ Bug 263063. Missing <at> since tag on EventHook (FIXED)
+ Bug 263125. FilterImpl class can remove unneeded field (FIXED)

The following projects have changed:
org.eclipse.equinox.launcher
org.eclipse.equinox.useradmin
org.eclipse.equinox.supplement
org.eclipse.osgi.tests
org.eclipse.osgi

Tom

Thomas Watson | 3 Feb 16:49
Picon
Favicon

Changes to external format of bundle entry/resouce URLs comming in M6 (again)

For the Galileo M6 build we have to change the external format of the bundle entry/resource URLs again. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=252303

Our original fix violated the URI syntax for server-based naming authority. This prevented the following code pattern from working:

java.net.URL url = bundle.getEntry("resource.txt");
java.net.URI uri = new java.net.URI(url.getProtocol(), url.getHost(),url.getPath(), url.getQuery());

The original fix returned host Strings (from url.getHost()) which would cause a URISyntaxException to occur when used to construct a URI. We had to change the external format again to comply with the URI syntax. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=252303#c27 for more information on the external format, but please keep in mind that the external format is not API and should not be relied upon. If you encounter any issues with the change please let us know in bug 252303.

Thanks to Angel Vera for bringing this to our attention. It is good we caught this before the 3.5 release.

Tom

Jens Goldhammer | 3 Feb 18:21

Re: Using Equinox Hooks for handling application starting?


Thanks for answering, Thomas!

Yes, my idea was to put the client and server into the application. The
server starts as a separate thread in the background and the hook contains
the client which tries to connect to the server. If no server is found, I
want to leave the current running instance starting, so in my case I have
nothing to do in the hook. In the other case, to connect to another
instance, I want to stop the current instance. You say that it I cannot stop
the osgi platform in my hook? Is there really no oppurtunity for doing that?
What about system.exit()?? :-) I think, that should be the last solution...
I have seen the class OSGi and the method close(). Can I reference it
somehow? Maybe I can use AspectJ for get an reference to an instance of
OSGi?

Thanks,
Jens

Thomas Watson wrote:
> 
> 
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=178927 for an
> enhancement
> request that is similar to what you require.
> 
> The Equinox Hook (AdaptorHook.startFramework method) will not be
> sufficient
> for implementing this.  You can get the command line by using the
> EnvironmentInfo service in you hook.  You are passed a BundleContext which
> you could use to get the EnvironmentInfo service.  This service has the
> methods you need to get the command line arguments.  But there is no way
> from the startFramework method to tell the platform not to start the
> application.  When Eclipse RCP is launched it is configured with an
> application to launch.  You still want this application to be configured
> to
> launch in case there is no running instance of your application yet.  So
> even though you processed the command line in your adaptor hook and
> communicated with another running instance the platform will continue to
> boot and attempt to start your application.  At that point your
> application
> could determine that a command line was used to communicate with another
> instance and return immediately.  If you already have to enter your
> application each time then you might as well just put all the TCP
> client/server logic directly in your application and have it determine
> whether it should pass the information off to another running instance of
> your application and return immediately or process the request directly
> because it is the first running instance of the application.
> 
> Tom
> 
> 
> 
> 
>                                                                        
>   From:       Jens Goldhammer <goldhammerdev@...>           
>                                                                        
>   To:         equinox-dev@...                                  
>                                                                        
>   Date:       02/03/2009 05:46 AM                                      
>                                                                        
>   Subject:    [equinox-dev] Using Equinox Hooks for handling application
> starting?
>                                                                        
> 
> 
> 
> 
> 
> 
> Hello,
> 
> We implemented a rcp application which can be started either by clicking
> the
> application file (.exe) or by doubleclicking a file (with a certain
> fileextension) on the filesystem. The problem is that we want to handle a
> doubleclick on this file by extracting its information and show a dialog
> in
> our application. There are two possibilites: There is already an running
> instance or we have to start a new one.
> 
> It seems to me that the Equinox Hook can be a friend in this case. Read
> the
> proposed solution under
> http://www.ibm.com/developerworks/library/os-eclipse-rcpurl/index.html, I
> have the idea to put the uri client into an Equinox hook. Either I can
> call
> the other instance via TCP (and close the new one) or run the current
> instance if there is no other instance open.
> 
> The problem is now that I have to parse the commandline to get out the
> filepath of the file which was used to start our application. Is there a
> way
> to do that in the hook frameworkstart method? How can I close the osgi
> platform if there is another instance which can handle the file?
> 
> Thanks,
> Jens
> --
> View this message in context:
> http://www.nabble.com/Using-Equinox-Hooks-for-handling-application-starting--tp21808278p21808278.html
> 
> Sent from the Equinox - Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@...
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> 
> 
>  
>  
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@...
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Using-Equinox-Hooks-for-handling-application-starting--tp21808278p21814525.html
Sent from the Equinox - Dev mailing list archive at Nabble.com.

Kim Moir | 3 Feb 19:29
Picon

Eclipse 3.5M5 now available


Eclipse 3.5M5 is now available


Eclipse build
http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/index.php

Equinox build
http://download.eclipse.org/equinox/drops/S-3.5M5-200902021535/index.php

New and Noteworthy
http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/eclipse-news-M5.html

p2 update site
http://download.eclipse.org/eclipse/updates/3.5milestones/


Kim
_______________________________________________
platform-releng-dev mailing list
platform-releng-dev@...
https://dev.eclipse.org/mailman/listinfo/platform-releng-dev
Thomas Watson | 3 Feb 20:37
Picon
Favicon

Re: Using Equinox Hooks for handling application starting?

Currently the system is not designed to allow you to shutdown the framework from an adaptor hook as the framework is being launched. Anything you do will likely be a hack and likely will not do exactly what you want. With the current Eclipse Platform, I think the simplest approach is to put both the client and server directly in your application (implementation of IApplication).

- The default application that is launched has complete control over when the running instance shuts down. This happens when you exit the IApplication.start method.
- Your IApplication.start method can check for a server and communicate with it to process the request and then exit the start method to shutdown the instance of Eclipse.
- If no server is found you can start your server and process the request directly in the current instance.

The disadvantage of this approach is the overhead of getting to your IApplication.start(), but that should be quite low since you should do it very early in your application before any extensions have been loaded and any UI has been displayed.

Tom



Jens Goldhammer ---02/03/2009 11:21:42 AM---Thanks for answering, Thomas!


From:

Jens Goldhammer <goldhammerdev-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>

To:

equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

Date:

02/03/2009 11:21 AM

Subject:

Re: [equinox-dev] Using Equinox Hooks for handling application starting?




Thanks for answering, Thomas!

Yes, my idea was to put the client and server into the application. The
server starts as a separate thread in the background and the hook contains
the client which tries to connect to the server. If no server is found, I
want to leave the current running instance starting, so in my case I have
nothing to do in the hook. In the other case, to connect to another
instance, I want to stop the current instance. You say that it I cannot stop
the osgi platform in my hook? Is there really no oppurtunity for doing that?
What about system.exit()?? :-) I think, that should be the last solution...
I have seen the class OSGi and the method close(). Can I reference it
somehow? Maybe I can use AspectJ for get an reference to an instance of
OSGi?

Thanks,
Jens



Thomas Watson wrote:
>
>
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=178927 for an
> enhancement
> request that is similar to what you require.
>
> The Equinox Hook (AdaptorHook.startFramework method) will not be
> sufficient
> for implementing this.  You can get the command line by using the
> EnvironmentInfo service in you hook.  You are passed a BundleContext which
> you could use to get the EnvironmentInfo service.  This service has the
> methods you need to get the command line arguments.  But there is no way
> from the startFramework method to tell the platform not to start the
> application.  When Eclipse RCP is launched it is configured with an
> application to launch.  You still want this application to be configured
> to
> launch in case there is no running instance of your application yet.  So
> even though you processed the command line in your adaptor hook and
> communicated with another running instance the platform will continue to
> boot and attempt to start your application.  At that point your
> application
> could determine that a command line was used to communicate with another
> instance and return immediately.  If you already have to enter your
> application each time then you might as well just put all the TCP
> client/server logic directly in your application and have it determine
> whether it should pass the information off to another running instance of
> your application and return immediately or process the request directly
> because it is the first running instance of the application.
>
> Tom
>
>
>
>
>                                                                        
>   From:       Jens Goldhammer <goldhammerdev <at> googlemail.com>          
>                                                                        
>   To:         equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org                                  
>                                                                        
>   Date:       02/03/2009 05:46 AM                                      
>                                                                        
>   Subject:    [equinox-dev] Using Equinox Hooks for handling application
> starting?
>                                                                        
>
>
>
>
>
>
> Hello,
>
> We implemented a rcp application which can be started either by clicking
> the
> application file (.exe) or by doubleclicking a file (with a certain
> fileextension) on the filesystem. The problem is that we want to handle a
> doubleclick on this file by extracting its information and show a dialog
> in
> our application. There are two possibilites: There is already an running
> instance or we have to start a new one.
>
> It seems to me that the Equinox Hook can be a friend in this case. Read
> the
> proposed solution under
> http://www.ibm.com/developerworks/library/os-eclipse-rcpurl/index.html, I
> have the idea to put the uri client into an Equinox hook. Either I can
> call
> the other instance via TCP (and close the new one) or run the current
> instance if there is no other instance open.
>
> The problem is now that I have to parse the commandline to get out the
> filepath of the file which was used to start our application. Is there a
> way
> to do that in the hook frameworkstart method? How can I close the osgi
> platform if there is another instance which can handle the file?
>
> Thanks,
> Jens
> --
> View this message in context:
> http://www.nabble.com/Using-Equinox-Hooks-for-handling-application-starting--tp21808278p21808278.html
>
> Sent from the Equinox - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
>  
>  
> _______________________________________________
> equinox-dev mailing list
> equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>

--
View this message in context: http://www.nabble.com/Using-Equinox-Hooks-for-handling-application-starting--tp21808278p21814525.html
Sent from the Equinox - Dev mailing list archive at Nabble.com.

_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Gmane