Modify existing UI Elements

Hello!

We are working on a plugin for IntelliJ and until now we only added new components to the IDE (which seems to be a breeze with the API and documentation). But now we would also like to modify and even remove (or hide) parts of the user interface (like menus) that are already existing in the normal IDE deployment... Is this possible through plugins and if not, is this possible at all?

Many thanks in advance and best regards,

Malte

0
5 comments

Could you give some motivation/samples of the what and why?

0
Avatar
Permanently deleted user

Sure it's possible as one can access to full Swing components hierarchy. It's not the question of IntelliJ API but Java API.

But I'm not sure that some hacky plugin can stay stable / popular / not banned for a long time.

0
Avatar
Permanently deleted user

Hey! Thanks for your answers!

To clarify the usecase: We are actually working on developing our own IntelliJ IDEA, for a set of Jetbrains MPS languages that we are currently developing for internal work only. Since this IDE will be dedicated to only these languages we heavily want to cut parts of the user interface that are unnecessary for our users. The way through the swing components hierarchy feels indeed a little hacky, so we wondered if there is any way to programmatically access the IDE settings, since it seems like these indeed allow toggling specific parts of the user interface, precisely down to the menu items.

Regards, Malte

0
Avatar
Permanently deleted user

Well, not an obvious task. API is designed to add some extended functionality, not to cut. 

First of all, try ActionManager.unregisterAction to remove some features you don't need.

1
Avatar
Permanently deleted user

Hey Vassiliy, thanks for your suggestion!

I tried it with a couple of menus, but even though I was able to properly remove the Menu-Items with it, it did not work with the Menus themselves, since they did not disappear and from then on caused Exceptions when used. I also tried to call the ActivityTracker, as supposed to when changing the availability of Actions but it did not help.

A new idea we had, was to either make the plugin modify the xml config files of the IDE (under %user%/%ide%/config/options by default) and add the entries for removing the menus there: To do that our plugin would have to fetch the path of those files in the running IDE, is that possible? Or even easier: When resetting those config files to default from the IDE settings, do they use a "template" file to do that? Then we could just overwrite that for our deployment!

Best regards,

Malte

0

Please sign in to leave a comment.