Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.CompilerMessage$Identifier$Category


    }

    @Test
    public void testGetSourceSequences() throws SQLException {
       
        Identifier sid1 = null;
        Identifier sid2 = null;
       
        Collection<SourceSequence> seqs =
            store.getSourceSequences("unknown", ProtocolVariation.RM10WSA200408);
        assertEquals(0, seqs.size());
       
View Full Code Here


    }

    @Test
    public void testGetDestinationSequence() throws SQLException, IOException {
       
        Identifier sid1 = null;
        Identifier sid2 = null;
       
        DestinationSequence seq =
            store.getDestinationSequence(new Identifier(), ProtocolVariation.RM10WSA200408);
        assertNull(seq);

        try {
            sid1 = setupDestinationSequence("sequence1");
View Full Code Here

    }

    @Test
    public void testGetSourceSequence() throws SQLException, IOException {
       
        Identifier sid1 = null;
        Identifier sid2 = null;
       
        SourceSequence seq =
            store.getSourceSequence(new Identifier(), ProtocolVariation.RM10WSA200408);
        assertNull(seq);
       
        try {
            sid1 = setupSourceSequence("sequence1");
View Full Code Here

    }

    @Test
    public void testGetMessages() throws SQLException, IOException {
       
        Identifier sid1 = new Identifier();
        sid1.setValue("sequence1");
        Identifier sid2 = new Identifier();
        sid2.setValue("sequence2");
       
        Collection<RMMessage> out = store.getMessages(sid1, true);
        assertEquals(0, out.size());
        Collection<RMMessage> in = store.getMessages(sid1, false);
        assertEquals(0, out.size());
View Full Code Here

    }
   
    private Identifier setupDestinationSequence(String s) throws IOException, SQLException {
        DestinationSequence seq = control.createMock(DestinationSequence.class);
       
        Identifier sid = new Identifier();
        sid.setValue(s);
        EndpointReferenceType epr = RMUtils.createAnonymousReference();
       
        SequenceAcknowledgement ack = ack1;
        Long lmn = ZERO;
        
View Full Code Here

        return sid;
    }
   
    private Identifier setupSourceSequence(String s) throws SQLException {
        SourceSequence seq = control.createMock(SourceSequence.class);       
        Identifier sid = new Identifier();
        sid.setValue(s);     
           
        Date expiry = null;
        Identifier osid = null;
        Long cmn = ONE;
        boolean lm = false;
       
        if ("sequence2".equals(s)) {
            expiry = new Date(System.currentTimeMillis() + 3600 * 1000);
            osid = new Identifier();
            osid.setValue("offeringSequence");
            cmn = TEN;
            lm = true;           
        }
       
        EasyMock.expect(seq.getIdentifier()).andReturn(sid);
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.CATEGORY: {
            Category category = (Category) theEObject;
            T result = caseCategory(category);
            if (result == null)
                result = caseRootElement(category);
            if (result == null)
                result = caseBaseElement(category);
View Full Code Here

           
            List<CompilerMessage> compilerMessages = logger.getCompilerMessages(CompilerMessage.Severity.WARNING);
            if (!compilerMessages.isEmpty()) {
                int size = compilerMessages.size();
                for (int i = 0; i < size; i++) {
                    CompilerMessage message = compilerMessages.get(i);
                    System.err.println(message.toString());
                }
            }
        }

        return calServices;
View Full Code Here

    private static class MessageRenderer extends JLabel implements ListCellRenderer {
        private static final long serialVersionUID = 6898987006278555574L;

        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
           
            CompilerMessage message = (CompilerMessage)value;
           
            if(message.getSeverity() == CompilerMessage.Severity.FATAL) {
                setIcon(ERROR_ICON);
           
            } else if(message.getSeverity() == CompilerMessage.Severity.ERROR) {
                setIcon(ERROR_ICON);

            } else if(message.getSeverity() == CompilerMessage.Severity.WARNING) {
                setIcon(WARNING_ICON);
           
            } else if(message.getSeverity() == CompilerMessage.Severity.INFO) {
                setIcon(INFO_ICON);
            }
           
            setText(message.toString());
            return this;
        }
View Full Code Here

        calServices.addNewModule(moduleDefn, logger);
       
        if (logger.getNErrors() > 0) {
            List<CompilerMessage> messages = logger.getCompilerMessages();
            for (int i = 0, n = messages.size(); i < n; i++) {
                CompilerMessage message = messages.get(i);
                if (CompilerTestUtilities.isInternalCodingError(message.getMessageKind())) {
                     fail("Unexpected: " + message);
                }
            }
        } else {
            fail("Expected error, but there were none.");
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.CompilerMessage$Identifier$Category

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.