<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/nosaf/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/nosaf/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 22 Feb 2016 05:11:41 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/nosaf/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Home modified by Gurce</title><link>https://sourceforge.net/p/nosaf/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -138,4 +138,8 @@
   ...
 ~~~~

+You should then be able to successfully run the app non-SAF-ified app successfully within newer versions of NetBeans.
+
+Still, I did notice that some of the text-strings within the mattise editor looked a bit funny/odd, with lots of angled brackets. Despite things looking a bit weird in the matisse editor, all these text-strings looked fine when the app was run, so I suppose I'm content with that for now...
+
 Ok, that about wraps up all the notes I jotted down on this occasion. Feel free to add more details with your own findings and usage-cases. Gurce (22/02/2016).
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gurce</dc:creator><pubDate>Mon, 22 Feb 2016 05:11:41 -0000</pubDate><guid>https://sourceforge.net6fbb80fd1fa18908837ae70f470913799a293df0</guid></item><item><title>Home modified by Gurce</title><link>https://sourceforge.net/p/nosaf/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -112,13 +112,19 @@
 ~~~~
 Public Common {
 ...
-    public static boolean hasproperty(String resourceBundle, String key) {
-        try {
-            Properties p = props(resourceBundle);
-            return p.containsKey(key);
-        } catch (IOException ex) {
-            return false;
+    public static String classBundleBaseName(Class cls) {
+        String className = cls.getName();
+        StringBuilder sb = new StringBuilder();
+        int i = className.lastIndexOf('.');
+        if (i &amp;gt; 0) {
+            sb.append(className.substring(0, i));
+            sb.append(".resources."); //NOI18N
+            sb.append(cls.getSimpleName());
+        } else {
+            sb.append("resources."); //NOI18N
+            sb.append(cls.getSimpleName());
         }
+        return sb.toString();
     }
 ...
 }
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gurce</dc:creator><pubDate>Mon, 22 Feb 2016 05:09:08 -0000</pubDate><guid>https://sourceforge.net64a04966f0b7a2cf030fa82a83ed200bb7c11c5c</guid></item><item><title>Home modified by Gurce</title><link>https://sourceforge.net/p/nosaf/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -81,7 +81,7 @@
 ### Running the Tool (converting the forms)

 * Go to "**cd mb-nosaf/target/classes**"
-    * A compiled copy of the "**build.xml**"
+    * Note that this contains a compiled copy of the "**build.xml**"
 * Type "**ant all**" to run the tool
     * This will scan the source path for all saf \*.form files in your source-path and save them out in a tweaked non-saf-style in your destination-path

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gurce</dc:creator><pubDate>Mon, 22 Feb 2016 05:05:48 -0000</pubDate><guid>https://sourceforge.net50a51251abd0276aa206fbd1ea9031a97df70065</guid></item><item><title>Home modified by Gurce</title><link>https://sourceforge.net/p/nosaf/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -10,16 +10,16 @@
 ## Draft usage notes
 I wanted to share a few notes of my own personal experiences getting nosaf to work. This probably isn't the most 'ideal' form of documentation, but it's a start. Please correct, refine and improve as desired.

-* My personal learning curve relating to NoSAF started upon reading the followin netbeans-bugzilla thread:
+* My personal learning curve relating to NoSAF started upon reading the following netbeans-bugzilla thread:
     *  https://netbeans.org/bugzilla/show_bug.cgi?id=204661
-* That thread relates to various users complaining about the removal of SAF-based projects from NetBeans upon the transition from NetBeans 7.0.1 to 7.1
+* That thread relates to various users complaining about the removal of SAF-based projects-support from NetBeans upon the transition from NetBeans 7.0.1 to 7.1
 * A user there, rcasha, provided a tool he attached to his post. The attachment was called "**XSLT file to convert SAF-based forms into non-SAF-based forms**"
 * Within the "**mb-nosaf.tgz**" download, I found two things:
-    * The "**mb-nosaf/**" sub-folder contained the actual tool (to be build with maven, then run by ant)
+    * The "**mb-nosaf/**" sub-folder contained the actual tool (to be built with maven, then run by ant)
     * The "**ConvertSAF/**" sub-folder contained an example for you to test the tool on
-        * The "**ConvertSAF/SampleSAF**" sub-folder housed a sample SAF application to be converted (treat it as your source)
-        * The "**ConvertSAF/SampleNoSAF**" sub-folder served as sample of what the tool outputs (treat it as your destination)
-* **NOTE**: The contents of the download on this sourceforge site seem a little different, there's a mention of adding a frontend, I haven't looked into this thus far. For those that know more about this, please feel free to elaborate on it here too. But for now, I'll focus here on the notes I gathered while using the original attachment from the bugzilla site.
+        * The "**ConvertSAF/SampleSAF**" sub-folder housed a sample SAF application to be converted (treat it as your source folder)
+        * The "**ConvertSAF/SampleNoSAF**" sub-folder served as sample of what the tool outputs (treat it as your destination folder)
+* **NOTE**: The contents of the download on this sourceforge site seem a little different, there's a mention of adding a frontend, I haven't looked into this thus far (the aforementioned example also seems to be missing). For those that know more about this, please feel free to elaborate on it here too. But for now, I'll focus here on the notes I gathered while using the original attachment from the bugzilla site.

 ###Building the Tool

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gurce</dc:creator><pubDate>Mon, 22 Feb 2016 05:00:51 -0000</pubDate><guid>https://sourceforge.net81ca140686c76f7a66e8e348a6f2c8c0bd28434f</guid></item><item><title>Home modified by Gurce</title><link>https://sourceforge.net/p/nosaf/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,8 +1,135 @@
-Welcome to your wiki!
+# NoSAF

-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
+This is a tool to convert your SAF-based projects into Non-SAF-based projects (ie, pure-ish Swing).

 The wiki uses [Markdown](/p/nosaf/wiki/markdown_syntax/) syntax.

 [[project_admins]]
 [[download_button]]
+
+## Draft usage notes
+I wanted to share a few notes of my own personal experiences getting nosaf to work. This probably isn't the most 'ideal' form of documentation, but it's a start. Please correct, refine and improve as desired.
+
+* My personal learning curve relating to NoSAF started upon reading the followin netbeans-bugzilla thread:
+    *  https://netbeans.org/bugzilla/show_bug.cgi?id=204661
+* That thread relates to various users complaining about the removal of SAF-based projects from NetBeans upon the transition from NetBeans 7.0.1 to 7.1
+* A user there, rcasha, provided a tool he attached to his post. The attachment was called "**XSLT file to convert SAF-based forms into non-SAF-based forms**"
+* Within the "**mb-nosaf.tgz**" download, I found two things:
+    * The "**mb-nosaf/**" sub-folder contained the actual tool (to be build with maven, then run by ant)
+    * The "**ConvertSAF/**" sub-folder contained an example for you to test the tool on
+        * The "**ConvertSAF/SampleSAF**" sub-folder housed a sample SAF application to be converted (treat it as your source)
+        * The "**ConvertSAF/SampleNoSAF**" sub-folder served as sample of what the tool outputs (treat it as your destination)
+* **NOTE**: The contents of the download on this sourceforge site seem a little different, there's a mention of adding a frontend, I haven't looked into this thus far. For those that know more about this, please feel free to elaborate on it here too. But for now, I'll focus here on the notes I gathered while using the original attachment from the bugzilla site.
+
+###Building the Tool
+
+* Edit the "**mb-nosaf/src/main/resources/build.xml**" file
+* Let's work with the given example, so modify the **src** and **dest** paths to the extracted paths for the sample source+destination examples on your hard-drive:
+
+~~~~
+    &amp;lt;target name="all" depends="init"&amp;gt;
+
+        
+        &amp;lt;convert src="${user.home}/**Systems/ConvertSAF/SampleSAF/src/main/java**" +="" dest="${user.home}/**Systems/ConvertSAF/SampleNoSAF/src/main/java**"/&amp;gt;
+
+    &amp;lt;/target&amp;gt;
+~~~~
+
+* To build, I then go:
+    * **cd md-nosaf**
+    * **mvn package**   (to build the \*.jar package representing the tool)
+* At this point, I did bump into the following errors:
+
+~~~~
+/home/gurce/Downloads/mb-nosaf/mb-nosaf/src/main/java/net/megabyte/nosaf/MBAction.java:[80,46] error: variable-arity methods are not supported in -source 1.3
+
+  (use -source 5 or higher to enable variable-arity methods)
+/home/gurce/Downloads/mb-nosaf/mb-nosaf/src/main/java/net/megabyte/nosaf/MBAction.java:[242,5] error: annotations are not supported in -source 1.3
+
+  (use -source 5 or higher to enable annotations)
+/home/gurce/Downloads/mb-nosaf/mb-nosaf/src/main/java/net/megabyte/nosaf/Utils.java:[136,9] error: annotations are not supported in -source 1.3
+
+  (use -source 5 or higher to enable annotations)
+/home/gurce/Downloads/mb-nosaf/mb-nosaf/src/main/java/net/megabyte/nosaf/XalanExt.java:[21,32] error: generics are not supported in -source 1.3
+~~~~
+
+* To overcome this, after reading a suggestion on google, I edited the "**mb-nosaf/pom.xml**" and added the following "&amp;lt;build&amp;gt;...&amp;lt;/build&amp;gt;" section into it:
+
+
+~~~~
+&amp;lt;project ....=""&amp;gt;
+ &amp;lt;build&amp;gt;
+  &amp;lt;plugins&amp;gt;
+   &amp;lt;plugin&amp;gt;
+       &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
+       &amp;lt;version&amp;gt;2.3.2&amp;lt;/version&amp;gt;
+       &amp;lt;configuration&amp;gt;
+           &lt;source&gt;&lt;/source&gt;1.6
+           &amp;lt;target&amp;gt;1.6&amp;lt;/target&amp;gt;
+       &amp;lt;/configuration&amp;gt;
+   &amp;lt;/plugin&amp;gt;
+   &amp;lt;/plugins&amp;gt;
+  &amp;lt;/build&amp;gt;
+&amp;lt;/project&amp;gt;
+~~~~
+
+* After doing so, the tool built fine for me.
+
+
+### Running the Tool (converting the forms)
+
+* Go to "**cd mb-nosaf/target/classes**"
+    * A compiled copy of the "**build.xml**"
+* Type "**ant all**" to run the tool
+    * This will scan the source path for all saf \*.form files in your source-path and save them out in a tweaked non-saf-style in your destination-path
+
+
+### Additional Manual Steps (refreshing the source)
+
+* The tool only gets us halfway there, by just updating the \*.form files.
+* To update the corresponding \*.java files, open them up in the NetBeans IDE via the Matisse Form Editor
+* Slightly re-size the form in the editor and re-save it (this will update the details within the \*.java file to be non-SAF also).
+
+If you try build your app at this point, you might notice errors relating to a missing/unknown MSGS variable.
+
+* This can be resolved by adding the member variable into your class in a way similar to this:
+
+~~~~
+public class Test {
+  protected static final ResourceBundle MSGS = ResourceBundle.getBundle(MBAction.classBundleBaseName(Test.class));
+  ...
+~~~~
+
+* If you build this, you will get another error relating to the missing "**MBAction.classBundleBaseName()**" method.
+* I saw two possible ways of going about resolving this:
+    * A) From the "Building the Tool" steps you did earlier, find the \*.jar file that was built (eg, "mb-nosaf-1.0.2-SNAPSHOT.jar"), and add it to your NetBeans project. (This .jar will provide you the MBAction.classBundleBaseName() method)
+    * B) Alternatively, I didn't want to add the entire .jar file into my project, so I opted to just copy/paste the source for the MBAction.classBundleBaseName() method into my own application's source.
+
+As an example of case B), I added the method into my "Common.java" file (where I put a lot of my common methods):
+
+~~~~
+Public Common {
+...
+    public static boolean hasproperty(String resourceBundle, String key) {
+        try {
+            Properties p = props(resourceBundle);
+            return p.containsKey(key);
+        } catch (IOException ex) {
+            return false;
+        }
+    }
+...
+}
+~~~~
+
+Then I could re-write the line earlier as follows:
+
+~~~~
+public class Test {
+  protected static final ResourceBundle MSGS = ResourceBundle.getBundle(Common.classBundleBaseName(Test.class));
+  ...
+~~~~
+
+Ok, that about wraps up all the notes I jotted down on this occasion. Feel free to add more details with your own findings and usage-cases. Gurce (22/02/2016).
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gurce</dc:creator><pubDate>Mon, 22 Feb 2016 04:57:27 -0000</pubDate><guid>https://sourceforge.netad844857b4fa2d9353e155a10000684863495c74</guid></item><item><title>WikiPage Home modified by Uwe Pachler</title><link>https://sourceforge.net/p/nosaf/wiki/Home/</link><description>Welcome to your wiki!

This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].

The wiki uses [Markdown](/p/nosaf/wiki/markdown_syntax/) syntax.

[[project_admins]]
[[download_button]]
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Uwe Pachler</dc:creator><pubDate>Wed, 11 Apr 2012 17:54:48 -0000</pubDate><guid>https://sourceforge.net0c1ede2463289e36e3cbadfe3ef209ed495f5b7d</guid></item></channel></rss>