I am creating multiple instances of an e4 rcp application using -data @ none. By using this multiple instances are getting created in Windows 7 successfully but when I run the application in linux in the terminal by ./applicationname it throws an error as associated workspace already in use. So how can we create multiple instances in linux? Please help to resolve this issue.
Asked
Active
Viewed 161 times
0
-
The `org.eclipse.e4.ui.workbench.swt.E4Application` application does actually require a workspace location so I think your Windows code may not be doing what you think. What does `Platform.getInstanceLocation()` give you on Windows? – greg-449 Oct 14 '14 at 06:47
-
It gives the path of the exe located and executed.even i need to create multiple instance like in windows for linux system – vinod raj Oct 14 '14 at 07:00
-
The location should be null if `-data @none` is specified. – greg-449 Oct 14 '14 at 07:16
-
Platform.getInstanceLocation() gives null in Windows PC, when i specify -data @none in launching arguments – Jitendar M Oct 14 '14 at 09:51
1 Answers
0
The E4Application does require a workspace location. You can set one in the LifeCycle @PostContextCreate
method:
@PostContextCreate
public void postContextCreate()
{
Location instanceLoc = Platform.getInstanceLocation();
// -data @none specified?
if (instanceLoc == null)
return;
// OK if location is set
if (instanceLoc.isSet())
return;
// TODO construct a workspace location
instanceLoc.set(url of location, false);
}

greg-449
- 109,219
- 232
- 102
- 145
-
But in this how can we dynamically change url of location to set instance loc – vinod raj Oct 14 '14 at 08:34