Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.d @ 18:735224fcc45f
redirected all printings to DwtLogger
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 18 Mar 2009 09:57:53 +0100 |
parents | bc29606a740c |
children |
comparison
equal
deleted
inserted
replaced
17:6f068362a363 | 18:735224fcc45f |
---|---|
65 } | 65 } |
66 | 66 |
67 public synchronized void load( InputStream inStream ){ | 67 public synchronized void load( InputStream inStream ){ |
68 char[] line; | 68 char[] line; |
69 bool eof = false; | 69 bool eof = false; |
70 //tango.io.Stdout.Stdout.formatln( "properties put ..." ); | |
71 void readLine(){ | 70 void readLine(){ |
72 line.length = 0; | 71 line.length = 0; |
73 char[1] rdbuf; | 72 char[1] rdbuf; |
74 int i = inStream.read( rdbuf ); | 73 int i = inStream.read( rdbuf ); |
75 while( i is 1 && rdbuf[0] != '\n' && rdbuf[0] != '\r' ){ | 74 while( i is 1 && rdbuf[0] != '\n' && rdbuf[0] != '\r' ){ |
77 i = inStream.read( rdbuf ); | 76 i = inStream.read( rdbuf ); |
78 } | 77 } |
79 eof = i !is 1; | 78 eof = i !is 1; |
80 } | 79 } |
81 | 80 |
82 //tango.io.Stdout.Stdout.formatln( "properties put {}", __LINE__ ); | |
83 bool linecontinue = false; | 81 bool linecontinue = false; |
84 bool iskeypart = true; | 82 bool iskeypart = true; |
85 char[] key; | 83 char[] key; |
86 char[] value; | 84 char[] value; |
87 nextline: | 85 nextline: |
88 while( !eof ){ | 86 while( !eof ){ |
89 //tango.io.Stdout.Stdout.formatln( "properties put {} startline", __LINE__ ); | |
90 readLine(); | 87 readLine(); |
91 line = tango.text.Util.trim( line ); | 88 line = tango.text.Util.trim( line ); |
92 if( line.length == 0 ){ | 89 if( line.length == 0 ){ |
93 //tango.io.Stdout.Stdout.formatln( "properties put {} was 0 length", __LINE__ ); | |
94 continue; | 90 continue; |
95 } | 91 } |
96 if( line[0] == '#' ){ | 92 if( line[0] == '#' ){ |
97 //tango.io.Stdout.Stdout.formatln( "properties put {} was comment", __LINE__ ); | |
98 continue; | 93 continue; |
99 } | 94 } |
100 int pos = 0; | 95 int pos = 0; |
101 bool esc = false; | 96 bool esc = false; |
102 if( !linecontinue ){ | 97 if( !linecontinue ){ |
142 else{ | 137 else{ |
143 value ~= c; | 138 value ~= c; |
144 } | 139 } |
145 } | 140 } |
146 if( iskeypart ){ | 141 if( iskeypart ){ |
147 tango.io.Stdout.Stdout.formatln( "dejavu.util.Properties put cannot find '='." ); | 142 getDwtLogger().error( __FILE__, __LINE__, "put cannot find '='." ); |
148 continue; | 143 continue; |
149 } | 144 } |
150 key = tango.text.Util.trim( key ); | 145 key = tango.text.Util.trim( key ); |
151 value = tango.text.Util.trim(value); | 146 value = tango.text.Util.trim(value); |
152 //tango.io.Stdout.Stdout.formatln( "properties put {}=>{}", key, value ); | |
153 | 147 |
154 map[ key.dup ] = value.dup; | 148 map[ key.dup ] = value.dup; |
155 //tango.io.Stdout.Stdout.formatln( "properties put {}", __LINE__ ); | |
156 } | 149 } |
157 } | 150 } |
158 | 151 |
159 public synchronized void store( OutputStream ostr, String comments ){ | 152 public synchronized void store( OutputStream ostr, String comments ){ |
160 void append(char[] s){ | 153 void append(char[] s){ |