Visual Studio Code Extension for TM1

A forum to post information about tools which are free and open source.
Post Reply
bgregs
Posts: 77
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Visual Studio Code Extension for TM1

Post by bgregs » Tue Feb 23, 2021 2:32 am

Welcome to TM1Code

Hey everyone, thanks again for all of the interest and great feedback I've been receiving so far! I can see there is definitely an interest here, and I plan on seeing how far we can take this project. Let's dig into the details:

What is this project
TM1Code (name subject to change) is a Visual Studio Code extension that leverages the TM1 Rest/VS Code APIs to bring a more native coding experience to the TM1 development space. This project is built on top of concepts and ideas from other projects, and is largely driven by community feedback and needs. TM1Code is and always will be free.

What is the scope of the project
Great question - we're still figuring that out. As of right now TM1Code aims to do the following:
  • Rule editing and saving
  • TI editing and saving
  • Git integration
  • Code snippets for rules and TIs
  • Intellisense for rules and TIs
Things that I would like to explore
  • Cube viewer - with the ability to embed browsers into VS Code, the TM1Web API could be used to display cube data (in theory at least)
  • RSS feed from tm1forum - I believe I can get what I need with the "/feed.php" return, but may need to work with the mods on this one
  • Some form of linter for rules and TIs
  • Anything else anybody would like to see
Code Repo
https://github.com/bgregs514/vscode-tm1

Issues/Enhancements/Questions
https://github.com/bgregs514/vscode-tm1/issues

Discussions
https://github.com/bgregs514/vscode-tm1/discussions

Special Thanks
A rolling list of people who have contributed code or ideas (let me know who I missed): Christoph, CarpeDatum for tm1helper - the base of the language files, Edward Stuart, ykud

See attached for screenshot placeholders. These will be cycled out as development progresses.

Also see the next post for rolling development updates.
Attachments
ruleEdit.png
ruleEdit.png (58.66 KiB) Viewed 1036 times
tiEdit.png
tiEdit.png (142.57 KiB) Viewed 1036 times
Last edited by bgregs on Fri Feb 26, 2021 4:18 pm, edited 7 times in total.

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

Re: Visual Studio Code Extension for TM1

Post by bgregs » Tue Feb 23, 2021 2:34 am

Development Updates

2/22/2021: Initial release; a long way to go
  • Framework and initial classes established
  • TreeViews implemented for rules and TIs
  • Get requests for rules and TIs working successfully
  • First draft syntax, Intellisense, and code snippet files implemented

User avatar
Harvey
Community Contributor
Posts: 227
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: Visual Studio Code Extension for TM1

Post by Harvey » Tue Feb 23, 2021 3:42 am

This looks fantastic, bgregs!
Take your TM1 experience to the next level - TM1Innovators.net

User avatar
ykud
MVP
Posts: 136
Joined: Sat Jan 10, 2009 10:52 am
Contact:

Re: Visual Studio Code Extension for TM1

Post by ykud » Tue Feb 23, 2021 4:08 am

Very exciting! Do you need help with anything?

I understand you don't want to create the repo yet, but maybe create a stub on GitHub with readme.md of your first post? It'd give you an issue tracker for ideas & discussions straight off the bat.

We can start voting for extension name :) I think it should be vscode-tm1

scrumthing
Posts: 69
Joined: Tue Jan 26, 2016 4:18 pm
OLAP Product: TM1
Version: 2.0.9
Excel Version: too many

Re: Visual Studio Code Extension for TM1

Post by scrumthing » Tue Feb 23, 2021 8:51 am

ykud wrote:
Tue Feb 23, 2021 4:08 am
We can start voting for extension name :) I think it should be vscode-tm1
+1 for that one from my side :-)

Issue tracking on Github sounds like a great idea. Happy to help too.
There is no OLAP database besides TM1!

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

Re: Visual Studio Code Extension for TM1

Post by bgregs » Tue Feb 23, 2021 2:57 pm

ykud wrote:
Tue Feb 23, 2021 4:08 am
Very exciting! Do you need help with anything?
Yes please! Any and all help is greatly appreciated. At this point there are so many things to work in it's kind of a free-for-all, but just make sure to track it on github so there isn't any overlap. Again, thank you for any contributions - whether they are ideas or code, they're much appreciated!
ykud wrote:
Tue Feb 23, 2021 4:08 am
We can start voting for extension name :) I think it should be vscode-tm1
We'll do an official poll at some point, but for now the name has been switched to vscode-tm1. :D
scrumthing wrote:
Tue Feb 23, 2021 8:51 am
Issue tracking on Github sounds like a great idea. Happy to help too.
We are live: Repo! The code is still absent, but we do have a basic readme and a license in place. I'm open to other ideas, but I personally like the GNU (v2/v3) licenses so we can ensure this stays open.

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

Re: Visual Studio Code Extension for TM1

Post by bgregs » Wed Feb 24, 2021 2:47 am

The code is live on github! It's still in its very early stages and most of it will likely be replaced and rewritten as we progress, but I wanted to get it out and available to everyone as soon as possible.

If you have any issues getting the extension setup for editing (it can be a little tricky at first), please let me know so I can update the README with better documentation.

There are now custom settings for the extension located in the main vscode settings.json file. This can easily be accessed by opening the extension for edit:

Code: Select all

code ./vscode-tm1
Pressing F5 to run the extension in debug mode, and then browsing to File > Preferences > Settings > extensions > vscode-tm1 (should be at the very bottom). This is where you will put your username, password, etc. In short, run the extension in debug mode and then edit your settings like you normally would - you just need to run the extension first in order for the package.json file to be loaded.

Again, if you encounter any issues please let me know. For those wondering why it's so complex to get running currently, this is unfortunately the standard way of editing and creating extensions for VS Code - no one ever said development was pretty (these commands are all taken straight from the quick start guide). When it comes time for packaging, none of this will be necessary, and it will function as a normal extension.

Enjoy! :D

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

Re: Visual Studio Code Extension for TM1

Post by bgregs » Wed Feb 24, 2021 2:20 pm

Sorry for all of the spam and sending off forum alerts, but I needed a way to make an announcement until I can get everything setup on the github side (which should hopefully be taken care of now).

Issue templates are now available on the github repository for bugs and feature requests - please use them, they're much easier to control over there than here on the forum! :D

https://github.com/bgregs514/vscode-tm1/issues

I went ahead and posted a few to get it started, but there are plenty more that I'll start adding as time permits. Any and all ideas are welcome here - we obviously have a lot of work to do to get the base stable, but once that is complete we'll start looking for bigger features to add to the extension.

Thank you!

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

Re: Visual Studio Code Extension for TM1

Post by Bakkone » Thu Feb 25, 2021 3:40 pm

Great stuff!

Wim Gielis
MVP
Posts: 2675
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.8
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Visual Studio Code Extension for TM1

Post by Wim Gielis » Thu Feb 25, 2021 7:48 pm

Looking forward to see the progress and possibly helping where I can.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 117 TM1 articles and a lot of custom code
Newest blog article: Avoid circular references https://github.com/wimgielis

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

Re: Visual Studio Code Extension for TM1

Post by bgregs » Fri Feb 26, 2021 4:21 pm

Discussions are now live on the project page! This forum is great for initial traffic, but going forward it would be great if we could funnel most traffic to the main git page so we can better track issues and enhancement requests.

Discussion Page: https://github.com/bgregs514/vscode-tm1/discussions

Thanks everyone for your continued support, feedback, and contributions!

Post Reply