Bug 572924: "Enable SWT reporting of non-disposed resources" pref docs

Includes adding some cross-referencing and more documentation on
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed

Change-Id: Ica75d5d61919b2391fb2831264d68637b02ee3f9
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.common/+/179889
Reviewed-by: Matthias Becker <ma.becker@sap.com>
Reviewed-by: Julian Honnen <julian.honnen@vector.com>
Tested-by: Julian Honnen <julian.honnen@vector.com>
diff --git a/bundles/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png b/bundles/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png
index d0099a6..640e2d6 100644
--- a/bundles/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png
+++ b/bundles/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png
Binary files differ
diff --git a/bundles/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm b/bundles/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm
index 1ca12f6..ca82530 100644
--- a/bundles/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm
+++ b/bundles/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm
@@ -42,6 +42,10 @@
 When selected, it disables API analysis builder totally.
 </p>
 
+<p><strong>Enable SWT reporting of non-disposed resources when creating a new launch configuration</strong> - 
+Add <a href="PLUGINS_ROOT/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html#swtreportNonDisposed"><code>-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true</code></a> to VM arguments when creating a new launch configuration.
+</p>
+
 <h2>Test plug-in detection</h2>
 <p>If the regular expression specified here is not empty, it is applied to the plug-in project's name when creating a plug-in project or when using <a href="../pde_actions/update_classpaths.htm">Update Classpath</a>, and 
 if it matches, the source folders will be marked to contain test sources in the project's <a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm#warn">Java Build Path</a> settings.</p>
diff --git a/bundles/org.eclipse.platform.doc.isv/guide/swt_graphics.htm b/bundles/org.eclipse.platform.doc.isv/guide/swt_graphics.htm
index fd546cc..1e94b91 100644
--- a/bundles/org.eclipse.platform.doc.isv/guide/swt_graphics.htm
+++ b/bundles/org.eclipse.platform.doc.isv/guide/swt_graphics.htm
@@ -202,5 +202,15 @@
    });
 </pre>
 
+<a name="swtreportNonDisposed"><H4>Non-disposed Resource Handler</H4></a>
+
+<P>If a resource is detected to not have been disposed then
+<a href="PLUGINS_ROOT/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/graphics/Resource.html#setNonDisposeHandler(java.util.function.Consumer)"><code>Resource.setNonDisposeHandler</code></a>
+can be used to have custom logging or error handling of that case. A default
+non-disposed handler which prints the error to <code>System.err</code> can be
+enabled with the <code>org.eclipse.swt.graphics.Resource.reportNonDisposed</code>
+property set to <code>true</code>. When the Eclipse IDE is run, this is logged
+to the workbench log instead of <code>System.err</code>.</P>
+
 </BODY>
 </HTML>
\ No newline at end of file
diff --git a/bundles/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html b/bundles/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
index 87d8413..bfa76ef 100644
--- a/bundles/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
+++ b/bundles/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
@@ -419,6 +419,8 @@
   <dd>the workbench orientation which can be <b>ltr</b> (left-to-right) or <b>rtl</b> (right-to-left).</dd>
   <dt><a name="equinoxsecurityvm"></a>equinox.security.vm</dt>
   <dd>If set to &quot;server&quot;, security modules will not attempt to substitute VM's JAAS processing.</dd>
+  <dt><a name="swtreportNonDisposed"></a>org.eclipse.swt.graphics.Resource.reportNonDisposed</dt>
+  <dd>If set to &quot;true&quot;, <a href="PLUGINS_ROOT/org.eclipse.platform.doc.isv/guide/swt_graphics.htm#swtreportNonDisposed">non-disposed SWT Resources</a> will be logged.</dd>
   <dt><a name="osgiadaptor"></a>osgi.adaptor</dt>
   <dd>the class name of the OSGi framework adaptor to use.</dd>
   <dt><a name="osgiarch"></a>osgi.arch {-arch}</dt>