Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Running an e4 RCP application multiple times
Running an e4 RCP application multiple times [message #1020567] Mon, 18 March 2013 13:33 Go to next message
Manuel Steurer is currently offline Manuel SteurerFriend
Messages: 37
Registered: July 2009
Member
Hi,

we have an e4 RCP application which our customers would like to launch multiple times,
so they can compare data.
This doesn't work though, the 2nd instance stops launching with the Error-Message
"Workspace Cannot Be locked", detail-message contains 'workspace is currently in use'.

e3 RCP apps allowed this.
Can I somehow persuade e4 to also allow it?
I tried with '-data @none' but this caueses an NPE in
org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:127)

I also tried with '-data @noDefault' and then setting the workspace myself as unlocked like this
Location instanceLoc = Platform.getInstanceLocation();
try {
// set location to c:\temp
instanceLoc.set(new URL("file", null, "c:\\temp\\ws"), false);
// workspace unlocked here
}
catch (IOException e) {
throw new Error(e);
}

but in the class 'E4Application' this workspace is being locked:
// at this point its valid, so try to lock it and update the
// metadata version information if successful
try {
if (instanceLocation.lock()) {
writeWorkspaceVersion();
return true;
}
// ms: else show error-message "Workspace Cannot Be locked" ...

So do I have any other options for this use-case except creating a workspace on the fly for each running instance of the application?

Thanks,
Manuel
Re: Running an e4 RCP application multiple times [message #1020579 is a reply to message #1020567] Mon, 18 March 2013 13:52 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Could you file a bugzilla for this. I think we should add a config
option to allow multiple starts.

Tom

Am 18.03.13 14:33, schrieb manuel.steurer@xxxxxxxx:
> Hi,
>
> we have an e4 RCP application which our customers would like to launch
> multiple times,
> so they can compare data.
> This doesn't work though, the 2nd instance stops launching with the
> Error-Message
> "Workspace Cannot Be locked", detail-message contains 'workspace is
> currently in use'.
>
> e3 RCP apps allowed this.
> Can I somehow persuade e4 to also allow it?
> I tried with '-data @none' but this caueses an NPE in
> org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:127)
>
>
> I also tried with '-data @noDefault' and then setting the workspace
> myself as unlocked like this
> Location instanceLoc = Platform.getInstanceLocation();
> try {
> // set location to c:\temp
> instanceLoc.set(new URL("file", null, "c:\\temp\\ws"), false);
> // workspace unlocked here
> }
> catch (IOException e) {
> throw new Error(e);
> }
>
> but in the class 'E4Application' this workspace is being locked:
> // at this point its valid, so try to lock it and update the
> // metadata version information if successful
> try {
> if (instanceLocation.lock()) {
> writeWorkspaceVersion();
> return true;
> }
> // ms: else show error-message "Workspace Cannot Be locked" ...
>
> So do I have any other options for this use-case except creating a
> workspace on the fly for each running instance of the application?
>
> Thanks,
> Manuel
Re: Running an e4 RCP application multiple times [message #1020594 is a reply to message #1020579] Mon, 18 March 2013 14:25 Go to previous message
Manuel Steurer is currently offline Manuel SteurerFriend
Messages: 37
Registered: July 2009
Member
done:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403642

Thanks for the quick reply.
Manuel

On Mon, 18 Mar 2013 14:52:23 +0100, Tom Schindl <tom.schindl@xxxxxxxx> wrote:

> Could you file a bugzilla for this. I think we should add a config
> option to allow multiple starts.
>
> Tom
>
> Am 18.03.13 14:33, schrieb manuel.steurer@xxxxxxxx:
>> Hi,
>>
>> we have an e4 RCP application which our customers would like to launch
>> multiple times,
>> so they can compare data.
>> This doesn't work though, the 2nd instance stops launching with the
>> Error-Message
>> "Workspace Cannot Be locked", detail-message contains 'workspace is
>> currently in use'.
>>
>> e3 RCP apps allowed this.
>> Can I somehow persuade e4 to also allow it?
>> I tried with '-data @none' but this caueses an NPE in
>> org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:127)
>>
>>
>> I also tried with '-data @noDefault' and then setting the workspace
>> myself as unlocked like this
>> Location instanceLoc = Platform.getInstanceLocation();
>> try {
>> // set location to c:\temp
>> instanceLoc.set(new URL("file", null, "c:\\temp\\ws"), false);
>> // workspace unlocked here
>> }
>> catch (IOException e) {
>> throw new Error(e);
>> }
>>
>> but in the class 'E4Application' this workspace is being locked:
>> // at this point its valid, so try to lock it and update the
>> // metadata version information if successful
>> try {
>> if (instanceLocation.lock()) {
>> writeWorkspaceVersion();
>> return true;
>> }
>> // ms: else show error-message "Workspace Cannot Be locked" ...
>>
>> So do I have any other options for this use-case except creating a
>> workspace on the fly for each running instance of the application?
>>
>> Thanks,
>> Manuel
>
>


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Previous Topic:WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4
Next Topic:Opening an external browser window from E4 app
Goto Forum:
  


Current Time: Thu Apr 25 19:08:33 GMT 2024

Powered by FUDForum. Page generated in 0.02890 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top