Package net.cakenet.jsaton.script

Examples of net.cakenet.jsaton.script.Script


        debug.setEditor(editor);
        save.setEnabled(true);
        saveas.setEnabled(true);
        closeAction.setEnabled(true);
        scriptPropertiesAction.setEnabled(true);
        Script script = editor.script;
        currentEditor = editor;
        script.removePropertyChangeListener(scriptPropertyListener);
        script.addPropertyChangeListener(scriptPropertyListener);
        script.fireStateChange();
    }
View Full Code Here


                    }
                    return null;
                }

                public String getDescription(File f) {
                    Script s = load(f);
                    if(s == null)
                        return super.getDescription(f);
                    return s.getName() + "\n" + s.getDescription();
                }

                public String getTypeDescription(File f) {
                    Script s = load(f);
                    if(s == null)
                        return super.getTypeDescription(f);
                    return Main.APP_NAME + " " + s.language.name + " script";
                }

                public Icon getIcon(File f) {
                    Script s = load(f);
                    if(s == null)
                        return super.getIcon(f);
                    return icon;
                }
            });
View Full Code Here

    private boolean save(String path) {
        setProgressUnknown();
        setProgressEnabled(true);
        boolean result = true;
        Script script = currentEditor.script;
        String ext = "." + script.language.extension;
        if(!path.toLowerCase().endsWith(ext.toLowerCase()))
            path += ext;
        try {
            currentEditor.updateScript();
View Full Code Here

    private void open(String path) {
        setProgressUnknown();
        setProgressEnabled(true);
        status("Opening script...");
        try {
            Script s = Script.open(path);
            newScriptWindow(s);
            addRecent(path);
        } catch (IOException e1) {
            e1.printStackTrace();
            status("Unable to open script");
View Full Code Here

        }

        public void actionPerformed(ActionEvent e) {
            if(currentEditor == null)
                return;
            Script s = currentEditor.script;
            if(s.getPath() == null)
                saveAs();
            else
                save(s.getPath());
        }
View Full Code Here

        }

        public void actionPerformed(ActionEvent e) {
            if (currentEditor == null)
                return;
            Script script = currentEditor.script;
            if (script.getState() != ScriptState.STOPPED) {
                if (script.getState() != ScriptState.SUSPENDED)
                    return;
                script.resume();
                return;
            }

            // start...
            currentEditor.updateScript();
            try {
                script.start(true);
            } catch (ScriptException e1) {
                e1.printStackTrace();
            }
        }
View Full Code Here

        }

        public void actionPerformed(ActionEvent e) {
            if (currentEditor == null)
                return;
            Script script = currentEditor.script;
            script.suspend();
        }
View Full Code Here

        }

        public void actionPerformed(ActionEvent e) {
            if (currentEditor == null)
                return;
            Script script = currentEditor.script;
            try {
                script.stop();
            } catch (EvalFailedException | ThreadDeath td) {
                /**/
            }
        }
View Full Code Here

        }

        public void actionPerformed(ActionEvent e) {
            if (currentEditor == null)
                return;
            Script script = currentEditor.script;
            script.stepInto();
        }
View Full Code Here

        }

        public void actionPerformed(ActionEvent e) {
            if (currentEditor == null)
                return;
            Script script = currentEditor.script;
            script.stepOver();
        }
View Full Code Here

TOP

Related Classes of net.cakenet.jsaton.script.Script

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.