Modify template used in generating `toString` method in Java code editor in IntelliJ












0















I have seen some documentation such as this and some Stack Overflow questions like this which talk about templates, perhaps Velocity templates, used by IntelliJ when generating a toString method in a Java class.



But no where can I find where this template lives, or how to access it from within IntelliJ.



➥ Exactly how does one find and edit the toString generation template in IntelliJ 2018?










share|improve this question

























  • hmmm… 2 favorites, but 0 upvotes on this Question. Stack Overflow moves in mysterious ways.

    – Basil Bourque
    Nov 17 '18 at 19:07













  • It's OK, select toString() from the contextual menu. ... now you have one upvote. My only concern: I'm having the Ultimate edition and I'm not sure this feature is available for Community edition.

    – user10639668
    Nov 17 '18 at 19:43













  • @EugenCovaci Well, d'uh! I see now. Thank you. I did not think about clicking the Settings button. I had not realized there was more going on there than a simple pick-list.

    – Basil Bourque
    Nov 17 '18 at 20:12


















0















I have seen some documentation such as this and some Stack Overflow questions like this which talk about templates, perhaps Velocity templates, used by IntelliJ when generating a toString method in a Java class.



But no where can I find where this template lives, or how to access it from within IntelliJ.



➥ Exactly how does one find and edit the toString generation template in IntelliJ 2018?










share|improve this question

























  • hmmm… 2 favorites, but 0 upvotes on this Question. Stack Overflow moves in mysterious ways.

    – Basil Bourque
    Nov 17 '18 at 19:07













  • It's OK, select toString() from the contextual menu. ... now you have one upvote. My only concern: I'm having the Ultimate edition and I'm not sure this feature is available for Community edition.

    – user10639668
    Nov 17 '18 at 19:43













  • @EugenCovaci Well, d'uh! I see now. Thank you. I did not think about clicking the Settings button. I had not realized there was more going on there than a simple pick-list.

    – Basil Bourque
    Nov 17 '18 at 20:12
















0












0








0


1






I have seen some documentation such as this and some Stack Overflow questions like this which talk about templates, perhaps Velocity templates, used by IntelliJ when generating a toString method in a Java class.



But no where can I find where this template lives, or how to access it from within IntelliJ.



➥ Exactly how does one find and edit the toString generation template in IntelliJ 2018?










share|improve this question
















I have seen some documentation such as this and some Stack Overflow questions like this which talk about templates, perhaps Velocity templates, used by IntelliJ when generating a toString method in a Java class.



But no where can I find where this template lives, or how to access it from within IntelliJ.



➥ Exactly how does one find and edit the toString generation template in IntelliJ 2018?







java templates intellij-idea tostring






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 17 '18 at 20:07







Basil Bourque

















asked Nov 17 '18 at 17:36









Basil BourqueBasil Bourque

109k26375538




109k26375538













  • hmmm… 2 favorites, but 0 upvotes on this Question. Stack Overflow moves in mysterious ways.

    – Basil Bourque
    Nov 17 '18 at 19:07













  • It's OK, select toString() from the contextual menu. ... now you have one upvote. My only concern: I'm having the Ultimate edition and I'm not sure this feature is available for Community edition.

    – user10639668
    Nov 17 '18 at 19:43













  • @EugenCovaci Well, d'uh! I see now. Thank you. I did not think about clicking the Settings button. I had not realized there was more going on there than a simple pick-list.

    – Basil Bourque
    Nov 17 '18 at 20:12





















  • hmmm… 2 favorites, but 0 upvotes on this Question. Stack Overflow moves in mysterious ways.

    – Basil Bourque
    Nov 17 '18 at 19:07













  • It's OK, select toString() from the contextual menu. ... now you have one upvote. My only concern: I'm having the Ultimate edition and I'm not sure this feature is available for Community edition.

    – user10639668
    Nov 17 '18 at 19:43













  • @EugenCovaci Well, d'uh! I see now. Thank you. I did not think about clicking the Settings button. I had not realized there was more going on there than a simple pick-list.

    – Basil Bourque
    Nov 17 '18 at 20:12



















hmmm… 2 favorites, but 0 upvotes on this Question. Stack Overflow moves in mysterious ways.

– Basil Bourque
Nov 17 '18 at 19:07







hmmm… 2 favorites, but 0 upvotes on this Question. Stack Overflow moves in mysterious ways.

– Basil Bourque
Nov 17 '18 at 19:07















It's OK, select toString() from the contextual menu. ... now you have one upvote. My only concern: I'm having the Ultimate edition and I'm not sure this feature is available for Community edition.

– user10639668
Nov 17 '18 at 19:43







It's OK, select toString() from the contextual menu. ... now you have one upvote. My only concern: I'm having the Ultimate edition and I'm not sure this feature is available for Community edition.

– user10639668
Nov 17 '18 at 19:43















@EugenCovaci Well, d'uh! I see now. Thank you. I did not think about clicking the Settings button. I had not realized there was more going on there than a simple pick-list.

– Basil Bourque
Nov 17 '18 at 20:12







@EugenCovaci Well, d'uh! I see now. Thank you. I did not think about clicking the Settings button. I had not realized there was more going on there than a simple pick-list.

– Basil Bourque
Nov 17 '18 at 20:12














1 Answer
1






active

oldest

votes


















4














Go to Code -> Generate and select toString() from the contextual menu:



enter image description here



Next, click the Settings button in upper corner.



In the toString() Generation Settings window that appears, select Templates tab.



enter image description here



Add template:



enter image description here



Finally, add the Velocity code then click apply:



enter image description here






share|improve this answer


























  • I do not see any of this when choosing Code > Generate. See my screenshot added to my Question.

    – Basil Bourque
    Nov 17 '18 at 19:06











  • @BasilBourque See my updated answer.

    – user10639668
    Nov 17 '18 at 19:48











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53353806%2fmodify-template-used-in-generating-tostring-method-in-java-code-editor-in-inte%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














Go to Code -> Generate and select toString() from the contextual menu:



enter image description here



Next, click the Settings button in upper corner.



In the toString() Generation Settings window that appears, select Templates tab.



enter image description here



Add template:



enter image description here



Finally, add the Velocity code then click apply:



enter image description here






share|improve this answer


























  • I do not see any of this when choosing Code > Generate. See my screenshot added to my Question.

    – Basil Bourque
    Nov 17 '18 at 19:06











  • @BasilBourque See my updated answer.

    – user10639668
    Nov 17 '18 at 19:48
















4














Go to Code -> Generate and select toString() from the contextual menu:



enter image description here



Next, click the Settings button in upper corner.



In the toString() Generation Settings window that appears, select Templates tab.



enter image description here



Add template:



enter image description here



Finally, add the Velocity code then click apply:



enter image description here






share|improve this answer


























  • I do not see any of this when choosing Code > Generate. See my screenshot added to my Question.

    – Basil Bourque
    Nov 17 '18 at 19:06











  • @BasilBourque See my updated answer.

    – user10639668
    Nov 17 '18 at 19:48














4












4








4







Go to Code -> Generate and select toString() from the contextual menu:



enter image description here



Next, click the Settings button in upper corner.



In the toString() Generation Settings window that appears, select Templates tab.



enter image description here



Add template:



enter image description here



Finally, add the Velocity code then click apply:



enter image description here






share|improve this answer















Go to Code -> Generate and select toString() from the contextual menu:



enter image description here



Next, click the Settings button in upper corner.



In the toString() Generation Settings window that appears, select Templates tab.



enter image description here



Add template:



enter image description here



Finally, add the Velocity code then click apply:



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 17 '18 at 20:10









Basil Bourque

109k26375538




109k26375538










answered Nov 17 '18 at 17:55







user10639668




















  • I do not see any of this when choosing Code > Generate. See my screenshot added to my Question.

    – Basil Bourque
    Nov 17 '18 at 19:06











  • @BasilBourque See my updated answer.

    – user10639668
    Nov 17 '18 at 19:48



















  • I do not see any of this when choosing Code > Generate. See my screenshot added to my Question.

    – Basil Bourque
    Nov 17 '18 at 19:06











  • @BasilBourque See my updated answer.

    – user10639668
    Nov 17 '18 at 19:48

















I do not see any of this when choosing Code > Generate. See my screenshot added to my Question.

– Basil Bourque
Nov 17 '18 at 19:06





I do not see any of this when choosing Code > Generate. See my screenshot added to my Question.

– Basil Bourque
Nov 17 '18 at 19:06













@BasilBourque See my updated answer.

– user10639668
Nov 17 '18 at 19:48





@BasilBourque See my updated answer.

– user10639668
Nov 17 '18 at 19:48


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53353806%2fmodify-template-used-in-generating-tostring-method-in-java-code-editor-in-inte%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()