- Timestamp:
- 12/02/05 15:41:41 (19 years ago)
- Location:
- trunk/org.modelica.mdt
- Files:
-
- 1 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt/src/org/modelica/mdt/internal/omcproxy/OMCProxy.java
r165 r172 5 5 import java.io.FileReader; 6 6 import java.io.IOException; 7 import java.util.StringTokenizer; 7 8 import java.util.Vector; 8 9 9 10 import org.eclipse.core.resources.IFile; 11 import org.eclipse.core.runtime.Platform; 10 12 import org.modelica.mdt.MdtPlugin; 11 13 import org.modelica.mdt.core.IModelicaClass; … … 24 26 private static boolean hasInitialized = false; 25 27 private static boolean systemLibraryLoaded = false; 28 29 private static boolean traceOMCCalls = false; 30 static 31 { 32 /* load debug options and set debug flag variables accordingly */ 33 String value = Platform.getDebugOption 34 ("org.modelica.mdt/trace/omcCalls"); 35 if (value != null && value.equalsIgnoreCase("true")) 36 { 37 traceOMCCalls = true; 38 } 39 40 } 26 41 27 42 /** … … 291 306 } 292 307 308 logOMCCall(exp); 293 309 retval = omcc.sendExpression(exp); 310 logOMCReply(retval); 294 311 295 312 return retval; 296 313 } 314 315 /** 316 * loggs the expression send to OMC if the 317 * tracing flag (traceOMCCalls) is set 318 * 319 * @param expression the expression that is about to be sent to OMC 320 */ 321 private static void logOMCCall(String expression) 322 { 323 if (!traceOMCCalls) 324 { 325 return; 326 } 327 System.out.println(">> " + expression); 328 } 329 330 /** 331 * loggs the reply resived from OMC if 332 * the tracing flag (traceOMCCalls) is set 333 * 334 * @param reply the reply recieved from the OMC 335 */ 336 private static void logOMCReply(String reply) 337 { 338 if (!traceOMCCalls) 339 { 340 return; 341 } 342 343 StringTokenizer tokenizer = new StringTokenizer(reply, "\n"); 344 345 while (tokenizer.hasMoreTokens()) 346 { 347 System.out.println("<< " + tokenizer.nextToken()); 348 } 349 } 350 297 351 298 352 public static void loadSystemLibrary()
Note: See TracChangeset
for help on using the changeset viewer.