This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 98879
Collapse All | Expand All

(-)WebActionProvider.java (+29 lines)
Line 74 Link Here
74
import org.netbeans.modules.websvc.rest.spi.RestSupport;
Line 75 Link Here
76
import org.netbeans.spi.project.support.ant.EditableProperties;
Line 108 Link Here
110
        RestSupport.COMMAND_TEST_RESTBEANS,
Line 145 Link Here
148
            commands.put(RestSupport.COMMAND_TEST_RESTBEANS, new String[] {"test-restbeans"}); // NOI18N
Line 589 Link Here
593
        } else if ( command.equals( RestSupport.COMMAND_TEST_RESTBEANS ) ) {
594
            setupTestRestBeans(p);
Line 597 Link Here
603
    private void setupTestRestBeans(Properties p) {
604
        p.setProperty(RestSupport.PROP_BASE_URL_TOKEN, RestSupport.BASE_URL_TOKEN);
605
606
        RestSupport rs = project.getLookup().lookup(RestSupport.class);
607
        AntProjectHelper helper = project.getAntProjectHelper();
608
        EditableProperties projectProps = helper.getProperties(helper.PROJECT_PROPERTIES_PATH);
609
        String path = projectProps.getProperty(RestSupport.PROP_RESTBEANS_TEST_DIR);
610
        if (path == null) {
611
            path = RestSupport.RESTBEANS_TEST_DIR;
612
        }
613
        File testdir = helper.resolveFile(path);
614
        try {
615
            FileObject testFO = rs.generateTestClient(testdir);
616
            p.setProperty(RestSupport.PROP_RESTBEANS_TEST_URL, testFO.getURL().toString());
617
            p.setProperty(RestSupport.PROP_RESTBEANS_TEST_FILE, testFO.getPath());
618
        } catch(Exception ex) {
619
            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
620
        }
621
    }
622
Line 786 Link Here
812
        }
813
        else if ( command.equals( RestSupport.COMMAND_TEST_RESTBEANS ) ) {
814
            return project.getLookup().lookup(RestSupport.class).isReady();

Return to bug 98879