Overriding the 'New' context menu in the Project view

Hey,

I'm making a custom language plugin, and I want to override the options
available to the user in the 'New' context menu in the Project view. I
do, for example, want the 'New class' option to create an instance of a
class in my custom language, not a Java class. I also want to add my own
options to this list. Is this possible? If so, how?

Thanks.

Best regards,
Frank.

7 comments
Comment actions Permalink

Hello Frank,

Replacing the "New class" option with your own behavior is not currently
possible. Adding your own options is possible - simply add an action to the
group with ID "NewGroup", and optionally inherit your action from CreateElementActionBase.
You can refer to the source code of the DevKit plugin to see an example of
this.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"

FN> Hey,
FN>
FN> I'm making a custom language plugin, and I want to override the
FN> options available to the user in the 'New' context menu in the
FN> Project view. I do, for example, want the 'New class' option to
FN> create an instance of a class in my custom language, not a Java
FN> class. I also want to add my own options to this list. Is this
FN> possible? If so, how?
FN>
FN> Thanks.
FN>
FN> Best regards,
FN> Frank.


0
Comment actions Permalink

Dmitry Jemerov wrote:

Hello Frank,

Replacing the "New class" option with your own behavior is not currently
possible.


Is this something that is planned for the near future?

-Frank

0
Comment actions Permalink

Hello Frank,

No, this is not planned for Demetra.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"

FN> Dmitry Jemerov wrote:
FN>
>> Hello Frank,
>>
>> Replacing the "New class" option with your own behavior is not
>> currently possible.
>>
FN> Is this something that is planned for the near future?
FN>
FN> -Frank
FN>


0
Comment actions Permalink

What is Demetra?
Is it a name of release?

Thanks
Sandeep

"Dmitry Jemerov" <yole@jetbrains.com> wrote in message
news:c8a8949ddd4f88c8591660528429@news.jetbrains.com...

Hello Frank,

>

No, this is not planned for Demetra.

>

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"

>

FN> Dmitry Jemerov wrote:
FN>

>>> Hello Frank,
>>>
>>> Replacing the "New class" option with your own behavior is not
>>> currently possible.
>>>

FN> Is this something that is planned for the near future?
FN> FN> -Frank
FN>



0
Comment actions Permalink

Hello darvekar,

Demetra is the codename for IntelliJ IDEA 6.0.

d> What is Demetra?
d> Is it a name of release?
d> Thanks
d> Sandeep
d> "Dmitry Jemerov" <yole@jetbrains.com> wrote in message
d> news:c8a8949ddd4f88c8591660528429@news.jetbrains.com...
d>
>> Hello Frank,
>>
>> No, this is not planned for Demetra.
>>
>> --
>> Dmitry Jemerov
>> Software Developer
>> http://www.jetbrains.com/
>> "Develop with Pleasure!"
>> FN> Dmitry Jemerov wrote:
>> FN>
>>>> Hello Frank,
>>>>
>>>> Replacing the "New class" option with your own behavior is not
>>>> currently possible.
>>>>
>> FN> Is this something that is planned for the near future?
>> FN> FN> -Frank
>> FN>
--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hello Frank,

Replacing the "New class" option with your own behavior is not currently
possible. Adding your own options is possible - simply add an action to the
group with ID "NewGroup", and optionally inherit your action from CreateElementActionBase.
You can refer to the source code of the DevKit plugin to see an example of
this.

Where can i find the DevKit plugin?
I've searched for it in https://github.com/JetBrains and https://github.com/JetBrains/intellij-plugins but can't find it there

I'm interessted in adding and creating own project types, like the drupal plugin in phpstorm
http://i.imgur.com/U7b6cZx.png

0

Please sign in to leave a comment.