Examples of RubyScript


Examples of net.cakenet.jsaton.script.ruby.RubyScript

    public List getFolds(RSyntaxTextArea textArea) {
        if (!(textArea instanceof RubyScriptEditorPane))
            return null;

        RubyScriptEditorPane rsp = (RubyScriptEditorPane) textArea;
        RubyScript script = (RubyScript) rsp.script;
        script.setScript(rsp.getText());
        Node root = script.getAST();
        if(root == null) {
            if (foldCache.containsKey(textArea))
                return foldCache.get(textArea);
            return null;
        }
View Full Code Here

Examples of net.cakenet.jsaton.script.ruby.RubyScript

    public RubyScriptEditorPane(ScriptEditor editor) {
        super(editor);
        if(!(script instanceof RubyScript))
            throw new RuntimeException("We can only do ruby scripts...");
        getDocument().addDocumentListener(this);
        RubyScript rs = (RubyScript) script;
        super.addParser(rs);
    }
View Full Code Here

Examples of net.cakenet.jsaton.script.ruby.RubyScript

        initToolWindows();
        initRecent();
        System.setIn(log.log.getInputStream());
        System.setErr(new PrintStream(log.log.createOutputStream(System.err, err)));
        System.setOut(new PrintStream(log.log.createOutputStream(System.out, out)));
        ScriptEditor se = newScriptWindow(new RubyScript());
        selectWindow.setInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW, null);
        selectWindow.setInputMap(JComponent.WHEN_FOCUSED, null);
        selectWindow.setInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
        MouseAdapter mad = new MouseAdapter() {
            private Cursor prevCursor;
View Full Code Here

Examples of net.cakenet.jsaton.script.ruby.RubyScript

    public static Script create(ScriptLanguage lang) {
        if(lang == null)
            throw new RuntimeException("null");
        switch(lang) {
            case RUBY:
                return new RubyScript();
            default:
                throw new RuntimeException("No support for " + lang + " in load script...");
        }
    }
View Full Code Here

Examples of org.apache.tuscany.container.ruby.rubyscript.RubyScript

        for (PropertyValue propertyValue : propValueSettings) {
            propertyValues.put(propertyValue.getName(),
                               propertyValue.getValueFactory().getInstance());
        }
       
        RubyScript rubyScript = implementation.getRubyScript();

        // TODO: have ComponentBuilderExtension pass ScopeContainer in on build method?
        ScopeContainer scopeContainer;
        Scope scope = componentType.getLifecycleScope();
        if (Scope.MODULE == scope) {
View Full Code Here

Examples of org.apache.tuscany.container.ruby.rubyscript.RubyScript

                                   script);

        LoaderUtil.skipToEndElement(reader);

        RubyImplementation implementation = new RubyImplementation();
        RubyScript rubyScript = new RubyScript(script, source, null, cl);
        implementation.setRubyScript(rubyScript);
        implementation.setRubyClassName(rubyClassName);
        registry.loadComponentType(parent,
                                   implementation,
                                   deploymentContext);
View Full Code Here

Examples of org.apache.tuscany.container.ruby.rubyscript.RubyScript

                                                          RubyImplementation implementation,
                                                          DeploymentContext deploymentContext) throws
                                                                                               MissingResourceException,
                                                                                               InvalidServiceContractException {

        RubyScript rubyScript = implementation.getRubyScript();
        RubySCAConfig scaConfig = rubyScript.getSCAConfig();
        if (!scaConfig.hasSCAConfig()) {
            throw new IllegalArgumentException(
                "must use either .componentType side file or Ruby Global variable $SCA definition");
        }

        // FIXME this should be a system service, not instantiated here
        RubyComponentType componentType = new RubyIntrospector(null, processorRegistry)
            .introspectScript(scaConfig, rubyScript.getClassLoader());

        return componentType;
    }
View Full Code Here

Examples of org.apache.tuscany.container.ruby.rubyscript.RubyScript

//        scope.stop();
    }

    protected void setUp() throws Exception {
        super.setUp();
        rubyScript = new RubyScript("test", SCRIPT);
    }
View Full Code Here

Examples of org.apache.tuscany.container.ruby.rubyscript.RubyScript

        }
    };

    public void testJavaInterface() throws MissingResourceException,
                                   InvalidServiceContractException {
        RubyScript rs = new RubyScript("javaInterfaceTest",
                                       "$SCA = { 'javaInterface' => 'helloworld.HelloWorldService'}",
                                       null,
                                       getClass().getClassLoader());
        RubySCAConfig scaConfig = new RubySCAConfig(rs.getRubyEngine().getGlobalVariables());
        RubyIntrospector introspector = new RubyIntrospector(null,
                                                             new JavaInterfaceProcessorRegistryImpl());
        ComponentType comonentType = introspector.introspectScript(scaConfig,
                                                                   rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1,
                     services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values()
View Full Code Here

Examples of org.apache.tuscany.container.ruby.rubyscript.RubyScript

    public void testWSDLPortType() throws WSDLException,
                                  IOException,
                                  MissingResourceException,
                                  InvalidServiceContractException {
        RubyScript rs = new RubyScript("wsdlPortType",
                                       "$SCA = { 'wsdlPortType' => 'HelloWorld', 'wsdlNamespace' => 'http://helloworld'}",
                                       null,
                                       getClass().getClassLoader());
        RubySCAConfig scaConfig = new RubySCAConfig(rs.getRubyEngine().getGlobalVariables());

        WSDLDefinitionRegistryImpl wsdlReg = new WSDLDefinitionRegistryImpl();
        wsdlReg.setMonitor(NULL_MONITOR);
        URL wsdlURL = getClass().getClassLoader()
                                .getResource("org/apache/tuscany/container/ruby/jruby/helloworld.wsdl");
        wsdlReg.loadDefinition("http://helloworld",
                               wsdlURL);

        RubyIntrospector introspector = new RubyIntrospector(wsdlReg,
                                                             new JavaInterfaceProcessorRegistryImpl());
        ComponentType comonentType = introspector.introspectScript(scaConfig,
                                                                   rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1,
                     services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.