Examples of DCTree


Examples of com.sun.tools.javac.tree.DCTree

        // split body into first sentence and body
        ListBuffer<DCTree> fs = new ListBuffer<DCTree>();
        loop:
        for (; body.nonEmpty(); body = body.tail) {
            DCTree t = body.head;
            switch (t.getKind()) {
                case TEXT:
                    String s = ((DCText) t).getBody();
                    int i = getSentenceBreak(s);
                    if (i > 0) {
                        int i0 = i;
                        while (i0 > 0 && isWhitespace(s.charAt(i0 - 1)))
                            i0--;
                        fs.add(m.at(t.pos).Text(s.substring(0, i0)));
                        int i1 = i;
                        while (i1 < s.length() && isWhitespace(s.charAt(i1)))
                            i1++;
                        body = body.tail;
                        if (i1 < s.length())
                            body = body.prepend(m.at(t.pos + i1).Text(s.substring(i1)));
                        break loop;
                    } else if (body.tail.nonEmpty()) {
                        if (isSentenceBreak(body.tail.head)) {
                            int i0 = s.length() - 1;
                            while (i0 > 0 && isWhitespace(s.charAt(i0)))
                                i0--;
                            fs.add(m.at(t.pos).Text(s.substring(0, i0 + 1)));
                            body = body.tail;
                            break loop;
                        }
                    }
                    break;

                case START_ELEMENT:
                case END_ELEMENT:
                    if (isSentenceBreak(t))
                        break loop;
                    break;
            }
            fs.add(t);
        }

        @SuppressWarnings("unchecked")
        DCTree first = getFirst(fs.toList(), body, tags);
        int pos = (first == null) ? Position.NOPOS : first.pos;

        DCDocComment dc = m.at(pos).DocComment(comment, fs.toList(), body, tags);
        return dc;
View Full Code Here

Examples of com.sun.tools.javac.tree.DCTree

                Name name = readTagName();
                skipWhitespace();

                TagParser tp = tagParsers.get(name);
                if (tp == null) {
                    DCTree text = inlineText();
                    if (text != null) {
                        nextChar();
                        return m.at(p).UnknownInlineTag(name, List.of(text)).setEndPos(bp);
                    }
                } else if (tp.getKind() == TagParser.Kind.INLINE) {
View Full Code Here

Examples of com.sun.tools.javac.tree.DCTree

            },

            // {@code text}
            new TagParser(Kind.INLINE, DCTree.Kind.CODE) {
                public DCTree parse(int pos) throws ParseException {
                    DCTree text = inlineText();
                    nextChar();
                    return m.at(pos).Code((DCText) text);
                }
            },

            // @deprecated deprecated-text
            new TagParser(Kind.BLOCK, DCTree.Kind.DEPRECATED) {
                public DCTree parse(int pos) {
                    List<DCTree> reason = blockContent();
                    return m.at(pos).Deprecated(reason);
                }
            },

            // {@docRoot}
            new TagParser(Kind.INLINE, DCTree.Kind.DOC_ROOT) {
                public DCTree parse(int pos) throws ParseException {
                    if (ch == '}') {
                        nextChar();
                        return m.at(pos).DocRoot();
                    }
                    inlineText(); // skip unexpected content
                    nextChar();
                    throw new ParseException("dc.unexpected.content");
                }
            },

            // @exception class-name description
            new TagParser(Kind.BLOCK, DCTree.Kind.EXCEPTION) {
                public DCTree parse(int pos) throws ParseException {
                    skipWhitespace();
                    DCReference ref = reference(false);
                    List<DCTree> description = blockContent();
                    return m.at(pos).Exception(ref, description);
                }
            },

            // {@inheritDoc}
            new TagParser(Kind.INLINE, DCTree.Kind.INHERIT_DOC) {
                public DCTree parse(int pos) throws ParseException {
                    if (ch == '}') {
                        nextChar();
                        return m.at(pos).InheritDoc();
                    }
                    inlineText(); // skip unexpected content
                    nextChar();
                    throw new ParseException("dc.unexpected.content");
                }
            },

            // {@link package.class#member label}
            new TagParser(Kind.INLINE, DCTree.Kind.LINK) {
                public DCTree parse(int pos) throws ParseException {
                    DCReference ref = reference(true);
                    List<DCTree> label = inlineContent();
                    return m.at(pos).Link(ref, label);
                }
            },

            // {@linkplain package.class#member label}
            new TagParser(Kind.INLINE, DCTree.Kind.LINK_PLAIN) {
                public DCTree parse(int pos) throws ParseException {
                    DCReference ref = reference(true);
                    List<DCTree> label = inlineContent();
                    return m.at(pos).LinkPlain(ref, label);
                }
            },

            // {@literal text}
            new TagParser(Kind.INLINE, DCTree.Kind.LITERAL) {
                public DCTree parse(int pos) throws ParseException {
                    DCTree text = inlineText();
                    nextChar();
                    return m.at(pos).Literal((DCText) text);
                }
            },
View Full Code Here

Examples of net.datacrow.console.components.DcTree

       
        add(pnlDrives, Layout.getGBC( 0, 1, 3, 1, 20.0, 1.0
                ,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
                new Insets(0, 0, 0, 0), 0, 0))
       
        DcTree tree;
        for (Drive drive : new Drives().getDrives()) {
            tree = new DcTree(new FileSystemTreeModel(drive.getPath(), filter));
           
            tree.setCellRenderer(new FileSystemTreeNodeRenderer());
            tree.setCellEditor(new FileSystemTreeNodeEditor());
            tree.setEditable(true);
           
            JScrollPane scroller = new JScrollPane(tree);
            scroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            add(scroller, Layout.getGBC( 0, 2, 1, 1, 20.0, 20.0
                        ,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
                         new Insets(5, 5, 5, 5), 0, 0));     
           
            scroller.setVisible(false);
            scrollers.put(drive, scroller);
            models.put(drive, (FileSystemTreeModel) tree.getModel());
            cbDrives.addItem(drive)
        }
       
        cbDrives.setActionCommand("drvChanged");
        cbDrives.addActionListener(this);
View Full Code Here

Examples of net.datacrow.console.components.DcTree

        urlField.setFont(getStandardFont());
        return urlField;
    }

    public static final DcTree getTree(DefaultMutableTreeNode model) {
        DcTree tree = new DcTree(model);
        tree.setFont(getStandardFont());
        return tree;
    }
View Full Code Here

Examples of net.datacrow.console.components.DcTree

        panelInfo.setMinimumSize(new Dimension(700, 380));
        panelInfo.setPreferredSize(new Dimension(700, 380));
        panelInfo.setMaximumSize(new Dimension(700, 380));

        getContentPane().setLayout(Layout.getGBL());
        tree = new DcTree(buildTreeModel());
        tree.setFont(ComponentFactory.getSystemFont());
        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.addTreeSelectionListener(new NodeSelectedAction());
        tree.setBorder(new EtchedBorder());
View Full Code Here

Examples of net.datacrow.console.components.DcTree

    protected void build() {
        clear();
       
        createTopNode();
       
        tree = new DcTree(new DefaultTreeModel(top));
        tree.setFont(ComponentFactory.getStandardFont());
        tree.addTreeSelectionListener(this);
       
        scroller = new JScrollPane(tree);
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.