01: /*
02: * Created on Jun 19, 2004
03: */
04: package net.charabia.jsmoothgen.application.swtgui;
05:
06: public class CompileAction extends JSmoothAction {
07: private JSmoothApplication js;
08:
09: public CompileAction(JSmoothApplication js) {
10: super (js);
11: }
12:
13: public boolean run() {
14: System.out.println("[DEBUG] Compiling, stand by...");
15: JSmoothApplication app = getApplication();
16: if (!app.hasProjectFile()) {
17: app
18: .consoleMessage("Cannot compile without a project file. Please save the project or load a new one, then try again.");
19: return false;
20: } else {
21: app.saveProject();
22: }
23: return app.compileProject();
24: }
25: }
|