Wednesday, December 26, 2012

Rich Visualforce Editor Updates

Hi Guys, I am happy to announce new version of Rich Visualforce Plugin. I have added some exciting features to this release. The major change is you can use it with standalone version of IDE.

Major features of this release:-

  • GIT Integration (it helps you to push your code to git repository on Ctrl+S key press.)
  • Added support for new visualforce tags.
  • Plugin works well with both IDE as well as eclipse plugins.

GIT Integration IDE/Plugin never supported code versioning and many times I felt its necessity and added a new feature to this release. Now you can configure your project with GIT repository and this plugin provides git push on save event of apex page and class.

Added new visualforce tags support
Now plugin supports visulaforce tags introduced till 26 version of the API

How to install
1. The plugin has egit plugin dependency so if you want to use the Rich Visualforce Plugin than you should have egit eclipse plugin installed, but don't bother about it because I bundled egit with Rich Visualforce Plugin.
2. To install the plugin, locate dropins folder inside eclipse root folder and just drop rich visualforce plugin jar there and restart eclipse.
3. After restarting eclipse, it might show you some alerts(depends on different eclipse versions) related to plugin installation and new egit plugin, you can ignore these messages/alerts.

to confirm successfully plugin installation you can check three places.

1. On toolbar:- Look for new icons

2. On preference page:- Look for “Rich Visualforce Editor” section.

3. Open with menu. (Apex Editor)

If you can see above toolbar buttons, preference page and open with "Apex Editor" option, it means you have successfully installed this plugin. :)  
If you faced some issue during/after installation please log issue on github.(

How to configure project with GIT
1. Prerequisites : to setup this plugin you need to create a GIT repository on your server then clone that repository to your local machine.
2. Create project in eclipse and goto “Windows>> Preferences >> Rich Visualforce Editor” there you will see following preference page.

This preference page has a checkbox" enable git commit on Ctrl+S shortcut", check this to enable auto commit functionality, it actually auto commit your changes to local repository then push all project files to GIT server on Ctrl+S keyboard shortcut. (This is optional you can use Ctrl+Shift+C and Ctrl+Shift+P shortcuts to commit and push your code. if you select Ctrl+S then it will push your code every time when you press the shortcut.)

Next is a legend block with your project name, there you can select checkbox to enable code commit for the project, don't forget to select local repository folder where you want to commit your code, then click save and close buttons..(this path should be a valid git repository path which we cloned earlier in step 1)
If selected folder is not a valid GIT repository then It will show you following error message.. otherwise it simply save your configuration.

now you are ready for your first commit and push to local and remote GIT repository.
you can also use egit eclipse plugin to see commit and push history..

How to use apex Rich Visualforce Editor:
A: Most usable feature of this plugin is auto suggest, it works for apex pages and components. to use this feature you can open your visualforce page with "Apex Editor".
to read more about this refer my previous post.

B: Once configuration has been done, pressing CTRL+S shortcut key will push your changes in GIT repository, it actually works with default save action which save your changes to salesforce. At the time of first commit a popup will ask you for your git credential.

Keyboard Shortcuts
If you have installed and configured this plugin properly then you can use following keyboard shortcuts.(Visualforce page should be opened in Apex Editor, all these shortcuts only works with Apex Editor)
1. ALT+1 you can use this shortcut to see apex tag help. click on apex tag inside apex page.. and press Alt+1, it will open a tab inside eclipse which will show you standard salesforce documentation related to that tag.

2. CTRL+SHIFT+C , this key commits changes to your local git repository .(to use this you will have to select "Enable Code Commit" checkbox for your current project.)

3. CTRL+SHIFT+P, this key pushes whole project code to remote GIT repository. (to use this you will have to select "Enable Code Commit" checkbox for your current project.)

4. CTRL+S this key actually a standard shortcut and I bound it with GIT push action so if you have selected  "enable git commit on Ctrl+S shortcut" checkbox in preference page then only you can use this.. it actually push your files to remote repository.

5. I have added couple of buttons in menu bar.. please see above first image in yellow mark.. first two executes CTRL+SHIFT+C and CTRL+SHIFT+P actions and next two takes you to salesforce standard help pages.

you can download this plugin from following locations.

If you find any bug then please leave comment on blog post or report a issue github project page.

Happy coding