Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/frontend/threads/OctaveThread.java

Go to the documentation of this file.
00001 
00021 package m2m.frontend.threads;
00022 
00023 
00024 
00025 
00026 import m2m.backend.processing.Errors;
00027 import m2m.backend.processing.ExternalRuns;
00028 import m2m.frontend.ErrorProcessing;
00029 import m2m.frontend.view.Editor;
00030 
00031 public class OctaveThread extends Thread {
00032 
00033         private Editor editor;
00034         private boolean codeRegen;
00035         
00036         public OctaveThread (Editor editor, boolean regen) {
00037                 this.editor = editor;
00038                 this.codeRegen = regen;
00039         }
00040         
00041         public void run() {
00042                 
00043                 if (codeRegen)
00044                         if (!editor.getM2MProject().reGenerateOctave())
00045                                 return;
00046 
00047                 Errors.clearError();
00048                 ExternalRuns.runOctave(editor.getM2MProject(), codeRegen);
00049                 ErrorProcessing.processLastError(editor.getShell().getDisplay());
00050 
00051                 if (codeRegen)
00052                         editor.getM2MProject().compareOctaveResult();
00053                 
00054                 synchronized(editor) {
00055                         editor.notifyAll();
00056                 }
00057         }
00058         
00059 }
 All Classes Namespaces Files Functions Variables Enumerations