0

I'm working on a Java application created from multiple Eclipse plugins. The application uses a local workspace. When the user clicks on a specific button I want to clone the application workspace on a remote server programmatically.

Is there any way to do it?

greg-449
  • 109,219
  • 232
  • 102
  • 145
skander
  • 109
  • 1
  • 13

1 Answers1

0

You can use the Platform API to get to the local workspace. Theoretically, once you get that you can zip it and do whatever you need to do.

Platform.getInstanceLocation();

I say theoretically because files can be located outside of the workspace e.g. which is the case when you use git. You have to craft what you want to export and import.

See this question for additional hints and tips [1]

[1] How to Clone an Eclipse Workspace

Community
  • 1
  • 1
Yaza
  • 543
  • 3
  • 9
  • Okay but as I see `Platform.getInstanceLocation();` return an `org.eclipse.osgi.service.datalocation.Location`. so how can I manipulate it to get projects, files ... – skander Feb 29 '16 at 16:48
  • Please update the question with this new information then I will answer that as well. – Yaza Mar 01 '16 at 08:53