As you know, at the moment a very interesting event is taking place in San Francisco -
Java One . A few days of presentation of the achievements of the industry, communication and exchange of experience. Cloud technologies, and cloud IDE in particular, naturally, did not miss the moment to brag about their latest developments and beta chips.
Codenvy , among other things, drew attention to its demo booth with a chip that allows you to clone the development environment, of course, along with the project. In its documentation, the company provides quite detailed information about the Codenvy Factory. I will only make a brief summary of the functionality and give an example of the Factory button:

So, clicking on the Factory button, we get into the temporary workspace from Codenvy. As soon as the virtual workplace was created, the system starts cloning the original project (the project from which the Factory was created). It takes a little time, but, of course, it all depends on the size of the project being cloned. The link above is a project from the Codenvy template (by the way, this Android project can be run on the Manymo external emulator via the menu
Run> Run Application ).
')
Workspace is temporary and self-destruct in two hours. It can also be used for joint editing by sharing the URL with colleagues. If you wish, creating a Codenvy post account will not take long. There is a button - create account. For registered users is available to copy the Factory project in your workspace.
Factory URL consists of several components, some of which are optional:
codenvy.com/factory?v=1.0&pname=android&wname=docs.codenvy&vcs=git
&vcsurl=http%3A%2F%2Fcodenvy.com%2Fgit%2Fca%2F01%2F5c%2Fworkspacehs0z291wscvggfuh%2Fandroid
&idcommit=374fb47f35231328eafa5159bea7fe86902f8361&action=openproject&ptype=Android&openfile=pom.xml
Parse the Factory URL in detail:
codenvy.com/factory?
- so begins any Factory URL
v=1.0
- we specify the version of the Factory API. Currently 1.0 is the current version.
pname=android
- the name of the project, which is set by default, but it can be edited by hand
vcs=git
is the version control system used. Codenvy only supports git
vcsurl=http%3A%2F%2Fcodenvy.com%2Fgit%2Fca%2F01%2F5c%2Fworkspacehs0z291wscvggfuh%2Fandroid
is the URL of the source project that will be sloped into temporary space. External links are allowed. For example, here you can substitute the URL of the public repository with GitHub
idcommit=374fb47f35231328eafa5159bea7fe86902f8361
- ID of the commit. You can create factory projects in its various states
&action=openproject
- tell Codenvy what to do after creating a temporary workspace
openfile=pom.xml
- we tell Codenvy which file to open after creating the temporary workspace. We simply indicate the name of the file if it is in the root, and the path to it if it is in the folder, for example:
scr/main/java/helloworld.java
Thus, it is possible to build a Factory URL without having an account in Codenvy, so-called. use the links of your remote repositories.
By creating a temporary workspace, the user can invite collaborators to it. To do this, just share the workspace URL by copying it from the address bar of the browser. You must first activate collaboration mode in the Project menu, which provides chat and joint editing of files / projects.
Creating Factory buttons is possible both inside Codenvy, and independently. Codenvy offers 2 button design options:

and

as well as a ready-to-use script:
However, users can use their images, making them clickable. For example, in this way:

Full factory documentation, as well as possible use cases are available at the following link -
http://docs.codenvy.com/user/ in the Factory section. More
information on Codenvy .