Package org.nbgit.ui

Examples of org.nbgit.ui.GitFileNode


        String col = columns[columnIndex];
        return col.equals(COLUMN_NAME_ACTION);
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        GitFileNode node;
        String col = columns[columnIndex];
        if (col.equals(COLUMN_NAME_NAME)) {
            return nodes[rowIndex].getName();
        } else if (col.equals(COLUMN_NAME_STATUS)) {
            node = nodes[rowIndex];
            StatusInfo finfo = node.getInformation();
            //TODO what should we do with this?
            //finfo.getEntry(node.getFile());  // HACK returned value is not interesting, point is side effect, it loads ISVNStatus structure
            return finfo.getStatusText();
        } else if (col.equals(COLUMN_NAME_ACTION)) {
            return commitOptions[rowIndex];
View Full Code Here


    private void defaultCommitOptions() {
        boolean excludeNew = System.getProperty("netbeans.git.excludeNewFiles") != null; // NOI18N
        commitOptions = new CommitOptions[nodes.length];
        for (int i = 0; i < nodes.length; i++) {
            GitFileNode node = nodes[i];
            File file = node.getFile();
            if (GitModuleConfig.getDefault().isExcludedFromCommit(file.getAbsolutePath())) {
                commitOptions[i] = CommitOptions.EXCLUDE;
            } else {
                switch (node.getInformation().getStatus()) {
                    case StatusInfo.STATUS_VERSIONED_DELETEDLOCALLY:
                    case StatusInfo.STATUS_VERSIONED_REMOVEDLOCALLY:
                        commitOptions[i] = CommitOptions.COMMIT_REMOVE;
                        break;
                    default:
View Full Code Here

        for (File file : files) {
            if (Thread.interrupted()) {
                return null;
            }
            nodes[i++] = new SyncFileNode(new GitFileNode(file), this);
        }

        return nodes;
    }
View Full Code Here

        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            int col = table.convertColumnIndexToModel(column);
            if (columns[col].equals(CommitTableModel.COLUMN_NAME_NAME)) {
                TableSorter sorter = (TableSorter) table.getModel();
                CommitTableModel model = (CommitTableModel) sorter.getTableModel();
                GitFileNode node = model.getNode(sorter.modelIndex(row));
                CommitOptions options = model.getOptions(sorter.modelIndex(row));
                if (!isSelected) {
                    value = "<html>" + HtmlFormatter.getInstance().annotateNameHtml( // NOI18N
                            node.getFile().getName(), node.getInformation(), null);
                }
                if (options == CommitOptions.EXCLUDE) {
                    value = "<html><s>" + value + "</s></html>";
                }
                return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
View Full Code Here

        GitFileNode[] nodes;
        ArrayList<GitFileNode> nodesList = new ArrayList<GitFileNode>(fileList.size());

        for (File file : fileList) {
            GitFileNode node = new GitFileNode(file);
            nodesList.add(node);
        }
        nodes = nodesList.toArray(new GitFileNode[fileList.size()]);
        data.setNodes(nodes);
View Full Code Here

TOP

Related Classes of org.nbgit.ui.GitFileNode

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.