Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » [2.1] add a project to multiuser workspace
[2.1] add a project to multiuser workspace [message #1060614] Mon, 27 May 2013 10:30 Go to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Hello,

I have started to create an emf editor running on RAP 2.1. I've created an emf model, generated an rap editor on top of the model and made some modifications to this editor yet. What I want to do now is to provide a project with xml files to all instances of this editor. At the moment I'm able to give my 'new model file wizard' a file uri to a local xml file and create a model instance with my editor starting afterwards. I can modify this model file and write it back as a xml file to my local machine. But I'd like to keep these xml files in the RAP workspace. How can I do so? Is it possible to add a java project to the shared workspace? Is there a workspace at all in an RAP application? Couldn't find any information about this yet.

Greetings,
Sascha
Re: [2.1] add a project to multiuser workspace [message #1060632 is a reply to message #1060614] Mon, 27 May 2013 12:13 Go to previous messageGo to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
And I guess to load this project I will need the org.eclipse.core.resources package? Is this package able to work with RAP?

Greetings,
Sascha
Re: [2.1] add a project to multiuser workspace [message #1060644 is a reply to message #1060632] Mon, 27 May 2013 12:58 Go to previous messageGo to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Ok, I've managed to copy all the missing dependencies from Eclipse to my RAP plugin and tried to load the project by:

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
IProject project  = root.getProject("ConfigFiles");


But now I get the following error:

java.lang.IllegalStateException: Workspace is closed.


Any ideas on this? I've copied the ConfigFiles project to the following path:

org.eclipse.rap.ui.launch/<projectname>/


Greetings,
Sascha
Re: [2.1] add a project to multiuser workspace [message #1060649 is a reply to message #1060644] Mon, 27 May 2013 13:10 Go to previous messageGo to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Ok, next attempt but same problem. I guess I need to startup the ResourcesPlugin via

ResourcesPlugin.getPlugin().start(FrameworkUtil.getBundle(this.getClass()).getBundleContext());


But the ResourcesPlugin.getPlugin() returns NULL.

Greetings,
Sascha

[Updated on: Mon, 27 May 2013 13:13]

Report message to a moderator

Re: [2.1] add a project to multiuser workspace [message #1060850 is a reply to message #1060649] Tue, 28 May 2013 16:03 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Sascha,

as you've found out, the resources plug-in is not available for RAP.
Implementing it would require to setup different workspaces for every
user. However, there's an instance area (that's the place where the
resource plug-in would create the workspace). This instance area is
shared among all users.

You can set the workspace using the -data parameter, and obtain its
location from the system property "osgi.instance.area".

Does that help?
Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: [2.1] add a project to multiuser workspace [message #1060883 is a reply to message #1060850] Tue, 28 May 2013 20:19 Go to previous messageGo to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Hi Ralf,

thanks for your answer. But can I ask you how to load an IProject from this location? I've set the parameter and successfully read out the osgi parameter in my RAP application. But can I use the IWorkspace interface with the newly given data location or is there another way to read a project from this location?

Greetings,
Sascha
Re: [2.1] add a project to multiuser workspace [message #1060924 is a reply to message #1060883] Wed, 29 May 2013 08:02 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

you can't. There is no resources plug-in for RAP, hence no IProject or
IWorkspace. If you need these interfaces for your project, then this
would require a RAP implementation of the resources plug-in.

Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: [2.1] add a project to multiuser workspace [message #1061134 is a reply to message #1060924] Thu, 30 May 2013 08:04 Go to previous message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Ok, thanks a lot. I've figured it out. Smile

Greetings,
Sascha
Previous Topic:What is the correct way to resize a TableView?
Next Topic:RAP and Tabris
Goto Forum:
  


Current Time: Wed Oct 27 14:36:44 GMT 2021

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

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

Back to the top