Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WSO2 Developer Studio is a SOA development environment to build and manage your applications. It has in-built application creation and lifecycle management tooling support for a better, integrated development experience.

Let's use WSO2 Developer Studio to edit the source code of an application using WSO2 Developer Studio. If you haven't created an application yet, create your first application and then follow the steps below. Include PageAFShared:Use WSO2 Developer Studio to Develop an ApplicationAFShared:Use WSO2 Developer Studio to Develop an Applicationa new application in the same way you did using Codenvy in a previous tutorial.

Note

Important: If you are using Developer Studio via the P2 zip file, the Online P2 Repository, or the Eclipse Market Place instead of the complete installation distribution, you need to update your Egit plugin before you use the App Factory tooling feature. To update your Egit plugin, go to http://download.eclipse.org/egit/updates/ via Eclipse.

  1. Log in to the App Factory and create a new application (e.g., TestApplication).
    Image Added
  2. Install WSO2 Developer Studio in your environment. For instructions, see Installation.  
  3. Open the Developer Studio console, select the dashboard and click Switch to App Cloud / App Factory perspective.

    Image Added
  4. Click the Login icon, choose to log in to the App Factory and give the same credentials that you used to log in to the App Factory.  
    Image Added

    Tip

    Tip: If you registered more than one organization with your credentials, you will be prompted to select an organization after logging in.

  5. The App Factory perspective opens. Note the following:

    • Your application's key (auto generated when creating the application in the App Factory) appears under the Applications List in the upper right-hand corner. If required, click Refresh to update the list of applications.
    • Details of the currently selected application appear in the lower right-hand corner
    • Build console appears in the lower center
    Image Added
    Let's check out your code and modify it.
  6. Right click on your application and click Open. The available branches of the application appear under it. As you use a new application in this example, it only shows the main branch.
    Image Added
  7. Right-click on the main branch (or any other branch, if any) and click Check Out and Import. The application opens in the Project Explorer.
    Image Added

    Warning

    If you get an error saying that the Maven application directory is not specified, it is because you have not defined <M2_HOME> system variable to point to your Maven installation directory. You can opt to ignore the error as the projects get imported into your workspace anyway, without the Maven dependencies being resolved.

    Tip

    Tip: To check out the code as a background process, right click the branch you want to work with and click Check Out. Then, right click the branch again and click Import to workspace

  8. Do the required modifications to the source code using the Developer Studio editor and Save the file.
    For example, let's open the index.jsp file and change the heading of the output to "Hello cloud user" and the name of the button to "Click here".
    Image Added 

  9. Right click on the project in the Project Explorer and click Team > Commit. If prompted for credentials, give your Git credentials, which are the same ones that you used to log in to the App Factory.

    Image Added 
  10. Enter a commit message, select the files you want to commit and click Commit and Push. This will add the changes you did in Developer Studio to the files in the remote repository.
    Image Added
  11. Right click on the project from application list view and click Deploy.
    Image Added

    Tip

    Tip: You can build your code using the Developer Studio to see if there are no build issues, but it does not affect the builds in the App Factory. You must build, deploy and launch your application from the App Factory's UI.

  12.  Note the build logs that that appear in the console at the bottom of the window.
    Image Added

    Tip

    Tip: To view the latest build logs for a different branch, right click on the branch in the application list view and click Build Logs.

  13.  If the build is successful, come back to the App Factory console, open the application and click its Repos & Builds page. Then build, deploy and launch the application using the relevant buttons.
    Image Added

  14. Note the changes you added shown in the launched application.
    Image Added