-
Notifications
You must be signed in to change notification settings - Fork 1
Installing
mfucci edited this page Sep 13, 2010
·
3 revisions
These are the steps that I use to get the plug-in project imported into Eclipse and running against a project.
Please let me know if there are alternate methods for any of these tasks or if there is a better way to work with eclipse plug-ins along with git.
- Eclipse running on Java 1.6
- For MacOsX, download Eclipse Cocoa 64bits and change launch JVM in Java Preferences (or edit Eclipse configuration)
- Eclipse Plug-In Development Environment : should be somewhere in your main Eclipse update site
- Get a local copy of the repository. (git clone git://github.com/greggian/Eclipse-Closure-Compiler.git).
- Within your Eclipse workspace, go to File → Import.
- Choose Existing Projects into Workspace.
- Click the browse button to choose the ‘root directory’ of the project to import. This should be your repository directory (eg. Eclipse-Closure-Compiler). The ‘Projects’ list should be updated with one project to be imported.
- I would recommend not choosing the ‘Copy projects into workspace’ option so that the files are linked to and changes can be picked up by git.
- Click Finish to complete the import process.
- If you open the plugin.xml file within the plug-in project, it should open in the ‘Plug-in Manifest Editor’. This editor has ‘Testing’ tasks on the ‘Overview’ tab that can be used to launch the plug-in. Using the classic Run command should work fine too if you run as Eclipse Application.
- Once the application is running, you will need to create a project in this workspace if there is not one already. Right click on the project in the ‘Project Explorer’ and choose ’Add/Remove Closure Nature. This will add the necessary closure nature to this project which will also add the closure builder to the project.
- Now that the closure builder is running, you can try creating a js file. Writing JavaScript like the following should display some errors.
/**@param {string} to*/ function sayHi(to){ return "Hi, "+to; } var hello = sayHi("bob"); var again = sayHi(5);
- The errors will be displayed in the ‘Problems’ view. (you can add the problems view from: Window → Show View → Problems).