Article
· Jun 19, 2023 3m read

Boost your ObjectScript Development with the OwnObjectScriptExtension

OwnObjectScriptExtension

ObjectScript is a powerful language used in InterSystems products like InterSystems IRIS, enabling developers to build robust applications. To enhance the ObjectScript development experience, the OwnObjectScriptExtension is a Visual Studio Code extension that provides a range of tools and features. In this article, we will explore how the OwnObjectScriptExtension can improve your ObjectScript development workflow.


Features

Add Method Description

Writing comprehensive method descriptions is essential for maintaining code clarity and promoting collaboration. With the OwnObjectScriptExtension, generating method description becomes a breeze. Simply place your cursor within a method and execute the Add Method Description command. The extension will automatically generate a description template for the method, making it easy to provide meaningful documentation.

Make Select Statement

When working with ObjectScript, you often need to interact with databases. The Make Select Statement feature simplifies the process of generating SQL SELECT statements. By analyzing the currently opened ObjectScript file, the extension creates a SELECT statement based on the class name. If you have the SQLTools extension installed, you can execute the generated statement directly within Visual Studio Code.

Create New Wizard BETA

Creating new ObjectScript classes, messages, business services, or business operations is made more convenient with the Create New Wizard feature. This wizard-like interface guides you through the process of generating new components, resembling the familiar InterSystems Studio Wizard. By executing the command and following the instructions, you can quickly set up new ObjectScript artifacts, saving you time and effort.

This feature is currently in beta and may not work as expected. You may have to adjust the generated code.

Translate Embedded Python BETA

In certain scenarios, you may want to leverage the power of Python within your ObjectScript code. The Translate Embedded Python feature allows you to translate ObjectScript methods to embedded Python methods. By executing the command, the extension generates a new method with the same name, prefixed with py. This enables you to incorporate Python functionality while maintaining the structure and organization of your codebase.

This feature is currently in beta and may not work as expected. You may have to adjust the generated code.


Installation and Setup

To start benefiting from the OwnObjectScriptExtension, you can install it directly from the Visual Studio Code Marketplace or download the latest release from GitHub. Once installed, ensure you have the InterSystems ObjectScript extension installed.


Configuration and Customization

The extension offers various configuration options to tailor it to your preferences. Additionally, the provided color theme, InterSystems Real Dark enhances the visual experience for Visual Studio Code.


If you have any questions or feedback, please feel free to reach out to me. I hope you enjoy using the extension!

What is your favorite feature?
Discussion (7)3
Log in or sign up to continue

For those who have the same problem:

After installing the extension, VSCode will ask you to select a color theme of the extension.

When you don't want to change it, please select the last option (marked with current) and your color theme will not change!

If you want to change it later, you can still change it by navigating to File > Preferences > Theme > Color Theme.

v0.0.17 OUT NOW!

Check out the new features in the version 0.0.17:

Open InterSystems Class Documentation

Remembering all your class names and their properties can be difficult. The Open InterSystems Class Documentation command makes it easy to access the documentation of any class. Simply place your cursor within a class name and execute the command. The command will automatically open the documentation of the class on the side or in your favorite browser.


InterSystems Web Search

Search a question about InterSystems ObjectScript on the web. It will open a new tab in your browser with the search results for your question together with the keywords InterSystems and ObjectScript.


I hope you like it!