Package org.nbgit

Examples of org.nbgit.StatusInfo


        sheet.put(ps);
        setSheet(sheet);
    }

    private void refreshHtmlDisplayName() {
        StatusInfo info = node.getInformation();
        int status = info.getStatus();
        // Special treatment: Mergeable status should be annotated as Conflict in Versioning view according to UI spec
        if (status == StatusInfo.STATUS_VERSIONED_MERGE) {
            status = StatusInfo.STATUS_VERSIONED_CONFLICT;
        }
        htmlDisplayName = HtmlFormatter.getInstance().annotateNameHtml(node.getFile().getName(), info, null);
View Full Code Here


            String sortable = Integer.toString(GitUtils.getComparableStatus(node.getInformation().getStatus()));
            setValue("sortkey", zeros[sortable.length()] + sortable + "\t" + shortPath + "\t" + SyncFileNode.this.getName()); // NOI18N
        }

        public Object getValue() throws IllegalAccessException, InvocationTargetException {
            StatusInfo finfo = node.getInformation();
            //TODO: finfo.getEntry(node.getFile());  // XXX not interested in return value, side effect loads ISVNStatus structure
            int mask = panel.getDisplayStatuses();
            return finfo.getStatusText(mask);
        }
View Full Code Here

        initProperties();
        refreshHtmlDisplayName();
    }

    private void refreshHtmlDisplayName() {
        StatusInfo info = setup.getInfo();
        int status = info.getStatus();
        // Special treatment: Mergeable status should be annotated as Conflict in Versioning view according to UI spec
        if (status == StatusInfo.STATUS_VERSIONED_MERGE) {
            status = StatusInfo.STATUS_VERSIONED_CONFLICT;
        }
        htmlDisplayName = HtmlFormatter.getInstance().annotateNameHtml(setup.getBaseFile().getName(), info, null);
View Full Code Here

        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];
        } else if (col.equals(COLUMN_NAME_PATH)) {
            String shortPath = null;
            // XXX this is a mess
View Full Code Here

                    for (File file : files) {
                        if (isCanceled()) {
                            return;
                        }
                        StatusInfo fi = interestingFiles.get(file);

                        cache.refreshFileStatus(file, fi,
                                interestingDirs.get(file.isDirectory() ? file : file.getParentFile()));
                    }
                }
View Full Code Here

                File par = file.getParentFile();
                if (par != null) {
                    if (interestingDirs.get(par) == null) {
                        interestingDirs.put(par, new HashMap<File, StatusInfo>());
                    }
                    StatusInfo fi = interestingFiles.get(file);
                    interestingDirs.get(par).put(file, fi);
                }
            }
        }
View Full Code Here

     */
    public static VCSContext getCurrentContext(Node[] nodes, int includingFileStatus, int includingFolderStatus) {
        VCSContext context = getCurrentContext(nodes);
        StatusCache cache = Git.getInstance().getStatusCache();
        for (File file : context.getRootFiles()) {
            StatusInfo fi = cache.getStatus(file);
            if (file.isDirectory()) {
                if ((fi.getStatus() & includingFolderStatus) == 0) {
                    return VCSContext.EMPTY;
                }
            } else if ((fi.getStatus() & includingFileStatus) == 0) {
                return VCSContext.EMPTY;
            }
        }
        return context;
    }
View Full Code Here

        LinkedList<File> ret = new LinkedList<File>();

        StatusCache cache = Git.getInstance().getStatusCache();
        for (int i = 0; i < files.length; i++) {
            File dir = files[i];
            StatusInfo info = cache.getStatus(dir);
            if ((status & info.getStatus()) != 0) {
                ret.add(dir);
            }
            File[] entries = cache.listFiles(dir)// comparing to dir.listFiles() lists already deleted too
            for (int e = 0; e < entries.length; e++) {
                File entry = entries[e];
                info = cache.getStatus(entry);
                if ((status & info.getStatus()) != 0) {
                    ret.add(entry);
                }
            }
        }
View Full Code Here

    }

    private boolean affectsView(PropertyChangeEvent event) {
        StatusCache.ChangedEvent changedEvent = (StatusCache.ChangedEvent) event.getNewValue();
        File file = changedEvent.getFile();
        StatusInfo oldInfo = changedEvent.getOldInfo();
        StatusInfo newInfo = changedEvent.getNewInfo();
        if (oldInfo == null) {
            if ((newInfo.getStatus() & displayStatuses) == 0) {
                return false;
            }
        } else if ((oldInfo.getStatus() & displayStatuses) + (newInfo.getStatus() & displayStatuses) == 0) {
            return false;
        }
        return context == null ? false : context.contains(file);
    }
View Full Code Here

        for (String path : set) {
            if (relPath.length() > 0 && !path.startsWith(relPath)) {
                continue;
            }
            File file = new File(root, path);
            files.put(file, new StatusInfo(status, null, false));
        }

    }
View Full Code Here

TOP

Related Classes of org.nbgit.StatusInfo

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.