If you want to extend the functionality of Studio, you can do so by creating a new Ruble or extending an existing one.
Modifying an existing Ruble
The Ruble Specification lists the complete mechanism for extending existing Rubles, but there are two main mechanisms.
Edit this bundle
You can edit an existing Ruble by cloning the existing version from Github and editing the files.
- Select Commands > RubleName > Edit this bundle.
The ruble is cloned from Github and imported as a project into your workspace.
- At this point, you now have a complete copy of the Ruble to edit as you like. However, you won't get automatic updates if the remote content changes.
To update your Ruble, do one of the following:
- Select Commands > Bundle Development > Update User Bundles.
- Right-click on the project folder in Project Explorer and select Team > Pull.
Extend an existing Ruble
- Create a folder named rublename.ruble (replacing rublename with the name you wish).
Add a bundle.rb file with the following content:
- Replace "XXX" with the name of the Ruble you are extending, and "YYY" with the display name.
- Save and close ruble.rb.
Some examples of how you might override an existing item.
Overriding an existing command
This replaces a current command's implementation with the new implementation. We'll use the HTML plugin as an example here.
- Follow the instructions to "Extend an Existing Ruble":
- Create a folder in a workspace project titled bundles/htmlextension.ruble.
Create a bundle.rb file with the following content:
- Create a folder at bundles/htmlextension.ruble/commands.
- Create a file in the commands folder, which is a copy of an existing command; in other words, strip_html_tags.rb.
Add new content to suit:
- Modify the above code to suit.
Running the above command from the HTML menu should use your new implementation.