-
Notifications
You must be signed in to change notification settings - Fork 3
/
pom.xml
316 lines (298 loc) · 18.7 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.markiewb.netbeans.plugins</groupId>
<artifactId>AdditionalHints</artifactId>
<version>1.6.1.0</version>
<packaging>nbm</packaging>
<name>Additional Java hints</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<netbeans.version>RELEASE81</netbeans.version>
<netbeans.run.params.ide/>
<!--<netbeans.run.params>-J-javaagent:"${current.jrebel.agent.path}" -J-Drebel.log=true ${netbeans.run.params.ide}</netbeans.run.params>-->
</properties>
<organization>
<name>Benno Markiewicz ([email protected])</name>
</organization>
<url>https://github.com/markiewb/nb-additional-hints</url>
<repositories>
<!--
Repository hosting NetBeans modules, especially APIs.
Versions are based on IDE releases, e.g.: RELEASE691
To create your own repository, use: nbm:populate-repository
-->
<repository>
<id>netbeans</id>
<name>NetBeans</name>
<url>http://bits.netbeans.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-annotations-common</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-spi-editor-hints</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-loaders</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-java-source</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-java-source-base</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-spi-java-hints</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-ui</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-java-hints-test</artifactId>
<version>${netbeans.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-libs-javacapi</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-libs-junit4</artifactId>
<version>${netbeans.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-nbjunit</artifactId>
<version>${netbeans.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-modules-parsing-nb</artifactId>
<version>${netbeans.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-modules-projectapi-nb</artifactId>
<version>${netbeans.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-text</artifactId>
<version>${netbeans.version}</version>
</dependency>
</dependencies>
<build>
<finalName>de-markiewb-netbeans-plugins-hints-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.11.1</version>
<extensions>true</extensions>
<configuration>
<!-- keep this id, else the update from existing versions will fail
and will cause classpath issues in the log file
-->
<codeNameBase>de.markiewb.netbeans.plugins.hints</codeNameBase>
<keystore>private/keystore</keystore>
<keystorealias>myself</keystorealias>
<licenseFile>CDDL-GPL-2-CP</licenseFile>
<licenseName>CDDL-GPL-2-CP</licenseName>
</configuration>
</plugin>
<plugin>
<!-- NetBeans 6.9+ requires JDK 6, starting NetBeans 7.4 source 1.7 will be required -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<argLine>-Djava.endorsed.dirs=${endorsed.dir}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
<description><h1>Additional Java hints for NetBeans IDE</h1>
<h2>Supported Hints:</h2>
<ul>
<li>"Replace '+' with 'MessageFormat.format()'"</li>
<li>"Replace '+' with 'new StringBuilder().append()'"</li>
<li>"Replace '+' with 'String.format()'"</li>
<li>"Join literals"</li>
<li>"Copy joined literals to clipboard"</li>
<li>"Split at linebreaks"</li>
<li>"Split at caret" (since 1.1)</li>
<li>"Convert to assertTrue/assertFalse" (since 1.1)</li>
<li>"Support transformation to BigDecimal constants" (since 1.1)</li>
<li>"Remove "public abstract" modifiers from method declarations within interfaces" (since 1.1)</li>
<li>"Remove public/abstract/final modifiers from field declarations within interfaces" (since 1.2)</li>
<li>"Change modifiers" (since 1.2)</li>
<li>"Convert char to string and back" (since 1.2)</li>
<li>"Convert number in literal to number and back" (since 1.2)</li>
<li>"Convert to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty()" (since 1.2)</li>
<li>"Convert from if/else to ternary and back" (since 1.2)</li>
<li>"Invert ternary if/else" (since 1.2)</li>
<li>"Report methods that have class name" (since 1.2, no transformation)</li>
<li>"Add "this." to methods and variables" (since 1.3, disabled by default)</li>
<li>"Replace with Optional.isPresent()/Convert return null to return Optional.empty()" (since 1.5)</li>
<li>"Replace with null-assignment to Optional with Optional.empty()| (since 1.6)</li>
<li>"Convert return xxx to return Optional.ofNullable(xxx)/Optional.of(xxx)/Optional.empty()| (since 1.6)</li>
<li>"Convert to assertNull" (since 1.6)</li>
<li>"Replace with org.junit.Assert" (since 1.6)</li>
</ul>
<h2>Example:</h2>
<img src="https://raw.githubusercontent.com/markiewb/nb-additional-hints/v1.6.1/doc/screenshot.png"/>
<h2>Updates</h2>
<h3>1.6.1:</h3>
<ul>
<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>
</ul>
<h3>1.6.0:</h3>
<ul>
<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>
<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>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/63">New Fix</a>]: Convert to assertNull</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/68">New Fix</a>]: Replace with org.junit.Assert</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/54">Updated Fix</a>]: "Replace +..." works for more expressions</li>
<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>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/58">Updated Fix</a>]: Make "Change modifiers" hints non-intrusive</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/59">Updated Fix</a>]: Make "Change modifiers" hints work for constructors too</li>
<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>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/75">Updated Fix </a>]: java.lang.NullPointerException in ReturnForOptional</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/70">Removed Fix</a>]: "dead instanceof" hint has been removed</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/72">Task</a>]: Update dependencies to NB 8.1</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/76">Task</a>]: Reduce dependencies</li>
</ul>
<h3>1.5.0:</h3>
<ul>
<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>
<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>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/3">Updated Fix</a>]: "Replace +..." is not proposed for erroneous conditions anymore</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/51">Updated Fix</a>]: "Replace +..." works for more expressions</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/50">Updated Fix</a>]: Remove false positive detected by "Detect dead instanceof"</li>
<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>
<li>[Task]: Update requirements JDK7 and NB7.4</li>
</ul>
<h3>1.4.0:</h3>
<ul>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/44">New Hint</a>]: Detect dead instanceof-expressions</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/2">Updated Fix</a>]: "Replace +..." hints can now supports chars too</li>
<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>
</ul>
<h3>1.3.0:</h3>
<ul>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/36">Updated Fix</a>]: "Invert ternary if/else" now supports more patterns</li>
<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>
</ul>
<h3>1.2.0:</h3>
<ul>
<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>
<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>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/9">New Fix</a>]: Convert from char and string and back</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/10">New Fix</a>]: Convert number in literal to number and back</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/12">New Fix</a>]: Convert to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty()</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/31">New Fix</a>]: Convert from if/else to ternary and back</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/32">New Fix</a>]: Invert ternary if/else</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/34">New Hint</a>]: Report methods that have class name</li>
<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>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/20">Updated Fix</a>]: "Replace +..." hints can now be configured</li>
</ul>
<h3>1.1.0:</h3>
<ul>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/11">New Fix</a>]: Support transformation to BigDecimal constants</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/5">New Fix</a>]: Split a string at caret</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/13">New Fix</a>]: Convert to assertTrue/assertFalse</li>
<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>
<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>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/7">Refactoring</a>]: Convert to maven based module</li>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/18">Refactoring</a>]: Hints should be proposals instead of errors/warnings</li>
</ul>
<h3>1.0.x:</h3>
<ul>
<li>[<a href="https://github.com/markiewb/nb-additional-hints/issues/1">Bugfix</a>]: Literals with quoted Strings create uncompileable code</li>
</ul>
<h2>
<a name="further-information" class="anchor" href="#further-information"><span class="mini-icon mini-icon-link"></span></a>Further information:</h2>
<p>This plugin is orginally based on code from the <em>"I18N Checker"</em> plugin from <em>Jan Lahoda</em>.
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>
<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>
<p>
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>
</p>
<p>Compatible to NetBeans 8.1+</p>
<p>
<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>
</p></description>
<scm>
<connection>scm:git:https://github.com/markiewb/nb-additional-hints.git</connection>
</scm>
</project>