Mercurial > projects > dwt-linux
comparison dwt/dwthelper/System.d @ 311:77fa7f3ab37e
Additions for jface.text
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 01:33:00 +0200 |
parents | 7ca3f26319f1 |
children | 8235a17d9255 |
comparison
equal
deleted
inserted
replaced
310:7ca3f26319f1 | 311:77fa7f3ab37e |
---|---|
144 return 0; | 144 return 0; |
145 } | 145 } |
146 return (*cast(Object *)&x).toHash(); | 146 return (*cast(Object *)&x).toHash(); |
147 } | 147 } |
148 | 148 |
149 public static String getProperty( String key, String defval ){ | |
150 String res = getProperty(key); | |
151 if( res ){ | |
152 return res; | |
153 } | |
154 return defval; | |
155 } | |
149 public static String getProperty( String key ){ | 156 public static String getProperty( String key ){ |
150 /* Get values for local dwt specific keys */ | 157 /* Get values for local dwt specific keys */ |
151 String* p; | 158 String* p; |
152 if (key[0..3] == "dwt") { | 159 if (key[0..3] == "dwt") { |
153 return ((p = key in localProperties) != null) ? *p : null; | 160 return ((p = key in localProperties) != null) ? *p : null; |
174 | 181 |
175 } | 182 } |
176 | 183 |
177 } | 184 } |
178 | 185 |
179 class Output { | 186 static class Output { |
180 public void println( String str ){ | 187 public void println( String str ){ |
181 implMissing( __FILE__, __LINE__ ); | 188 implMissing( __FILE__, __LINE__ ); |
182 } | 189 } |
183 } | 190 } |
184 | 191 |
185 public static Output out__; | 192 private static Output err__; |
193 public static Output err(){ | |
194 if( err__ is null ){ | |
195 err__ = new Output(); | |
196 } | |
197 return err__; | |
198 } | |
199 private static Output out__; | |
186 public static Output out_(){ | 200 public static Output out_(){ |
187 if( out__ is null ){ | 201 if( out__ is null ){ |
188 out__ = new Output(); | 202 out__ = new Output(); |
189 } | 203 } |
190 return out__; | 204 return out__; |