How to link generated c code to mps editor in Jetbrain's MPS - mps

I am not sure if this functionality is available or not but can anyone please answer whether can I link generated c code to MPS editor code in Jetbrain's MPS.

Related

Writing a Verilog autoformat extension for Sublime/VS Code

As an RTL developer, I find it annoying that my favorite text editors (Notepad++, Sublime, VS Code) don't have autoformat options for RTL languages like Verilog and VHDL. So I took it upon myself to create one.
I want to develop an auto-format extension for one of those editors. I dropped Notepad++ because it doesn't have native support for Linux and macOS.
So, the question is: how to get started in developing an auto-format extension for a language for Sublime and VS Code?
Notes:
I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.
With Verilog being closer to C syntax, it might be easier to start there (and I also prefer it over VHDL, but let's not get into religious discussions)
I know that Emacs and Sigasi editors provide auto-format options for RTL languages but their format options are strict and I don't like the outcome, hence I intend to make the formatting style configurable
I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible
I don't intend to develop an extension for both editors but I'd want to see which would be more feasible.
In my opinion, I would prefer coding RTL languages in VS code because it's more versatile than sublime text as in free beer and speech. I would highly recommend beginning from here https://code.visualstudio.com/docs/extensions/example-hello-world.
Oh, you also need to know Typescript / Javascript to write an extension.
I ran into this work https://github.com/thomasrussellmurphy/istyle-verilog-formatter it might be useful to build on it if possible
I am excited to see the port of this to VS Code/ Sublime Text. I am sorry I don't know how to work on from C++ to TypeScript. My guess would be to copy the implementation method and write in TypeScript.
From their website :
Prerequisites:
You need Node.js installed and available in your $PATH. Node.js includes npm, the Node.js Package Manager, which will be used to install the extension generator.
I am pretty excited to see auto formatting extensions for Verilog. I hope i can contribute too :)
Edit :
I found this https://github.com/g2384/VHDLFormatter written in TypeScript. The transition to VSCode/Sublime would be easier than the above in C++. I have tested it personally and it works awesome! Hope it helps :)

Kotlin Bytecode - How to analyze in IntelliJ IDEA?

I want to see the compiled bytecode so I can learn more about how it works under the cover. I'm using IntelliJ IDEA 15 but can't find a way to see the bytecode. What am I missing?
IntelliJ IDEA comes with a bytecode viewing tool for Kotlin:
Tools → Kotlin → Show Kotlin Bytecode
Also available through Ctrl / ⌘+Shift+A as Show Kotlin Bytecode action.
It's a great tool that can jump to the corresponding bytecode when you move around in the source file. And it updates the bytecode on the fly whenever the source changes.
Also, I'd like to recommend jclasslib Bytecode Viewer as an external tool for low-level class files analysis (such as inspecting constant pools). Now it is also available as an IntelliJ IDEA plugin.
I use https://javap.yawk.at/ to view byte code online. Set "Kotlin" as the input language and you are good to go.
It even has an option to see the decompiled Java code via Procyon, but it might crush from time to time.
Just adding to the above answer.
Tools → Kotlin → Show Kotlin Bytecode
Now, in the bytecode view, there is also an option to decompile the bytecode to Java. So, you can actually see both the bytecode and the equivalent java code in intellij. You even have an option to convert using JVM 8 target.

Android Studio Plugin - Show Image In Editor

I'd like to be able to display an image below a class-level javadoc in Android Studio. My assumption is that I should write a plugin to make this happen.
Does anyone know what I need to do to get an image (JPEG or PNG) to display below a class-level javadoc comment in a Java class file?
I looked into basic information about creating an IntelliJ IDEA plugin but I have no idea where to look to accomplish my task.
This is not possible in the current version of IntelliJ IDEA. The editor can display only text, and does not support embedding of non-text things such as an image file.
You can display images on hover, or in popups, or in dialogs, but not within the editor itself.
Do you want the image to show in the class' source code itself? As an aside, images in Javadocs will show when you view the formatted javadoc view the Quick documentation action (Windows/Linux: Ctrl+Q or Mac: ^J)
If you still want the image to show in the source code, then yes, you will need to write a plug-in. You can look at the Information for Plugin Developers
Setting Up the Plugin Development Environment section of this web page - https://www.jetbrains.com/idea/plugins - to get started. You'll have to dig through source code to try and find some ideas for how to display an image in the source code. As much as I love IntelliJ IDEA, there plug-in documentation is a bit weak. When I wrote a plug-in, I had to do a lot of looking through the IDEA code to find code that was doing things similar to what I wanted to do. I also downloaded the source code for some of the better plug-ins out there and looked through them.
Finally, you can ask for some guidance in the IntelliJ IDEA Open API and Plugin Development forum. That forum is monitored by JetBrains developers. Your best bet to getting answers in that forum is to ask very specific questions. Do not try and get someone to explain from start to finish what you need to do. As you do each step, ask questions about what you are trying to do.

NSIS guidelines

I want to make my NSIS code more readable.
I need some guidelines regarding writing code section wise (like there is #region #endregion in C#) or any such information that can make writing NSIS code interesting and easy.
Please help me out.
Also there is Visual Studio (2008, 2008, 2010 and 2012) addin available called Visual & Installer.
It offers a lot of features like syntax highlighting, navigation, (GoTo definition, Goto reference, navigation bars, open file at cursor, ...) also IntelliSense support and much more.
Try here: http://www.unsigned-softworks.sk/visual-installer/
If you are looking for an IDE, you can try with SciTE that supports code folding, colorization, makensis compilation from the editor and compilation errors parsing. (BTW: Scite is not actually an IDE, but rather a very light yet powerful text editor with built-in support for colorizing and compiling programming languages)
With the latest versions of SciTE, you just need to uncomment the loading of NSIS support that is not enabled by default.
Also, there is the Development Environments section of the NSIS wiki that can point you some alternatives (like adding NSIS support to Eclipse).

Build OS-independent notepad with some code completion - appropriate platform?

I want to build as simple notepad application with some code-completion.
It should be easy to compile to Linux, OS X and Windows.
I'm looking at wx-widgets or GTK. Others?? (as web-service as worst case.),
and without library dependencies.
Or does there exist any OS-independent FOSS editor with plug-in functionality.
(Eclipse way to heavy).
To be specific, what I want is a "helper" when coding XML towards an application-framework that use XML extensively. As libraries are loaded (through XML) new tags should be allowed and their existence should be prompted to user, both in toolbar (tags) and auto-complete (attributes).
Recommendations?
regards,
//t
XML Copy Editor: I've used it and it's not the best editor, but it does do the autocompletion.
Conglomerate: Looks quite promising but I never got it to work when I tried it out a year ago. Perhaps it's improved since then.
As for an OS-independent FOSS editor with plugin functionality that is more lightweight than Eclipse, try Gedit. It's not too difficult to write plugins for whatever functionality you may need. It's based on GTK.

Resources