This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/netbeans-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 3a1b520  Automated site publishing by Jenkins build 1155
3a1b520 is described below

commit 3a1b520c412c43e2ee5a73faaf6f1b41fd7fbb9d
Author: jenkins <bui...@apache.org>
AuthorDate: Mon Feb 10 19:54:37 2020 +0000

    Automated site publishing by Jenkins build 1155
---
 content/help/index.html              |   9 +
 content/jackpot/HintsFileFormat.html | 784 +++++++++++++++++++++++++++++++++++
 content/{help => jackpot}/index.html | 154 ++++---
 3 files changed, 865 insertions(+), 82 deletions(-)

diff --git a/content/help/index.html b/content/help/index.html
index 9a0835e..fa86364 100644
--- a/content/help/index.html
+++ b/content/help/index.html
@@ -85,6 +85,7 @@
 <li><a href="#documentation">Learning Trails</a></li>
 <li><a href="#_other_resources">Other resources</a></li>
 <li><a href="#wiki">Apache NetBeans Wiki</a></li>
+<li><a href="#jackpot">Java Declarative Refactorings</a></li>
 <li><a href="#support">Support</a></li>
 </ul>
 </div>
@@ -163,6 +164,14 @@ The learning trails, tutorials, and related documentation 
are works in progress,
 </div>
 </div>
 <div class="sect1">
+<h2 id="jackpot">Java Declarative Refactorings</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Documentation on how to declare and use Java Declarative Refactorings <a 
href="/jackpot/index.html">is here</a>.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
 <h2 id="support">Support</h2>
 <div class="sectionbody">
 <div class="dlist">
diff --git a/content/jackpot/HintsFileFormat.html 
b/content/jackpot/HintsFileFormat.html
new file mode 100644
index 0000000..3c291a8
--- /dev/null
+++ b/content/jackpot/HintsFileFormat.html
@@ -0,0 +1,784 @@
+
+<!DOCTYPE html>
+<html class="no-js" lang="en" dir="ltr">
+    
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="x-ua-compatible" content="ie=edge">
+    <title>Java Declarative Hints Language</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="description" content="Java Declarative Hints Language">
+    <meta name="author" content="Apache NetBeans">
+    <meta name="keywords" content="Apache NetBeans, Jackpot">
+    <meta name="generator" content="Apache NetBeans">
+    <link rel="stylesheet" href="/css/font-awesome.min.css">
+    
+    <link rel="stylesheet" href="/css/netbeans.css">
+    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+    <link rel="manifest" href="/site.webmanifest">
+    <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
+    <meta name="msapplication-TileColor" content="#ffc40d">
+    <meta name="theme-color" content="#ffffff">
+    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700"; 
rel="stylesheet"> 
+    <!--
+        Licensed to the Apache Software Foundation (ASF) under one
+        or more contributor license agreements.  See the NOTICE file
+        distributed with this work for additional information
+        regarding copyright ownership.  The ASF licenses this file
+        to you under the Apache License, Version 2.0 (the
+        "License"); you may not use this file except in compliance
+        with the License.  You may obtain a copy of the License at
+        http://www.apache.org/licenses/LICENSE-2.0
+        Unless required by applicable law or agreed to in writing,
+        software distributed under the License is distributed on an
+        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+        KIND, either express or implied.  See the License for the
+        specific language governing permissions and limitations
+        under the License.
+    -->
+</head>
+
+
+    <body>
+        
+
+<div class="title-bar" data-responsive-toggle="responsive-menu" 
data-hide-for="medium">
+    <button type="button" data-toggle="responsive-menu"><i style='font-size: 
32px; color: #fff; padding: 8px' class='fa fa-bars'></i></button>
+    <div class="title-bar-title">Apache NetBeans</div>
+</div>
+<div class="top-bar" id="responsive-menu">
+    <div class='top-bar-left'>
+        <a class='title' href="/"><img src='/images/apache-netbeans.svg' 
style='padding: 8px; height: 48px;'></img> Apache NetBeans</a>
+    </div>
+    <div class="top-bar-right">
+        <ul class="vertical medium-horizontal menu" 
data-responsive-menu="drilldown medium-dropdown">
+            <li> <a href="/community/index.html">Community</a> </li>
+            <li> <a href="/participate/index.html">Participate</a> </li>
+            <li> <a href="https://blogs.apache.org/netbeans/";>Blog</a></li>
+            <li> <a href="/help/index.html">Get Help</a> </li>
+            <li> <a href="/plugins/index.html">Plugins</a> </li>
+            <li> <a href="/download/index.html">Download</a> </li>
+        </ul>
+    </div>
+</div>
+
+
+        
+<!-- src/templates/news -->
+<section class="hero news alternate">
+    <div class='grid-container'>
+        <div class='cell'>
+            <div class="annotation">Just released!</div>
+            <h1 syle='font-size: 2rem'>Apache NetBeans 11.2</h1>
+            <p><a class="button success" 
href="/download/nb112/index.html">Find out more</a></p>
+        </div>
+    </div>
+</section>
+
+        <div class='grid-container main-content'>
+            <h1 class="sect0">Java Declarative Hints Language</h1>
+            <div class="sect1">
+<h2 id="_basic_structure">Basic Structure</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The rules file consists of any number of transformation rules.
+The rule is defined as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java">     &lt;pattern&gt;
+ =&gt; &lt;fix-pattern&gt;
+ =&gt; &lt;fix-pattern&gt;
+ ;;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Each occurrence of <code>&lt;pattern&gt;</code> in the source code can be 
rewritten to one of the <code>&lt;fix-pattern&gt;</code> s. For example, the 
following transformation rule:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java">    $1 == null
+ =&gt; null == $1
+ ;;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will rewrite the following code:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> if (a == null) {
+    System.err.println("a is null");
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>to:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> if (null == a) {
+     System.err.println("a is null");
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note: <code>$1</code> is a variable, explained in the <a 
href="#variables">Variables</a> section.</p>
+</div>
+<div class="paragraph">
+<p>Note: batch refactoring will typically use only the first applicable fix 
patterns of each applicable rule.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_patterns">Patterns</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>The pattern is a Java expression, statement or several statements.
+All references to classes in the pattern need to be resolvable, i.e. either 
fully qualified names need to be used, or the custom import section must be 
used (see <a href="#custom-imports">Custom Imports</a>).</p>
+</div>
+<div class="paragraph">
+<p>TODO: equivalence - static elements are checked only against themselves, 
blocks with
+one statement considered equivalent to single statement.</p>
+</div>
+<div class="paragraph">
+<p>Note: variable declaration is a Java statement.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="variables">Variables</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Variables start with the dollar sign (<code>$</code>). In the pattern, 
first occurrences of a variable is bound to the actual sub-tree that appears in 
the code. Second and following occurrences of the variable the actual sub-tree 
is verified against the subtree bound to the variable. The pattern occurs in 
the text only if the actual sub-tree matches the sub-tree bound to the 
variable. In the fix pattern, all occurrences of the variables are replaced 
with the tree(s) bound to the respe [...]
+</div>
+<div class="paragraph">
+<p>The forms of the variables are:</p>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>$[a-zA-Z0-1_]+</code></dt>
+<dd>
+<p>any expression</p>
+</dd>
+<dt class="hdlist1"><code>$[a-zA-Z0-1_]+;</code></dt>
+<dd>
+<p>any statement</p>
+</dd>
+<dt class="hdlist1"><code>$[a-zA-Z0-1_]+$</code></dt>
+<dd>
+<p>any number of sub-trees (except statements - see next definition)</p>
+</dd>
+<dt class="hdlist1"><code>$[a-zA-Z0-1_]+$;</code></dt>
+<dd>
+<p>any number of statements</p>
+</dd>
+<dt class="hdlist1"><code>$_</code></dt>
+<dd>
+<p>for patterns undefined, for fixes and conditions automatically bound to the 
current matched region</p>
+</dd>
+<dt class="hdlist1"><code>$$[a-zA-Z0-1_]+</code></dt>
+<dd>
+<p>reserved&#8201;&#8212;&#8201;do not use</p>
+</dd>
+</dl>
+</div>
+<div class="sect2">
+<h3 id="_repeating_variables">Repeating Variables</h3>
+<div class="paragraph">
+<p>The same variable can appear multiple times in the pattern. The pattern 
will match if and only if all parts of the subject tree that correspond to the 
variable occurrences are "the same". Two trees are "the same", if they have the 
same structure and each of the two corresponding tree node refers to the same 
element. Exceptions:
+* single statement and a block with single statement are equivalent provided 
the statements are equivalent
+* implicit "this." may be omitted</p>
+</div>
+<div class="paragraph">
+<p>So, for example, the following pattern will match all assignments that read 
and write to the same variable:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $var = $var</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>So for example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> public class Test {
+     private int i;
+
+     public void t(Test other) {
+         i = i; //will match the pattern
+         this.i = i; //will match the pattern
+         i = this.i; //will match the pattern
+         i = other.i; //will NOT match the pattern
+     }
+ }</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_multi_variables">Multi Variables</h3>
+<div class="sect3">
+<h4 id="_expressions">Expressions</h4>
+<div class="paragraph">
+<p><code>$&lt;name&gt;$</code> will match any number of expressions, e.g.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> new java.lang.String($args$)</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will match any of the String&#8217;s constructor. Can be be mixed with the 
single-expression variables, e.g.:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> new java.lang.String($charArray, $rest$) :: $charArray 
instanceof char[]</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will match both the <code>String(char[])</code> and <code>String(char[], 
int, int)</code> constructors.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_statements_and_members">Statements and Members</h4>
+<div class="paragraph">
+<p><code>$&lt;name&gt;$;</code> will match any number of statements or class 
members. The semicolon is needed so that the pattern is not ambiguous. The 
pattern parser might sometimes recover from the missing semicolon, but omitting 
it is strongly discouraged for statement/members.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_caveats">Caveats</h4>
+<div class="paragraph">
+<p>In general, a given code may match pattern with multi variables multiple 
times with different assignments of subtrees to the multi variables. For 
example, consider pattern:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $preceding$;
+ $lock.lock();
+ $intervening$;
+ $lock.unlock();
+ $trailing$;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and code:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> lock.lock();
+ System.err.println("1");
+ lock.unlock();
+ lock.lock();
+ System.err.println("2");
+ lock.unlock();</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There are two possible matches, one with empty <code>$preceding$;</code> 
and one with empty <code>$trailing$;</code> multi variables. But the current 
engine cannot currently report both of these matches, only the first one.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_modifiers">Modifiers</h3>
+<div class="paragraph">
+<p>A special form to express any modifiers is <code>$mods$</code>. Annotations 
generally belong into the modifiers. E.g.:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $mods$ $type $name;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will match any of:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> private int I;
+ private static int I;
+ @Deprecated private static int I;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There are many caveats to the modifiers, one cannot currently express that 
the modifiers must contain a specific annotation, specific modifier (can be 
expressed using conditions), etc. Only "any modifiers" is supported.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_patterns_with_multiple_statements">Patterns with Multiple 
Statements</h3>
+<div class="paragraph">
+<p>It is possible to express a pattern that consists of several consecutive 
statements, e.g.:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java">    java.lang.System.err.print($whatever$);
+    java.lang.System.err.println();
+ =&gt; java.lang.System.err.println($whatever$);
+ ;;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will convert:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> private void t() {
+     System.err.println("This is an example:");
+     System.err.print("Hello, world!");
+     System.err.println();
+     System.err.println("All done.");
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>to</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> private void t() {
+     System.err.println("This is an example:");
+     System.err.println("Hello, world!");
+     System.err.println("All done.");
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note that if intervening statements are allowed, they need to be specified 
explicitly using <code>$&lt;name&gt;</code>. For example, the above pattern 
won&#8217;t match this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> private void t() {
+     System.err.println("This is an example:");
+     System.err.print("Hello, world!");
+     printHelp();
+     System.err.println();
+     System.err.println("All done.");
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>To allow intervening statements:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $document.readLock();
+ $statementsUnderLock$;
+ $document.readUnlock(); :: $document instanceof 
javax.swing.text.AbstractDocument
+ =&gt;
+ $document.readLock();
+ try {
+     $statementsUnderLock$;
+ } finally {
+     $document.readUnlock();
+ }
+ ;;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>which will match and rewrite:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> private void t(AbstractDocument doc) {
+     doc.readLock();
+     System.err.println("Under the lock!");
+     doc.readUnlock();
+ }</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_zero_or_one">Zero-or-one</h3>
+<div class="paragraph">
+<p>If some part of the tree is optional, the multi-expression or multi 
statement variable can be used to express that the pattern should match whether 
or not that optional part is present. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> if ($cond) $then;
+ else $else$;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will match both:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> if (true) {
+     System.err.println("foo bar");
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> if (true) {
+     System.err.println("foo bar");
+ } else {
+     System.err.println("bar foo");
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Can be also used to express an optional variable initializer:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $modifiers$ $variableType $name = $init$;</code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_conditions">Conditions</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Conditions are specified after <code>::</code>, their result can be negated 
using <code>!</code> and result of multiple conditions can be and-ed using 
<code>&amp;&amp;</code>. Conditions can appear both on the whole rule, in which 
case the rule will only match if the expression will evaluate to true, or on 
fixes, in which case the fix will noly be shown if the expression will evaluate 
to true. There is no "or" currently. Specifying multiple fixes or multiple 
rules works as an implicit [...]
+</div>
+<div class="sect2">
+<h3 id="_language_conditions">Language Conditions</h3>
+<div class="paragraph">
+<p>The conditions defined directly by the language are:
+* <code>instanceof</code>: which allows to specify a type of an expression 
variable. Only expressions assignable to the given type will be bound to the 
specified variable.
+* <code>otherwise</code>: valid only on the "fixes". Will evaluate to true if 
no fix above was used. E.g. (note the constant matching - will match only if 
the string literal in the subject code will match the literal given in the 
pattern):</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java">    $str.equals("")
+ =&gt; $str.isEmpty() :: sourceVersionGE(SourceVersion.RELEASE_6)
+ =&gt; $str.length() == 0 :: otherwise
+ ;;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will rewrite <code>var.equals("")</code> to <code>var.isEmpty()</code> for 
source levels &gt;= 1.6, but to <code>var.length() == 0</code> in all other 
cases.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_standard_conditions">Standard Conditions</h3>
+<div class="paragraph">
+<p>Other standard conditions are defined in <a 
href="https://github.com/apache/netbeans/blob/master/java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/conditionapi/DefaultRuleUtilities.java";>DefaultRuleUtilities</a>.
 The notable ones are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>matchesAny(variable, one-or-more-patterns)</code> true if and only if 
at least one of the given patterns matches the tree bound to the given 
variable</p>
+</li>
+<li>
+<p><code>containsAny(variable, one-or-more-patterns)</code> true if and only 
if at least one of the given patterns matches the tree bound to the given 
variable, or any of its subtrees</p>
+</li>
+<li>
+<p><code>matchesWithBind(variable, one-patterns)</code> similar to 
<code>matchesAny</code>, but if the pattern matches, any free variables inside 
it will be bound as if it was specified as a normal pattern/rule.</p>
+</li>
+<li>
+<p><code>matches(one-patterns)</code> do not use - semi-deprecated. Use 
<code>matchesAny($_, the-pattern)</code> instead.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Note: Special variable <code>$_</code> represents the whole matching 
region.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_custom_conditions">Custom Conditions</h3>
+<div class="paragraph">
+<p>TBD</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_display_names_and_localization">Display Names and Localization</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>TBD</p>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="custom-imports">Custom Imports</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+<div class="sect1">
+<h2 id="_notable_patterns">Notable Patterns</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_catch_pattern">Catch Pattern</h3>
+<div class="paragraph">
+<p>This:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> try {
+     $statements$;
+ } catch $catches$
+   finally {
+   $finally$;
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>will match any resource-less try statement with finally block, with or 
without catch clauses. To find a specific catch clause:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> try {
+     $statements$;
+ } catch $precedingCatches$
+   catch (NullPointerException ex) {
+   $code$;
+ } catch $trailingCatches$
+   finally {
+   $finally$;
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>There is currently no form to express optional finally section (i.e. two 
patterns are required, one with and one without finally).</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_full_variable">Full Variable</h3>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $modifiers$ $type $name = $init$;</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_full_method">Full Method</h3>
+<div class="paragraph">
+<p>For methods with or without type parameters and with body:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $modifiers$ &lt;$typeParams$&gt; $returnType $name($args$) 
throws $thrown$ {
+     $bodyStatements$;
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>For methods with or without type parameters and without body and without 
default value:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $modifiers$ &lt;$typeParams$&gt; $returnType $name($args$) 
throws $thrown$;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note 1: this should work for annotation attribute methods with and without 
default value, but it does not work currently:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java">$modifiers$ $returnType $name() default $def$;</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_full_class">Full Class</h3>
+<div class="paragraph">
+<p>For classes without type parameters:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $modifiers$ class $name extends $superClass$ implements 
$superInterfaces$ {
+     $members$;
+ }</code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">Options</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Various options can be specified inside 
<code>&lt;!&#8230;&#8203;&gt;</code> block. The currently recognized options 
are:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>error</code> (on fixes): report the given error through the standard 
refactoring means to the user (e.g. in Inspect and Transform). Example:</p>
+</li>
+</ul>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>    System.err.println("Hello, world!");
+ =&gt; &lt;!error='Cannot convert'&gt;
+ ;;</pre>
+</div>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>warning</code> (on fixes): as <code>error</code> but produces 
refactoring&#8217;s warning instead of an error</p>
+</li>
+<li>
+<p><code>hint</code> (on hints): define a explicit ID for the hint. If 
missing, an ID will be inferred from the file name</p>
+</li>
+<li>
+<p><code>description</code> (on hints): a longer description of the hint. Will 
appear in the Tools/Options.</p>
+</li>
+<li>
+<p><code>hint-category</code> (on hints): the hint category into which the 
hint should be assigned in Tools/Options and Inspect&amp;Transform. Most hints 
should not specify this.</p>
+</li>
+<li>
+<p><code>suppress-warnings</code> (on hints): keys for @SuppressWarnings, 
which will automatically suppress the given hint. Can specify more keys, 
separated with ','. An empty key has a special meaning: the keys before the 
empty key will be offered to the user for inclusion in the source code, while 
the after the empty key will not. All the keys (except the empty one) will 
suppress the warning.</p>
+</li>
+<li>
+<p><code>ensure-dependency</code> (on hints or files): will ensure that the 
current module/project will have the specified dependency. Format for 
specifying the dependency is currently not specified. Do not use unless you 
know what you are doing.</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_known_bugs">Known Bugs</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Multi statement pattern involving modifiers variable do not currently work 
properly. For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> $mods$ $type $name;
+ $name = $init;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>does not work.</p>
+</div>
+<div class="paragraph">
+<p>There is a bug that this:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java"> if ($cond) $then;
+ else $else$;
+=&gt;
+ if (!$cond) $then;
+ else $else$;
+;;</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>does not work properly.</p>
+</div>
+<div class="paragraph">
+<p><code>otherwise</code> condition cannot be negated.</p>
+</div>
+</div>
+</div>
+            
+<section class='tools'>
+    <ul class="menu align-center">
+        <li><a title="Facebook" href="https://www.facebook.com/NetBeans";><i 
class="fa fa-md fa-facebook"></i></a></li>
+        <li><a title="Twitter" href="https://twitter.com/netbeans";><i 
class="fa fa-md fa-twitter"></i></a></li>
+        <li><a title="Github" href="https://github.com/apache/netbeans";><i 
class="fa fa-md fa-github"></i></a></li>
+        <li><a title="YouTube" 
href="https://www.youtube.com/user/netbeansvideos";><i class="fa fa-md 
fa-youtube"></i></a></li>
+        <li><a title="Slack" 
href="https://tinyurl.com/netbeans-slack-signup/";><i class="fa fa-md 
fa-slack"></i></a></li>
+        <li><a title="JIRA" 
href="https://issues.apache.org/jira/projects/NETBEANS/summary";><i class="fa 
fa-mf fa-bug"></i></a></li>
+    </ul>
+    <ul class="menu align-center">
+        
+        <li><a 
href="https://github.com/apache/netbeans-website/blob/master/netbeans.apache.org/src/content/jackpot/HintsFileFormat.asciidoc";
 title="See this page in github"><i class="fa fa-md fa-edit"></i> See this page 
in GitHub.</a></li>
+    </ul>
+</section>
+
+        </div>
+        
+
+<div class='grid-container incubator-area' style='margin-top: 64px'>
+    <div class='grid-x grid-padding-x'>
+        <div class='large-auto cell text-center'>
+            <a href="https://www.apache.org/";>
+                <img style="width: 320px" title="Apache Software Foundation" 
src="/images/asf_logo_wide.svg" />
+            </a>
+        </div>
+        <div class='large-auto cell text-center'>
+            <a href="https://www.apache.org/events/current-event.html";>
+               <img style="width:234px; height: 60px;" title="Apache Software 
Foundation current event" 
src="https://www.apache.org/events/current-event-234x60.png"/>
+            </a>
+        </div>
+    </div>
+</div>
+<footer>
+    <div class="grid-container">
+        <div class="grid-x grid-padding-x">
+            <div class="large-auto cell">
+                
+                <h1><a href="/about/index.html">About</a></h1>
+                <ul>
+                    <li><a 
href="https://netbeans.apache.org/community/who.html";>Who's Who</a></li>
+                    <li><a 
href="https://www.apache.org/foundation/thanks.html";>Thanks</a></li>
+                    <li><a 
href="https://www.apache.org/foundation/sponsorship.html";>Sponsorship</a></li>
+                    <li><a 
href="https://www.apache.org/security/";>Security</a></li>
+                </ul>
+            </div>
+            <div class="large-auto cell">
+                <h1><a href="/community/index.html">Community</a></h1>
+                <ul>
+                    <li><a href="/community/mailing-lists.html">Mailing 
lists</a></li>
+                    <li><a href="/community/committer.html">Becoming a 
committer</a></li>
+                    <li><a href="/community/events.html">NetBeans 
Events</a></li>
+                    <li><a 
href="https://www.apache.org/events/current-event.html";>Apache Events</a></li>
+                </ul>
+            </div>
+            <div class="large-auto cell">
+                <h1><a href="/participate/index.html">Participate</a></h1>
+                <ul>
+                    <li><a href="/participate/submit-pr.html">Submitting Pull 
Requests</a></li>
+                    <li><a href="/participate/report-issue.html">Reporting 
Issues</a></li>
+                    <li><a 
href="/participate/index.html#documentation">Improving the 
documentation</a></li>
+                </ul>
+            </div>
+            <div class="large-auto cell">
+                <h1><a href="/help/index.html">Get Help</a></h1>
+                <ul>
+                    <li><a 
href="/help/index.html#documentation">Documentation</a></li>
+                    <li><a href="/wiki/index.asciidoc">Wiki</a></li>
+                    <li><a href="/help/index.html#support">Community 
Support</a></li>
+                    <li><a href="/help/commercial-support.html">Commercial 
Support</a></li>
+                </ul>
+            </div>
+            <div class="large-auto cell">
+                <h1><a href="/download/nb110/nb110.html">Download</a></h1>
+                <ul>
+                    <li><a href="/download/index.html">Releases</a></li>       
             
+                    <li><a href="/plugins/index.html">Plugins</a></li>
+                    <li><a href="/download/index.html#source">Building from 
source</a></li>
+                    <li><a href="/download/index.html#previous">Previous 
releases</a></li>
+                </ul>
+            </div>
+        </div>
+    </div>
+</footer>
+<div class='footer-disclaimer'>
+    <div class="footer-disclaimer-content">
+        <p>Copyright &copy; 2017-2019 <a href="https://www.apache.org";>The 
Apache Software Foundation</a>.</p>
+        <p>Licensed under the Apache <a 
href="https://www.apache.org/licenses/";>license</a>, version 2.0</p>
+        <div style='max-width: 40em; margin: 0 auto'>
+            <p>Apache, Apache NetBeans, NetBeans, the Apache feather logo and 
the Apache NetBeans logo are trademarks of <a href="https://www.apache.org";>The 
Apache Software Foundation</a>.</p>
+            <p>Oracle and Java are registered trademarks of Oracle and/or its 
affiliates.</p>
+        </div>
+        
+    </div>
+</div>
+
+
+
+        <script src="/js/vendor/jquery-3.2.1.min.js"></script>
+        <script src="/js/vendor/what-input.js"></script>
+        <script src="/js/vendor/jquery.colorbox-min.js"></script>
+        <script src="/js/vendor/foundation.min.js"></script>
+        <script src="/js/netbeans.js"></script>
+        <script>
+            
+            $(function(){ $(document).foundation(); });
+        </script>
+    </body>
+</html>
diff --git a/content/help/index.html b/content/jackpot/index.html
similarity index 71%
copy from content/help/index.html
copy to content/jackpot/index.html
index 9a0835e..8631c3b 100644
--- a/content/help/index.html
+++ b/content/jackpot/index.html
@@ -5,11 +5,11 @@
 <head>
     <meta charset="utf-8">
     <meta http-equiv="x-ua-compatible" content="ie=edge">
-    <title>Getting Help</title>
+    <title>Java Declarative Refactorings</title>
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="Apache NetBeans Help">
+    <meta name="description" content="Java Declarative Hints">
     <meta name="author" content="Apache NetBeans">
-    <meta name="keywords" content="Apache NetBeans Help">
+    <meta name="keywords" content="Apache NetBeans, Jackpot, refactoring, 
Java">
     <meta name="generator" content="Apache NetBeans">
     <link rel="stylesheet" href="/css/font-awesome.min.css">
     
@@ -78,104 +78,94 @@
 </section>
 
         <div class='grid-container main-content'>
-            <h1 class="sect0">Getting Help</h1>
-            <div id="toc" class="toc">
-<div id="toctitle"></div>
-<ul class="sectlevel1">
-<li><a href="#documentation">Learning Trails</a></li>
-<li><a href="#_other_resources">Other resources</a></li>
-<li><a href="#wiki">Apache NetBeans Wiki</a></li>
-<li><a href="#support">Support</a></li>
-</ul>
+            <h1 class="sect0">Java Declarative Refactorings</h1>
+            <div class="sect1">
+<h2 id="_introduction">Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Apache NetBeans provides language and tools to define custom Java 
refactorings,
+and run them on a specified source files, inside the NetBeans IDE, on command 
line,
+or using Apache Maven. Any standard Java "hint" may be run using these means 
as well.</p>
+</div>
+</div>
 </div>
 <div class="sect1">
-<h2 id="documentation">Learning Trails</h2>
+<h2 id="_declarative_refactoring_file">Declarative Refactoring File</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>The following learning trails provide you with everything you need to know 
to develop applications using NetBeans IDE.</p>
+<p>The easiest way to define custom Java refactorings is to place then in a 
file with extension ".hint",
+and place the file into the <code>META-INF/upgrade</code> folder of the 
corresponding sources.
+Maven, the command line tools or NetBeans all look into this location for 
custom refactorings.</p>
 </div>
-<div class="ulist">
-<ul>
-<li>
-<p><a href="/kb/docs/java/index.html">Java SE Applications</a></p>
-</li>
-<li>
-<p><a href="/kb/docs/php/index.html">PHP and HTML5 Applications</a></p>
-</li>
-<li>
-<p><a href="/kb/docs/ide/index.html">Integration with External Tools and 
Services</a></p>
-</li>
-</ul>
+<div class="paragraph">
+<p>For maven projects, this typically means placing the file into 
<code>src/main/resources/META-INF/upgrade/&lt;name&gt;.hint</code>.</p>
 </div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">
-The learning trails, tutorials, and related documentation are works in 
progress, incomplete, and being reviewed: <a 
href="https://issues.apache.org/jira/browse/NETBEANS-1867";>NETBEANS-1867</a>. 
See <a href="http://netbeans.apache.org/kb/docs/contributing.html";>our 
documentation contribution guidelines</a> to learn how you can help us.
-</td>
-</tr>
-</table>
+<div class="paragraph">
+<p>The format of the file is described <a 
href="HintsFileFormat.html">here</a>.</p>
 </div>
 </div>
 </div>
 <div class="sect1">
-<h2 id="_other_resources">Other resources</h2>
+<h2 id="_using_maven_to_run_declarative_refactorings">Using Maven to Run 
Declarative Refactorings</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>These other resources are available:</p>
+<p>To use run the declarative hints in a Maven project, add the tool to the 
build plugins in pom.xml:</p>
 </div>
-<div class="ulist">
-<ul>
-<li>
-<p>Javadoc is updated hourly at <a 
href="https://bits.netbeans.org/dev/javadoc"; 
class="bare">https://bits.netbeans.org/dev/javadoc</a></p>
-</li>
-<li>
-<p>Short videos on how to <a href="getting-started.html">get started with the 
Apache NetBeans Platform</a> to build Java Desktop Applications.</p>
-</li>
-<li>
-<p>Visit the <a href="https://netbeans.org/kb/index.html";>netbeans.org docs 
&amp; support</a> section in the old website.</p>
-</li>
-<li>
-<p>Our <a href="https://www.youtube.com/user/NetBeansVideos";>YouTube Video 
Channel</a> contains many tutorials and tips.</p>
-</li>
-<li>
-<p>The previous <a href="/wiki/index.asciidoc">wiki</a> has been partially 
migrated and is being updated.</p>
-</li>
-<li>
-<p>The <a href="https://github.com/apache/netbeans-website-cleanup";>content of 
the previous netbeans.org website</a> is being cleaned up in github.</p>
-</li>
-<li>
-<p>The <a href="https://github.com/apache/netbeans-website";>current Apache 
NetBeans website</a> (i.e., this website) is also hosted at github.</p>
-</li>
-</ul>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java">&lt;plugin&gt;
+    &lt;groupId&gt;org.apache.netbeans.modules.jackpot30&lt;/groupId&gt;
+    &lt;artifactId&gt;jackpot30-maven-plugin&lt;/artifactId&gt;
+    &lt;version&gt;11.1&lt;/version&gt;
+&lt;/plugin&gt;</code></pre>
 </div>
 </div>
+<div class="paragraph">
+<p>And declare the hints in <code>.hint</code> files under 
<code>src/main/resources/META-INF/upgrade</code>, for example:</p>
+</div>
+<div class="listingblock">
+<div class="title">src/main/resources/META-INF/upgrade/convert.hint</div>
+<div class="content">
+<pre class="prettyprint highlight"><code class="language-java" 
data-lang="java">System.err.println($args$)
+=&gt;
+System.out.println($args$)
+;;</code></pre>
+</div>
 </div>
-<div class="sect1">
-<h2 id="wiki">Apache NetBeans Wiki</h2>
-<div class="sectionbody">
 <div class="paragraph">
-<p>Some parts of the NetBeans Wiki <a href="/wiki/index.asciidoc">have been 
ported</a>, but need review.</p>
+<p>To get warnings for the declarative hints, run 
<code>jackpot30:analyze</code>:</p>
 </div>
+<div class="listingblock">
+<div class="content">
+<pre>$ mvn -q jackpot30:analyze
+.../src/main/java/sample/sample/Test.java:14: warning: [convert] convert
+        System.err.println("args=" + args);
+                   ^</pre>
 </div>
 </div>
-<div class="sect1">
-<h2 id="support">Support</h2>
-<div class="sectionbody">
-<div class="dlist">
-<dl>
-<dt class="hdlist1">Community Support</dt>
-<dd>
-<p>Is available through our <a href="/community/mailing-lists.html">mailing 
lists</a>.</p>
-</dd>
-<dt class="hdlist1">Commercial Support</dt>
-<dd>
-<p>Is also available. See <a href="commercial-support.html">this link</a> for 
more info.</p>
-</dd>
-</dl>
+<div class="paragraph">
+<p>To apply the changes produced by the declarative hints, run 
<code>jackpot30:apply</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>$ mvn -q jackpot30:apply &amp;&amp; git diff
+diff --git a/src/main/java/sample/sample/Test.java 
b/src/main/java/sample/sample/Test.java
+index a8465f2..c558be1 100644
+--- a/src/main/java/sample/sample/Test.java
++++ b/src/main/java/sample/sample/Test.java
+@@ -11,7 +11,7 @@ package sample.sample;
+  */
+ public class Test {
+     public static void main(String... args) {
+-        System.err.println("args=" + args);
++        System.out.println("args=" + args);
+         new Object() {
+             public String toString() { return super.toString(); }
+         };</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Please note the changes will be applied directly to the working copy of the 
files.</p>
 </div>
 </div>
 </div>
@@ -191,7 +181,7 @@ The learning trails, tutorials, and related documentation 
are works in progress,
     </ul>
     <ul class="menu align-center">
         
-        <li><a 
href="https://github.com/apache/netbeans-website/blob/master/netbeans.apache.org/src/content/help/index.asciidoc";
 title="See this page in github"><i class="fa fa-md fa-edit"></i> See this page 
in GitHub.</a></li>
+        <li><a 
href="https://github.com/apache/netbeans-website/blob/master/netbeans.apache.org/src/content/jackpot/index.asciidoc";
 title="See this page in github"><i class="fa fa-md fa-edit"></i> See this page 
in GitHub.</a></li>
     </ul>
 </section>
 


---------------------------------------------------------------------
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

Reply via email to