Appcelerator Titanium Package for Visual Studio Code
Appcelerator Titanium build tools and editor additions for Visual Studio Code.
Via the browser
- Open the extension on the Visual Studio Marketplace
- Click "Install"
In VS Code
- Open the Extension view, type in Titanium
- Select the "Titanium" extension by Axway
- Click "Install"
- Reload VS Code
To use this extension you'll need to have the Appcelerator CLI, and Titanium SDK setup. Follow this guide for info.
Open a Titanium project
File > Open... > Browse to Titanium project
From the CLI:
||Build and run on simulator/emulator or device|
|Package||-||Build project for Ad-Hoc or App Store distribution|
||Stop the current build|
|Set log level||-||Set the output log level|
|Init||-||Reload Appcelerator environment information|
|Generate autocomplete suggestions||-||Build autocomplete database for current default SDK version|
|Open related view||
||Open the related Alloy XML file|
|Open related style||
||Open the related Alloy TSS file|
|Open related controller||
|Toggle related files||
Use the command palette and commands listed above to build and run your Appcelerator project. Follow instructions to select platform, target and (if appropriate) code signing. The last build destination is saved for quick recall.
By default the integrated terminal is used to execute the build command.
Autocompletion support is provided to help speed up development by providing quick references to Titanium APIs and Alloy markup as well as references to modules, widgets and assets within your project.
On initial launch, autocomplete suggestions are generated for the active Titanium SDK in your project and the Alloy version in your active CLI.
Autocomplete suggestions can be regenerated by running the
Generate autocomplete suggestions command from the command palette.
Titanium and Alloy
Suggestions for other controllers, modules and widgets are presented when referencing through a Titanium function or Alloy markup.
Class and ID references
Suggestions for classes and IDs declared or defined in related Alloy XML and TSS files are presented.
Image suggestions are presented where appropriate.
Open related files
Opening related Alloy files is supported (see above commands list). This can also be by right clicking in an active editor.
- From View, open related Style and/or Controller
- From Style, open related View and/or Controller
- From Controller, open related View and/or Style
Jump-to-definition support is provided for quickly accessing the definition or usage of Alloy markup and to easily generate new definitions. Images can be previewed inline.
From Views, click through to style definitions for tags, classes and IDs, in related or global TSS. Click through to event definitions in the related controller. Definitions can also be presented inline.
A prompt is displayed to generate undefined styles or functions.
Click on localized string references to jump to their definition. The option to generate undefined strings is provided.
Click on an image path to open a preview. For iOS, where multiple scaled images exist with the same name the first is opened (e.g. @2x).
Code snippets for common Alloy and Titanium APIs are provided for use in Alloy controllers and modules. A description of the snippet and link to documentation are provided where appropriate. Type the prefix and the autocomplete overlay will be displayed with matching snippets.
||Debug log message|
||Error log message|
||Info log message|
||Warn log message|
||Trace log message|
||Add event listener|
||Remove event listener|
||Show alert dialog|
||Show option dialog|
||Play local or remote audio|
||Play local or remove video|
||Alloy Globals object|
||Alloy CFG object|
||Arguments available in an Alloy controller|
||Alloy create controller function|
||Alloy create collection function|
||Alloy create model function|
||Alloy create widget function|
||iOS conditional statement|
||Android conditional statement|
||Windows conditional statement|
Check out the configuration settings document for configuration settings.
See the contributing guide for info
Various icons used throughout the extension are sourced from the awesome octicons project.