how to manage the 'ALT+INSERT` list?

已回答

My native language is not English,so if there are some errors in my expression, please forgive me.

first, can I hide some file types in 'ALT+INSERT' list which I don't think I will use in my project ?how?

Second, we all know that We can't find .jsp in 'ALT+INSERT' list When we try to generate a file under a directory which is marked as 'java source'. but why?If I generate my own file template, how do I set it to make it unable to be generated just like the .jsp? And how do I make the .jsp general, which means I can generate .jsp regardless of the properties of the directory?

 

Thanks very much!

0

Hello,

1. You can't modify predefined code templates: https://www.jetbrains.com/help/idea/generating-code.html#customize-templates

2. Are you speaking about "File Templates" feature? As I see, it is working exactly as you are describing (could be created in any directory): 

 


0
Avatar
Permanently deleted user

Thank your answer very much...But I dont't how to response to you...

My.jsp means...emmmm

If you create a simple maven's archetype-webapp like this:

then you can find a .jsp in alt+insert list when you want to create under the webapp directory like this:

however, at the same project, you can't find the JSP/JSPX in alt+insert list When you try to create a new file in 'java source' directory just like this:

 

there is no 'JSP/JSPX' file.

I would like to figure out What decides whether there is the type of 'JSP/JSPX' and If I create a new file template, What should I do to make it has the same features as the build-in JSP/JSPX?

Thanks...

And About the first question, I wouldn't like to modify the internal templates, I just would like to hide them(their content aren't modified but they just don't appear on the alt+insert linst)..

Thanks a lot again!

 

0

Hello, 

> there is no 'JSP/JSPX' file.

JSP/JSPX predefined templates could be generated only for webapp directory by default and it cannot be changed.

By the way, this template could be edited under "Preferences | Editor | File and Code Templates > Other > Jsp files"

However, you can add your own file template (as I have shown on previous gif), so the jsp template would be available in every directory:

Moreover, you can copy the content of "JSP files" templates to your custom template, so it has the same features as build-in one. 

>  I just would like to hide them

You cannot remove, hide, or rename predefined templates.

1
Avatar
Permanently deleted user

Thank you very much.My questions are basically solved...And I hope that there will be a plugin or a offical update to manage the list

0

请先登录再写评论。