Monaco TM1 Editor with Intellisense

Post Reply
Posts: 66
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Monaco TM1 Editor with Intellisense

Post by bgregs » Fri Dec 18, 2020 7:00 pm

Hi Everyone,

After my last Notepad++ plugin project I was left wanting something with more robust syntax highlighting out of the box. I personally can't stand developing in a web browser (although that is the current trend), but connecting to the rest api with standard desktop languages (C/C++) proved more trouble than it was really worth. This led me down the path of building out a tool that I could actually use myself.

My design goals were relatively straightforward:

- Simple, clean interface
- As few dependencies as possible
- Webapp with a desktop feel
- Easy to extend functionality
- Intellisense and syntax highlighting
- FREE: It's almost 2021, we shouldn't have to pay for licenses for simple tools

Through a little research, I finally settled on the Electron framework to provide a desktop feel to my webapp. It was extremely straightforward, and I'm honestly quite surprised there isn't a bigger push to develop apps using frameworks like it (at least in our tiny space of the IT world). Electron also allows me to easily integrate this with ElectronForge for easy installer creation - I have used this to deploy to my dev box and it's pretty slick. For intellisense I used Monaco, which is what powers Microsoft's Visual Studio Code editor. All that was left was to create the syntax and intellisense files and string everything together. All-in-all this was about a 1.5 week build, so it lacks quite a few features, but should hopefully demonstrate the potential and possibly pique some other developers' interests :).

Things it does:

- Intellisense:
intellisense.png (23.15 KiB) Viewed 262 times
- Direct documentation reference:
documentation.png (18.22 KiB) Viewed 262 times
- AutoComplete with tab based parameter entry:
autocomplete.png (7.86 KiB) Viewed 262 times
- Template Macros (these perform actions like "create skipcheck and feeders template")
- Full syntax highlighting and code browsing on the right hand side
* I ran out of image space so I could only upload 3 screenshots

Things it doesn't do:

- No CAM support yet, although this is extremely easy to implement
- No TI support yet
- Not much in the way of error handling currently

How to use it:
* You will need npm installed
- Clone the project from the github site:
- Open a powershell prompt in the root of the folder
- Run the command "npm start" (without double quotes)
- The config file will be created in /Users/[User]/AppData/Roaming/ElectronTest/configuration.json - edit this

This project has been a lot more fun than I initially thought it would be. I have been using this tool for day-to-day rule edits for a few weeks now, and it's worked out surprisingly well. It's definitely rough and has some half baked features in it (like the alternate hierarchy viewer), but it performs rule saves without any issues once it is configured.

While it has been fun, I must admit that the technology itself just isn't that exciting to me personally, and I have largely lost interest in providing updates to this one. If anyone does plan on extending this for their own use, go right ahead, just don't forget to leave a shout-out for me somewhere in the source code :). As always, if there is interest in this project, I would be happy to add features and support - I just don't see myself adding anything new if it's only me using it.

Thanks again for reading, and enjoy!

Posts: 117
Joined: Mon Oct 27, 2014 10:50 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: Monaco TM1 Editor with Intellisense

Post by Bakkone » Mon Jan 11, 2021 7:19 pm


Just wanted to write to say I appreciate your work. Will use it a bit and come back with feedback.

Edward Stuart
Community Contributor
Posts: 240
Joined: Tue Nov 01, 2011 10:31 am
OLAP Product: TM1
Version: All
Excel Version: All
Location: Manchester

Re: Monaco TM1 Editor with Intellisense

Post by Edward Stuart » Tue Jan 12, 2021 9:26 am

I'll second that, I've been tinkering with Javascript/ React interaction with the REST Api where time allows and whilst I think there is demand and space for an application like this (and I will also look to contribute). Workspace is a surprisingly comfortable place to develop once you start using it regularly

Post Reply