Package org.apache.isis.core.commons.debug

Examples of org.apache.isis.core.commons.debug.DebugString


            }
            // TODO add clause for request
        } else {
            for (final DebuggableWithTitle info : infos) {
                if (info.debugTitle().equals(sectionName)) {
                    final DebugString debug = new DebugString();
                    info.debugData(debug);
                    writer.println(debug.toString());
                }
            }
        }

        writer.print("[Options: ");
View Full Code Here


    private final DebugString debug;

    public MonitorEvent(final String category, final String message, final DebuggableWithTitle[] debugDetails) {
        this.message = message;
        this.category = category;
        debug = new DebugString();
        try {
            if (debugDetails != null) {
                for (final DebuggableWithTitle info : debugDetails) {
                    debug.appendTitle(info.debugTitle());
                    debug.indent();
View Full Code Here

    private void refresh() {
        final DebuggableWithTitle[] infos = getInfo();
        final DebuggableWithTitle info = infos[panel];
        if (info != null) {
            setTitle(info.debugTitle());
            final DebugString str = new DebugString();
            info.debugData(str);
            field.setText(str.toString());
            field.setCaretPosition(0);
        }
    }
View Full Code Here

    // debug, toString
    // /////////////////////////////////////////////////////////////

    @Override
    public String debugData() {
        final DebugString debugString = new DebugString();
        debugString.indent();
        debugString.indent();
        getFacetedMethod().debugData(debugString);
        return debugString.toString();
    }
View Full Code Here

    }

    public static void saveToFile(final DebuggableWithTitle object) {
        final String dateStamp = FORMAT.format(new Date());
        final String fileName = object.getClass().getName() + "-" + dateStamp + ".txt";
        final DebugString text = new DebugString();
        object.debugData(text);
        final String title = object.debugTitle();

        saveToFile(new File(fileName), title, text.toString());
    }
View Full Code Here

    }

    @Test
    public void testDebug() throws Exception {
        addViewForObject();
        final DebugString debugString = new DebugString();
        notifier.debugData(debugString);
        assertNotNull(debugString.toString());
    }
View Full Code Here

        final CreateObjectCommand command = store.createCreateObjectCommand(object);
        store.execute(Collections.<PersistenceCommand> singletonList(command));

        store.debugTitle();
        final DebugBuilder debug = new DebugString();
        store.debugData(debug);
    }
View Full Code Here

        store.debugData(debug);
    }

    public void testEmpty() throws Exception {
        store.debugTitle();
        final DebugBuilder debug = new DebugString();
        store.debugData(debug);
    }
View Full Code Here

    public void takeSnapshot() {
        if (!LOG.isDebugEnabled()) {
            return;
        }
        final DebugString debug = new DebugString();
        debug(debug);
        debug.indent();
        debug.appendln();

        debug(debug, getPersistenceSession());
        if (getCurrentTransaction() != null) {
            debug(debug, getCurrentTransaction().getUpdateNotifier());
            debug(debug, getCurrentTransaction().getMessageBroker());
        }
        debugSnapshot = debug.toString();

        LOG.debug(debugSnapshot);
    }
View Full Code Here

    @Test
    public void test() {
        final ObjectSpecification specification = IsisContext.getSpecificationLoader().loadSpecification(ExampleReferencePojo.class);
        final ObjectAdapter object = IsisContext.getPersistenceSession().createInstance(specification);

        final DebugBuilder debug = new DebugString();
        IsisContext.getPersistenceSession().debugData(debug);
        IsisContext.getSpecificationLoader().debugData(debug);
        /*
         * System.out.println(debug);
         *
 
View Full Code Here

TOP

Related Classes of org.apache.isis.core.commons.debug.DebugString

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.