Code example for Collection

Methods: add

0
    @Override 
    public IFXGNode parse(Reader reader, String documentPath, Collection<ICompilerProblem> problems)
    { 
        try 
        { 
            scanner = new FXGSAXScanner(problems);
        	scanner.setDocumentPath(documentPath);
            SAXParserFactory saxFactory = SAXParserFactory.newInstance();
            saxFactory.setValidating(false);
            saxFactory.setNamespaceAware(true);
            SAXParser parser = saxFactory.newSAXParser();
            InputSource is = new InputSource(reader);
            parser.parse(is, scanner);
 
            IFXGNode node = scanner.getRootNode();
            return node;
        } 
        catch (IOException ex)
        { 
            problems.add(new FXGParserProblem(documentPath, scanner.getStartLine(), 
                    scanner.getStartColumn(), ex.getLocalizedMessage()));
        } 
        catch (ParserConfigurationException ex)
        { 
            problems.add(new FXGParserProblem(documentPath, scanner.getStartLine(), 
                    scanner.getStartColumn(), ex.getLocalizedMessage()));
        } 
        catch (SAXException ex)
        { 
            problems.add(new FXGParserProblem(documentPath, scanner.getStartLine(), 
                    scanner.getStartColumn(), ex.getLocalizedMessage()));
        } 
        finally 
        { 
            try