[jira] [Updated] (NETBEANS-2653) Generate toString() with StringBuilder

2019-06-09 Thread Junichi Yamamoto (JIRA)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Junichi Yamamoto updated NETBEANS-2653:
---
Description: 
Currently, the following toString() is inserted using "insert code" feature:
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
// generate toString() with "+" operator
return "NewClass{" + "test=" + test + ", test2=" + test2 + ", test3=" + 
test3 + '}';
}

}
{code}

Add a check box to the panel for using StringBuilder, then insert the following 
toString(): 
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("NewClass{test=").append(test);
sb.append(", test2=").append(test2);
sb.append(", test3=").append(test3);
sb.append('}');
return sb.toString();
}

}
{code}


  was:
Currently, the following toString() is inserted using "insert code" feature:
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
// generate toString() with "+" operator
return "NewClass{" + "test=" + test + ", test2=" + test2 + ", test3=" + 
test3 + '}';
}

}
{code}

Add a check box to the panel for using StringBuilder, then insert the following 
toString(): 
{code:java}
public class NewClass {
private final String test = "test";
private final String test2 = "test";
private final String test3 = "test";

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("NewClass{");
sb.append("test=").append(test);
sb.append(", ");
sb.append("test2=").append(test2);
sb.append(", ");
sb.append("test3=").append(test3);
sb.append('}');
return sb.toString();
}

}
{code}



> Generate toString() with StringBuilder
> --
>
> Key: NETBEANS-2653
> URL: https://issues.apache.org/jira/browse/NETBEANS-2653
> Project: NetBeans
>  Issue Type: Improvement
>  Components: java - Editor
>Affects Versions: 11.0
>Reporter: Junichi Yamamoto
>Assignee: Junichi Yamamoto
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently, the following toString() is inserted using "insert code" feature:
> {code:java}
> public class NewClass {
> private final String test = "test";
> private final String test2 = "test";
> private final String test3 = "test";
> @Override
> public String toString() {
> // generate toString() with "+" operator
> return "NewClass{" + "test=" + test + ", test2=" + test2 + ", test3=" 
> + test3 + '}';
> }
> }
> {code}
> Add a check box to the panel for using StringBuilder, then insert the 
> following toString(): 
> {code:java}
> public class NewClass {
> private final String test = "test";
> private final String test2 = "test";
> private final String test3 = "test";
> @Override
> public String toString() {
> StringBuilder sb = new StringBuilder();
> sb.append("NewClass{test=").append(test);
> sb.append(", test2=").append(test2);
> sb.append(", test3=").append(test3);
> sb.append('}');
> return sb.toString();
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Updated] (NETBEANS-2653) Generate toString() with StringBuilder

2019-06-08 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated NETBEANS-2653:
-
Labels: pull-request-available  (was: )

> Generate toString() with StringBuilder
> --
>
> Key: NETBEANS-2653
> URL: https://issues.apache.org/jira/browse/NETBEANS-2653
> Project: NetBeans
>  Issue Type: Improvement
>  Components: java - Editor
>Affects Versions: 11.0
>Reporter: Junichi Yamamoto
>Assignee: Junichi Yamamoto
>Priority: Major
>  Labels: pull-request-available
>
> Currently, the following toString() is inserted using "insert code" feature:
> {code:java}
> public class NewClass {
> private final String test = "test";
> private final String test2 = "test";
> private final String test3 = "test";
> @Override
> public String toString() {
> // generate toString() with "+" operator
> return "NewClass{" + "test=" + test + ", test2=" + test2 + ", test3=" 
> + test3 + '}';
> }
> }
> {code}
> Add a check box to the panel for using StringBuilder, then insert the 
> following toString(): 
> {code:java}
> public class NewClass {
> private final String test = "test";
> private final String test2 = "test";
> private final String test3 = "test";
> @Override
> public String toString() {
> StringBuilder sb = new StringBuilder();
> sb.append("NewClass{");
> sb.append("test=").append(test);
> sb.append(", ");
> sb.append("test2=").append(test2);
> sb.append(", ");
> sb.append("test3=").append(test3);
> sb.append('}');
> return sb.toString();
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists