Subversion Repository Public Repository

litesoft

Diff Revisions 49 vs 72 for /trunk/Java/core/Server/src/org/litesoft/codegen/AbstractSourceCodeFileGenerator.java

Diff revisions: vs.
  @@ -5,6 +5,7 @@
5 5
6 6 import org.litesoft.util.*;
7 7
8 + @SuppressWarnings({"UnusedDeclaration"})
8 9 public class AbstractSourceCodeFileGenerator
9 10 {
10 11 protected static String mergeFileLines( String... pNewLines )
  @@ -23,6 +24,7 @@
23 24 return sb.toString();
24 25 }
25 26
27 + @SuppressWarnings({"UnusedDeclaration"})
26 28 protected static GenerationReport.Action writeChangedFileLines( boolean pWriteIt, File pFile, String... pNewLines )
27 29 throws IOException
28 30 {
  @@ -53,7 +55,7 @@
53 55 rv = GenerationReport.Action.Created;
54 56 System.out.println( "Creating: " + pFile );
55 57 File parentPath = pFile.getParentFile();
56 - if ( !parentPath.exists() )
58 + if ( (parentPath != null) && !parentPath.exists() )
57 59 {
58 60 //noinspection ResultOfMethodCallIgnored
59 61 parentPath.mkdirs();
  @@ -89,11 +91,13 @@
89 91 *
90 92 * @return Description of the Returned Value
91 93 */
94 + @SuppressWarnings({"UnusedDeclaration"})
92 95 protected static String tabLevel( int numTabs )
93 96 {
94 97 return (numTabs < 1) ? "" : Utils.spaces( numTabs * 4 );
95 98 }
96 99
100 + @SuppressWarnings({"UnusedDeclaration"})
97 101 protected static String deCamelToSpaced( String pName )
98 102 {
99 103 StringBuilder sb = new StringBuilder( pName.length() + 5 );
  @@ -109,6 +113,7 @@
109 113 return sb.toString().trim();
110 114 }
111 115
116 + @SuppressWarnings({"UnusedDeclaration"})
112 117 protected static String deCamelToUnderscoredConstant( String pName )
113 118 {
114 119 StringBuilder sb = new StringBuilder( pName.length() + 5 );