Replace default Toolbar and menus

Hi,

I'm using the IDEA community platform to develop my own IDE for a custom language. I would like to replace the toolbar and most of the menus. How to achieve that?

Regards,
Jean

7 comments

Hello Jean,

I'm using the IDEA community platform to develop my own IDE for a
custom language. I would like to replace the toolbar and most of the
menus. How to achieve that?


You need to provide a custom YourProductPlugin.xml (see IdeaPlugin.xml for
an example), specify its prefix via idea.platform.prefix (-Didea.platform.prefix=YourProduct
in the VM options), and instead of including IdeaActions.xml, provide your
own definitions for action groups with IDs MainMenu and MainToolBar.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Thanks for your response.

However, I'm not able to make it works. To test what you told me I wrote an almost empty MyProjectActions.xml. I was expecting to not see any menu and an empty toolbar. Instead, the default idea menus and toolbar was present like usual. How to hide them?

0

Hello Jean,

Thanks for your response.

However, I'm not able to make it works. To test what you told me I
wrote an almost empty MyProjectActions.xml. I was expecting to not see
any menu and an empty toolbar. Instead, the default idea menus and
toolbar was present like usual. How to hide them?


Did you also create MyProjectPlugin.xml with correct contents (a copy of
IdeaPlugin.xml without including IdeaActions.xml) and specify -Didea.platform.prefix=MyProject
in the run configuration options?

If you simply create an *Actions.xml file, it won't be loaded.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

I think I did exactly what you told me. My project is named Kumenya. I created a copy of IdeaPlugin.xml which I named KumenyaPlugin.xml and added it in the META-INF folder of my plugin module. I created an almost empty file named KumenyaActions.xml which KumenyaPlugin.xml is refering to. As VM parameters, I use -Didea.platform.prefix=Kumenya.

Maybe IdeaPlugin.xml and IdeaActions.xml are preloaded for performance reasons. That could explain this result.

I'm using IDEA community edition build IC-#93.13, build on 8 december 2009. Am-I missing something? Thanks for your help.

I joined the files.



Attachment(s):
KumenyaActions.xml
KumenyaPlugin.xml
0

Hello Jean,

Your KumenyaPlugin.xml is an unworkable one in any case: you've commented
out the include of IdeaComponents.xml, which will cause none of IDEA's built-in
app/project/module components to be loaded.

How exactly do you run your project? IntelliJ IDEA Community Edition sets
its own platform prefix, and it may take precedence over yours. The correct
way to do this is to add your module to the IDEA Community project, and create
a copy of the pre-defined IDEA run configuration replacing the Idea platform
prefix with yours.

I did exactly what you told me. My project is named Kumenya. I created
a copy of IdeaPlugin.xml which I named KumenyaPlugin.xml and added it
in the META-INF folder of my plugin module. I created an almost empty
file named KumenyaActions.xml which KumenyaPlugin.xml is refering to.
As VM parameters, I use -Didea.platform.prefix=Kumenya.

Maybe IdeaPlugin.xml and IdeaActions.xml are preloaded for performance
reasons. That could explain this result. I'm using IDEA community
edition build IC-#93.13, build on 8 december 2009. Am-I missing
something? Thanks for your help.

I joined the files.

---
Original message URL:
http://www.jetbrains.net/devnet/message/5264032#5264032

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Thanks for your response.I downloaded the source code of IDEA from git repository and it seems that the platform prefix from the command line is overrided by the method com.intellij.idea.MainIml.start().

So now, I would like to change IDEA code such that it would not override the platform prefix from the command line. Then, I would open a ticket and provide the patch. The problem is that I can compile the whole project but I cant run it. What class do I need to run exactly? Do I have to set program argument?

Also, I can build the project using Ant task named "all". However, I cant run the distribution. How to proceed to start the distribution?

Thanks for your help.

0

Hello Jean,

Overriding the prefix from the command line is correct behavior, and I don't
think we would accept a patch that changes that. If you're building your
own product on top of the IntelliJ platform, you're expected to provide your
own replacements for idea.bat, idea.exe etc. which define the correct platform
prefix.

For running the project, there's a shared run configuration 'IDEA'.

Thanks for your response.I downloaded the source code of IDEA from git
repository and it seems that the platform prefix from the command line
is overrided by the method com.intellij.idea.MainIml.start().

So now, I would like to change IDEA code such that it would not
override the platform prefix from the command line. Then, I would open
a ticket and provide the patch. The problem is that I can compile the
whole project but I cant run it. What class do I need to run exactly?
Do I have to set program argument?

Also, I can build the project using Ant task named "all". However, I
cant run the distribution. How to proceed to start the distribution?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.