Package com.eviware.soapui.support.components.MetricsPanel

Examples of com.eviware.soapui.support.components.MetricsPanel.MetricsSection


        add(UISupport.createTabPanel(tabs, true), BorderLayout.CENTER);
    }

    private Component buildServiceOverviewTab() {
        metrics = new MetricsPanel();
        MetricsSection section = metrics.addSection("WSDL Definition");

        try {
            section.addMetric("WADL URL", MetricType.URL).set(
                    restService.getWadlUrl() + (restService.isGenerated() ? " - generated" : ""));

            // section.addMetric( "Namespace" ).set(
            // iface.getBindingName().getNamespaceURI() );
            // section.addMetric( "Binding" ).set(
            // iface.getBindingName().getLocalPart() );
            // section.addMetric( "SOAP Version" ).set(
            // iface.getSoapVersion().toString() );
            // section.addMetric( "Style" ).set( iface.getStyle() );
            // section.addMetric( "WS-A version" ).set( iface.getWsaVersion());
        } catch (Exception e) {
            UISupport.showErrorMessage(e);
        }

        section.finish();

        metrics.addSection("Definition Parts");
        section = metrics.addSection("Resources");
        operationsTableModel = new ResourcesTableModel();
        JXTable table = section.addTable(operationsTableModel);
        table.getColumn(1).setPreferredWidth(60);
        section.finish();

        return new JScrollPane(metrics);
    }
View Full Code Here


        public Loader(RestService iface) {
            this.iface = iface;
        }

        public Object construct(XProgressMonitor monitor) {
            MetricsSection section = metrics.getSection(DEFINITION_PARTS_SECTION);
            section.clear();

            try {
                WadlDefinitionContext wadlContext = iface.getWadlContext();
                if (iface.isGenerated()) {
                    wadlContext.regenerateWadl();
                }
                List<InterfaceDefinitionPart> parts = wadlContext.getDefinitionParts();

                int tabCount = partTabs.getTabCount();

                for (InterfaceDefinitionPart part : parts) {
                    addTab(part.getUrl(), part.getContent());
                }

                while (tabCount-- > 0) {
                    partTabs.remove(0);
                }

                return null;
            } catch (Exception e) {
                logger.error("Failed to load WSDL; " + e.getClass().getSimpleName() + "; " + e.getMessage());
                add(new JLabel("Failed to load WSDL; " + e.toString()), BorderLayout.NORTH);

                SoapUI.logError(e);

                return e;
            } finally {
                section.finish();
            }
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.components.MetricsPanel.MetricsSection

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.