I'm starting the conversation on the dev list but we can continue this
by phone at any time. Further more other people can give their
My work is to create a profile manager. My first idea was to create a
new service in the lowest layer of SC (between the UtilsService and
the FileAccessService). A complete explaining of the idea is available
on the project blog. The idea was good but now the question is : how
to stop the starting of the framework to ask the user which profile he
wants to use ?
Emil proposes to implements the biggest part of the service in the
launch. Like that we can pass through the starting of the framework.
Then I can create a plugin to manage the profiles within the
I think I can keep the same system I've developed but I will export it
into a jar file to minimize the code duplication which is the worst
To resume :
The jar will contain :
- the classes that manage the file
- the GUI's classes
The launcher will use the jar to checks the if we need to use the
default profile or ask the user (display the GUI), then saves the data
into the System class.
The two services, I mentioned in the blog's article, will be updated
as said in the article but instead of getting informations from the
service they will get the informations from the System class.
The future plugin will allow the user to manage the profiles : add,
rename, remove, set a default profile and change profile.
Now the main question is : Is there a way to restart all the bundles
when another profile is selected without restart the application ?
Do you know how other applications with profiles works ?
In my case I only know about Eclipse which restart completely when
switching to another workspace.
While reading the MainFrame class I found the line to stop the application :
I have two questions :
- What is the bundle 0 ?
- To restart the application, do I just need to add this line after
the other : GuiActivator.bundleContext.getBundle(0).start();