I've got videos on using the bundle on YouTube: http://www.youtube.com/joshuabirk
You may also wish to check out MavensMate, a ForceDotCom bundle for TextMate created by Mavens Software. It has some extremely pretty interfaces and some great functionality: https://github.com/joeferraro/MavensMate
This is unofficial software and unsupported as well. I've been able to keep up with updates and bug fixes so far, but make no promises.
You will need to download and setup the Force.com Migration Tool, which is fairly straightforward in OS X. Just go to "Setup -> Develop -> Tools" in your org and download the zip and follow the instructions. You might need to run "ant -diagnostics" to find your ant lib directory. If you go to the Downloads page, download "ForceDotBundle_beta.zip". Double click "ForceDotBundle.tmBundle" after unarchiving. Fork/download/clone the project. Rename the parent folder "ForceDotBundle.tmBundle" and double click it.
- Once you've installed the bundle, create a new project.
- Create a new directory in Finder, name it something reasonable for your project.
- Drag the folder to the project pane in TextMate.
- Create some kind of scratch file.
- Open the empty file. Now use "Create New Project" from the ForceDotBundle bundle. A popup will give the overview of the changes. These changes may not appear right away in the project pane. They will be in Finder.
- Update "build.properties" with your username, password and if needed, the login URL (for sandboxes).
- If you want to pull down existing files, run "Get Latest". These changes may not appear right away in the project pane. They will be in Finder.
- Or if you just want to be additive, right click on say, classes, and use one of the templates.
- Enjoy.
- You may need to whitelist your IP for some of the features.
usekeychainaccess=enabled
in build.properties. The next step is swap out your password with "password:accountname", highlight that text and then run "Add Password" under the Keychain menu in the bundle. There will be some keychain prompts and then your password will be replaced with just "accountname".
From there on out, the bash will swap out your password in build.properties when it runs a build, and then swap it back when it is done. I highly recommend this for everyone concerned with having passwords in a text file on your laptop. Which should be everyone. The only downside is with multiple builds that execute against build.properties at the same time may wipe the file out. Working on it.
Since these use the password grant type, you will likely need to either append your security token to the password, or whitelist your IP. Not sure if this should be the only source of login or not - but if you want to try using the OAuth endpoints to login instead of SOAP, add "consumerkey" and "privatekey" to build.properties with your Consumer Public and Consumer Secret from a Remote Settings entry.The bundle provides the following:
- Languages
- Apex
- Visualforce
- Templates
- Apex Class
- Apex Trigger
- Visualforce Page
- Visualforce Trigger
- Commands
- Create Project
- Start New Project: this command will generate a skeleton directory structure, a tmp directory and dummy build files (build.properties, package.xml, build.xml). Update build.properties to associate the project with your org.
- Get Latest: this will bring down all the code and components from the org
- Build Files
- Quick Compile: Compiles the current file against the API, bypassing the Migration Tool. Much faster. Only gives a tool tip in response, so sometimes still go back to Build File for better error reading.
- Build File: this will build the current file being edited
- Build All: this will build all the files in the project
- Build Sequential: You can have multiple manifest files named "1.manifest", "2.manifest", "3.manifest", etc. The command will
go through them in order and build the corresponding files, allowing you to perform builds in steps. The format for the manifest file must be:
apex=AccountList,RESTCaseController pages=AccountTest,SomePage components=AComponent,BComponent triggers=
And they should be in the project folder root. - Build Latest: This will build all the files which have been modified in the last 24 hours.
- Run Tests
- Run Tests: this will run all tests against the org
- Run Current Tests: this will run the tests on the currently open file
- REST Operations
- Get Object: Opens an HTML window describing the fields and child relationships of an object defined by the currently highlighted text.
- Run SOQL: Opens an HTML window with the results of the SOQL query in the currently highlighted text.
- Note: you need the pod variable defined in build.properties for this to work
- Bookmarks
- Go To Visualforce Page: Opens the VF page of either the currently open document or highlighted text
- Go To Record: Opens the page corresponding to the ID of the currently highlighted text
- Execute/Debug Apex: Opens the system log
- New Custom Object: Opens the Custom Object wizard
- Custom Labels: Opens the Custom Labels page
- New Debug Log: Opens the page to add a new debug log/user
- Debug Logs: Opens the Debug Logs page
- Apex Reference: Opens the Apex reference documentation
- Visualforce Reference: Opens the VF component reference documentation
- Logout: Logs out the current web session
- Note: you need the pod variable defined in build.properties for this to work
- Deploy To Production
- Production Test: This will do a check only, run all tests, deploy against the production org
- Production Deploy: This will run all tests and deploy against the production org
- Keychain
- Add Password: Highlighted text in the format "password:accountname" will add a new password to Keychain under accountname and replace the text with accountname.
- Lock Keychain: Locks keychain and requires a password for later use.
- Delete Except: This command will delete all the classes, pages, components and triggers from the local project folder unless they include the highlighted text in their filenames. This is case sensitive, and obviously suggested to save and build before latest ... there is no undo. Only for the brave but handy for people with large orgs looking only for projects which started with "something".
- Run Apex: Takes the highlighted code and runs it against the API. Opens a new file to display the results.
- Create Project
For better production, you can now store your passwords in OS X Keychain and refer only to the Keychain account name in build.properties.
- Make sure "usekeychainaccess" is set to "enabled" in build.properties.
- Set "{realpassword}:{keychainaccountname}" as the password.
- Go to Bundles->ForceDotCom->Keychain Access->Add Password.
- If successful, the text will be replaced with just the {keychainaccountname}.
Set "pod=" in build.properties to match the beginning of the URL in your Salesforce org domain. For instance, if after you login you see "https://na8.salesforce.com" - set it to be "pod=na8".