Skip to content

Commit bf64ca2

Browse files
committed
Hints for converting ternary to if and back are missing #78 and bump to version 1.6.1
1 parent b281c68 commit bf64ca2

File tree

5 files changed

+440
-25
lines changed

5 files changed

+440
-25
lines changed

README.md

Lines changed: 116 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,126 @@
11
[![Build Status](https://travis-ci.org/markiewb/nb-additional-hints.svg?branch=master)](https://travis-ci.org/markiewb/nb-additional-hints)
22
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4CMP92RZELE2)
33

4-
Additional java hints for NetBeans IDE
5-
===================
4+
Plugin page: <a href="http://plugins.netbeans.org/plugin/47589/">http://plugins.netbeans.org/plugin/47589/</a>
65

7-
Supported hints:
8-
* "Replace '+' with 'MessageFormat.format()'"
9-
* "Replace '+' with 'new StringBuilder().append()'"
10-
* "Replace '+' with 'String.format()'"
11-
* "Join literals"
12-
* "Copy joined literals to clipboard"
13-
* "Split at linebreaks"
14-
* "Split at caret" (since 1.1)
15-
* "Convert to assertTrue/assertFalse" (since 1.1)
16-
* "Support transformation to BigDecimal constants" (since 1.1)
17-
* "Remove "public abstract" modifiers from method declarations within interfaces" (since 1.1)
18-
* ... and more see http://plugins.netbeans.org/plugin/47589/?show=true
6+
<h1>Additional Java hints for NetBeans IDE</h1>
197

8+
<h2>Supported Hints:</h2>
209

21-
Example:
22-
--------
10+
<ul>
11+
<li>"Replace '+' with 'MessageFormat.format()'"</li>
12+
<li>"Replace '+' with 'new StringBuilder().append()'"</li>
13+
<li>"Replace '+' with 'String.format()'"</li>
14+
<li>"Join literals"</li>
15+
<li>"Copy joined literals to clipboard"</li>
16+
<li>"Split at linebreaks"</li>
17+
<li>"Split at caret" (since 1.1)</li>
18+
<li>"Convert to assertTrue/assertFalse" (since 1.1)</li>
19+
<li>"Support transformation to BigDecimal constants" (since 1.1)</li>
20+
<li>"Remove "public abstract" modifiers from method declarations within interfaces" (since 1.1)</li>
21+
<li>"Remove public/abstract/final modifiers from field declarations within interfaces" (since 1.2)</li>
22+
<li>"Change modifiers" (since 1.2)</li>
23+
<li>"Convert char to string and back" (since 1.2)</li>
24+
<li>"Convert number in literal to number and back" (since 1.2)</li>
25+
<li>"Convert to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty()" (since 1.2)</li>
26+
<li>"Convert from if/else to ternary and back" (since 1.2)</li>
27+
<li>"Invert ternary if/else" (since 1.2)</li>
28+
<li>"Report methods that have class name" (since 1.2, no transformation)</li>
29+
<li>"Add "this." to methods and variables" (since 1.3, disabled by default)</li>
30+
<li>"Replace with Optional.isPresent()/Convert return null to return Optional.empty()" (since 1.5)</li>
31+
<li>"Replace with null-assignment to Optional with Optional.empty()| (since 1.6)</li>
32+
<li>"Convert return xxx to return Optional.ofNullable(xxx)/Optional.of(xxx)/Optional.empty()| (since 1.6)</li>
33+
<li>"Convert to assertNull" (since 1.6)</li>
34+
<li>"Replace with org.junit.Assert" (since 1.6)</li>
35+
</ul>
2336

24-
![Screenshot](https://raw.github.com/markiewb/nb-additional-hints/v1.4.0/doc/screenshot.png)
37+
<h2>Example:</h2>
38+
<img src="https://raw.githubusercontent.com/markiewb/nb-additional-hints/v1.6.1/doc/screenshot.png"/>
2539

26-
Further information:
27-
--------------------
28-
This plugin is originally based on code from the _"I18N Checker"_ plugin from _Jan Lahoda_.
29-
The original sourcecode can be found at http://hg.netbeans.org/main/contrib/file/tip/editor.hints.i18n
40+
<h2>Updates</h2>
41+
<h3>1.6.1:</h3>
42+
<ul>
43+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/78">Bugfix</a>]: Fixed: Hints for converting ternary to if and back are missing</li>
44+
</ul>
45+
<h3>1.6.0:</h3>
46+
<ul>
47+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/55">New Fix</a>]: Replace with null-assignment to Optional with Optional.empty()</li>
48+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/56">New Fix</a>]: Convert return xxx to return Optional.ofNullable(xxx)/Optional.of(xxx)/Optional.empty()</li>
49+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/63">New Fix</a>]: Convert to assertNull</li>
50+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/68">New Fix</a>]: Replace with org.junit.Assert</li>
51+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/54">Updated Fix</a>]: "Replace +..." works for more expressions</li>
52+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/57">Updated Fix</a>]: Fixed false positive result from "Convert to Optional.isEmpty()"</li>
53+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/58">Updated Fix</a>]: Make "Change modifiers" hints non-intrusive</li>
54+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/59">Updated Fix</a>]: Make "Change modifiers" hints work for constructors too</li>
55+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/64">Updated Fix </a>]: java.lang.NullPointerException in "Report methods that have class name"</li>
56+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/75">Updated Fix </a>]: java.lang.NullPointerException in ReturnForOptional</li>
57+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/70">Removed Fix</a>]: "dead instanceof" hint has been removed</li>
58+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/72">Task</a>]: Update dependencies to NB 8.1</li>
59+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/76">Task</a>]: Reduce dependencies</li>
60+
</ul>
61+
<h3>1.5.0:</h3>
62+
<ul>
63+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/42">Updated Fix</a>]: "Convert to if/else" now supports assignments to new variables</li>
64+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/43">Updated Fix</a>]: "Invert ternary"/"Convert to ternary" now support conditions without brackets</li>
65+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/3">Updated Fix</a>]: "Replace +..." is not proposed for erroneous conditions anymore</li>
66+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/51">Updated Fix</a>]: "Replace +..." works for more expressions</li>
67+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/50">Updated Fix</a>]: Remove false positive detected by "Detect dead instanceof"</li>
68+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/56">New Fix</a>]: Replace with Optional.isPresent()/Convert return null to return Optional.empty()</li>
69+
<li>[Task]: Update requirements JDK7 and NB7.4</li>
70+
</ul>
71+
<h3>1.4.0:</h3>
72+
<ul>
73+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/44">New Hint</a>]: Detect dead instanceof-expressions</li>
74+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/2">Updated Fix</a>]: "Replace +..." hints can now supports chars too</li>
75+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/47">Meta</a>]: Add donation link (for those who want to support this project)</li>
76+
</ul>
77+
<h3>1.3.0:</h3>
78+
<ul>
79+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/36">Updated Fix</a>]: "Invert ternary if/else" now supports more patterns</li>
80+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/39">New Hint</a>]: Add "this." to methods and variables (disabled by default)</li>
81+
</ul>
3082

31-
License remains CDDL-GPL-2-CP - http://www.netbeans.org/cddl-gplv2.html
83+
<h3>1.2.0:</h3>
84+
<ul>
85+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/pull/22">New Fix</a>]: Change the modifier of a class/method/field to public/package protected/protected/private (by <a href="https://github.com/rasa-silva">rasa-silva</a>)</li>
86+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/24">New Fix</a>]: Remove public/abstract/final modifiers from field declarations within interfaces</li>
87+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/9">New Fix</a>]: Convert from char and string and back</li>
88+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/10">New Fix</a>]: Convert number in literal to number and back</li>
89+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/12">New Fix</a>]: Convert to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty()</li>
90+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/31">New Fix</a>]: Convert from if/else to ternary and back</li>
91+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/32">New Fix</a>]: Invert ternary if/else</li>
92+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/34">New Hint</a>]: Report methods that have class name</li>
93+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/29">Updated Fix</a>]: "Convert to assertTrue/assertFalse" now supports junit.framework.Assert too</li>
94+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/20">Updated Fix</a>]: "Replace +..." hints can now be configured</li>
95+
</ul>
3296

33-
Compatible to NetBeans 7.4 and higher
97+
<h3>1.1.0:</h3>
98+
<ul>
99+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/11">New Fix</a>]: Support transformation to BigDecimal constants</li>
100+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/5">New Fix</a>]: Split a string at caret</li>
101+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/13">New Fix</a>]: Convert to assertTrue/assertFalse</li>
102+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/14">New Fix</a>]: Remove "public abstract" modifiers from method declarations within interfaces</li>
103+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/8">Bugfix</a>]: Literals with quoted Strings won't be copied properly to clipboard</li>
104+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/7">Refactoring</a>]: Convert to maven based module</li>
105+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/18">Refactoring</a>]: Hints should be proposals instead of errors/warnings</li>
106+
</ul>
107+
<h3>1.0.x:</h3>
108+
<ul>
109+
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/1">Bugfix</a>]: Literals with quoted Strings create uncompileable code</li>
110+
</ul>
111+
<h2>
112+
<a name="further-information" class="anchor" href="#further-information"><span class="mini-icon mini-icon-link"></span></a>Further information:</h2>
113+
114+
<p>This plugin is orginally based on code from the <em>"I18N Checker"</em> plugin from <em>Jan Lahoda</em>.
115+
The original sourcecode can be found at <a href="http://hg.netbeans.org/main/contrib/file/tip/editor.hints.i18n">http://hg.netbeans.org/main/contrib/file/tip/editor.hints.i18n</a></p>
116+
117+
<p>License remains CDDL-GPL-2-CP - <a href="http://www.netbeans.org/cddl-gplv2.html">http://www.netbeans.org/cddl-gplv2.html</a></p>
118+
119+
<p>
120+
Provide defects, request for enhancements and feedback at <a href=https://github.com/markiewb/nb-additional-hints/issues">https://github.com/markiewb/nb-additional-hints/issues</a>
121+
</p>
122+
<p>Compatible to NetBeans 8.1+</p>
123+
<p>
124+
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4CMP92RZELE2"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" alt="btn_donate_SM.gif"></a>
125+
126+
</p>

doc/screenshot.png

-3.74 KB
Loading

pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>de.markiewb.netbeans.plugins</groupId>
66
<artifactId>AdditionalHints</artifactId>
7-
<version>1.6.0.10</version>
7+
<version>1.6.1.0</version>
88
<packaging>nbm</packaging>
99

1010
<name>Additional Java hints</name>
@@ -220,9 +220,13 @@
220220
&lt;/ul&gt;
221221

222222
&lt;h2&gt;Example:&lt;/h2&gt;
223-
&lt;img src="https://raw.githubusercontent.com/markiewb/nb-additional-hints/v1.4.0/doc/screenshot.png"/&gt;
223+
&lt;img src="https://raw.githubusercontent.com/markiewb/nb-additional-hints/v1.6.1/doc/screenshot.png"/&gt;
224224

225225
&lt;h2&gt;Updates&lt;/h2&gt;
226+
&lt;h3&gt;1.6.1:&lt;/h3&gt;
227+
&lt;ul&gt;
228+
&lt;li&gt;[&lt;a href="https://github.com/markiewb/nb-additional-hints/issues/78"&gt;Bugfix&lt;/a&gt;]: Fixed: Hints for converting ternary to if and back are missing&lt;/li&gt;
229+
&lt;/ul&gt;
226230
&lt;h3&gt;1.6.0:&lt;/h3&gt;
227231
&lt;ul&gt;
228232
&lt;li&gt;[&lt;a href="https://github.com/markiewb/nb-additional-hints/issues/55"&gt;New Fix&lt;/a&gt;]: Replace with null-assignment to Optional with Optional.empty()&lt;/li&gt;
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/*
2+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
*
4+
* Copyright 2014 Oracle and/or its affiliates. All rights reserved.
5+
*
6+
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7+
* Other names may be trademarks of their respective owners.
8+
*
9+
* The contents of this file are subject to the terms of either the GNU
10+
* General Public License Version 2 only ("GPL") or the Common
11+
* Development and Distribution License("CDDL") (collectively, the
12+
* "License"). You may not use this file except in compliance with the
13+
* License. You can obtain a copy of the License at
14+
* http://www.netbeans.org/cddl-gplv2.html
15+
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16+
* specific language governing permissions and limitations under the
17+
* License. When distributing the software, include this License Header
18+
* Notice in each file and include the License file at
19+
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
20+
* particular file as subject to the "Classpath" exception as provided
21+
* by Oracle in the GPL Version 2 section of the License file that
22+
* accompanied this code. If applicable, add the following below the
23+
* License Header, with the fields enclosed by brackets [] replaced by
24+
* your own identifying information:
25+
* "Portions Copyrighted [year] [name of copyright owner]"
26+
*
27+
* If you wish your version of this file to be governed by only the CDDL
28+
* or only the GPL Version 2, indicate your decision by adding
29+
* "[Contributor] elects to include this software in this distribution
30+
* under the [CDDL or GPL Version 2] license." If you do not indicate a
31+
* single choice of license, a recipient has the option to distribute
32+
* your version of this file under either the CDDL, the GPL Version 2 or
33+
* to extend the choice of license to its licensees as provided above.
34+
* However, if you add GPL Version 2 code and therefore, elected the GPL
35+
* Version 2 license, then the option applies only if the new code is
36+
* made subject to such option by the copyright holder.
37+
*
38+
* Contributor(s):
39+
*
40+
* Portions Copyrighted 2014 Sun Microsystems, Inc.
41+
* Portions Copyrighted 2014 [email protected]
42+
*/
43+
package de.markiewb.netbeans.plugins.hints.ternary;
44+
45+
import com.sun.source.util.TreePath;
46+
import org.netbeans.spi.editor.hints.ErrorDescription;
47+
import org.netbeans.spi.editor.hints.Fix;
48+
import org.netbeans.spi.editor.hints.Severity;
49+
import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
50+
import org.netbeans.spi.java.hints.Hint;
51+
import org.netbeans.spi.java.hints.HintContext;
52+
import org.netbeans.spi.java.hints.TriggerPattern;
53+
import org.netbeans.spi.java.hints.TriggerPatterns;
54+
import org.openide.util.NbBundle;
55+
56+
/**
57+
*
58+
* @author markiewb
59+
*/
60+
@NbBundle.Messages({
61+
"DN_ToTernaryReturn=Convert to ternary return",
62+
"DESC_ToTernaryReturn=Converts if statement to ternary return statement. <p>For example: <tt>if ($cond) {return $a;} else {return $b;}</tt> will be transformed to <tt>return ($cond) ? $a : $b;</tt></p><p>Provided by <a href=\"https://github.com/markiewb/nb-additional-hints\">nb-additional-hints</a> plugin</p>",
63+
"DN_ToIfElseReturn=Convert to if/else return",
64+
"DESC_ToIfElseReturn=Converts ternary return statement to if/else statement. <p>For example: <tt>return ($cond) ? $a : $b;</tt> will be transformed to <tt>if ($cond) {return $a;} else {return $b;}</tt></p><p>Provided by <a href=\"https://github.com/markiewb/nb-additional-hints\">nb-additional-hints</a> plugin</p>",
65+
"DN_ToTernaryAssign=Convert to ternary",
66+
"DESC_ToTernaryAssign=Converts if statement to ternary assignment statement. <p>For example: <tt>if ($cond) {$var = $a;} else {$var = $b;}</tt> will be transformed to <tt>$var = ($cond) ? $a : $b;</tt></p><p>Provided by <a href=\"https://github.com/markiewb/nb-additional-hints\">nb-additional-hints</a> plugin</p>",
67+
"DN_ToIfElseAssign=Convert to if/else",
68+
"DESC_ToIfElseAssign=Converts ternary assignment statement to if/else statement. <p>For example: <tt>$var = ($cond) ? $a : $b;</tt> will be transformed to <tt>if ($cond) {$var = $a;} else {$var = $b;}</tt></p><p>Provided by <a href=\"https://github.com/markiewb/nb-additional-hints\">nb-additional-hints</a> plugin</p>",})
69+
public class ToTernary {
70+
71+
@TriggerPattern(value = "if ($cond) {return $a;} else {return $b;}")
72+
@Hint(displayName = "#DN_ToTernaryReturn", description = "#DESC_ToTernaryReturn", category = "suggestions", hintKind = Hint.Kind.ACTION, severity = Severity.HINT)
73+
@NbBundle.Messages("ERR_ToTernaryReturn=Convert to ternary return")
74+
public static ErrorDescription toTernaryReturn(HintContext ctx) {
75+
Fix fix = org.netbeans.spi.java.hints.JavaFixUtilities.rewriteFix(ctx, Bundle.ERR_ToTernaryReturn(), ctx.getPath(), "return ($cond)?$a:$b;");
76+
return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), Bundle.ERR_ToTernaryReturn(), fix);
77+
}
78+
79+
@TriggerPattern(value = "return ($cond)?$a:$b;")
80+
@Hint(displayName = "#DN_ToIfElseReturn", description = "#DESC_ToIfElseReturn", category = "suggestions", hintKind = Hint.Kind.ACTION, severity = Severity.HINT)
81+
@NbBundle.Messages("ERR_ToIfElseReturn=Convert to if/else return")
82+
public static ErrorDescription toIfElseReturn(HintContext ctx) {
83+
Fix fix = org.netbeans.spi.java.hints.JavaFixUtilities.rewriteFix(ctx, Bundle.ERR_ToIfElseReturn(), ctx.getPath(), "if ($cond) {return $a;} else {return $b;}");
84+
return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), Bundle.ERR_ToIfElseReturn(), fix);
85+
}
86+
87+
@TriggerPattern(value = "if ($cond) {$var = $a;}else {$var = $b;}")
88+
@Hint(displayName = "#DN_ToTernaryAssign", description = "#DESC_ToTernaryAssign", category = "suggestions", hintKind = Hint.Kind.ACTION, severity = Severity.HINT)
89+
@NbBundle.Messages("ERR_ToTernaryAssign=Convert to ternary")
90+
public static ErrorDescription toTernaryAssign(HintContext ctx) {
91+
Fix fix = org.netbeans.spi.java.hints.JavaFixUtilities.rewriteFix(ctx, Bundle.ERR_ToTernaryAssign(), ctx.getPath(), "$var=($cond)?$a:$b;");
92+
return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), Bundle.ERR_ToTernaryAssign(), fix);
93+
}
94+
95+
@TriggerPatterns(
96+
{
97+
// @TriggerPattern(value = "$var1=($cond)?$a:$b;"),
98+
@TriggerPattern(value = "$var2=$cond?$a:$b;"),
99+
// @TriggerPattern(value = "$type $var3=($cond)?$a:$b;"),
100+
@TriggerPattern(value = "$type $var4=$cond?$a:$b;")
101+
}
102+
)
103+
@Hint(displayName = "#DN_ToIfElseAssign", description = "#DESC_ToIfElseAssign", category = "suggestions", hintKind = Hint.Kind.ACTION, severity = Severity.HINT)
104+
@NbBundle.Messages("ERR_ToIfElseAssign=Convert to if/else")
105+
public static ErrorDescription toIfElseAssign(HintContext ctx) {
106+
107+
Fix fix = null;
108+
// if (ctx.getVariables().containsKey("$var1")) {
109+
// fix = org.netbeans.spi.java.hints.JavaFixUtilities.rewriteFix(ctx, Bundle.ERR_ToIfElseAssign(), ctx.getPath(), "if (($cond)) {$var1 = $a;} else {$var1 = $b;}");
110+
// }
111+
if (ctx.getVariables().containsKey("$var2")) {
112+
fix = org.netbeans.spi.java.hints.JavaFixUtilities.rewriteFix(ctx, Bundle.ERR_ToIfElseAssign(), ctx.getPath(), "if ($cond) {$var2 = $a;} else {$var2 = $b;}");
113+
}
114+
// if (ctx.getVariables().containsKey("$var3")) {
115+
// fix = org.netbeans.spi.java.hints.JavaFixUtilities.rewriteFix(ctx, Bundle.ERR_ToIfElseAssign(), ctx.getPath(), "$type $var3; if (($cond)) {$var3 = $a;} else {$var3 = $b;}");
116+
// }
117+
if (ctx.getVariables().containsKey("$var4")) {
118+
fix = org.netbeans.spi.java.hints.JavaFixUtilities.rewriteFix(ctx, Bundle.ERR_ToIfElseAssign(), ctx.getPath(), "$type $var4; if ($cond) {$var4 = $a;} else {$var4 = $b;}");
119+
}
120+
if (null != fix) {
121+
return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), Bundle.ERR_ToIfElseAssign(), fix);
122+
} else {
123+
return null;
124+
}
125+
}
126+
}

0 commit comments

Comments
 (0)