Package org.netbeans.modules.versioning.spi

Examples of org.netbeans.modules.versioning.spi.VCSContext


            for (int i = 0; i < projects.length; i++) {
                AbstractNode node = new AbstractNode(new Children.Array(), projects[i].getLookup());
                allNodes.add(node);
            }

            final VCSContext ctx = VCSContext.forNodes(allNodes.toArray(new Node[allNodes.size()]));
            final String title;
            if (projects.length == 1) {
                Project project = projects[0];
                ProjectInformation pinfo = ProjectUtils.getInformation(project);
                title = pinfo.getDisplayName();
View Full Code Here


        }
        return status;
    }

    public void performAction(ActionEvent e) {
        final VCSContext ctx = context;
        RequestProcessor rp = Git.getInstance().getRequestProcessor();
        GitProgressSupport support = new GitProgressSupport() {

            public void perform() {
                GitModuleConfig config = GitModuleConfig.getDefault();
                int status = getActionStatus(ctx);
                Set<File> files = ctx.getRootFiles();
                List<String> paths = new ArrayList<String>(files.size());
                for (File file : files) {
                    paths.add(file.getAbsolutePath());
                }
                if (isCanceled()) {
View Full Code Here

     * @param includingFileStatus if any activated file does not have this CVS status, an empty array is returned
     * @param includingFolderStatus if any activated folder does not have this CVS status, an empty array is returned
     * @return File [] array of activated files, or an empty array if any of examined files/folders does not have given status
     */
    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;
                }
View Full Code Here

     */
    private JPopupMenu getPopup() {

        JPopupMenu menu = new JPopupMenu();
        JMenuItem item;
        VCSContext context = GitUtils.getCurrentContext(null);
        ResourceBundle loc = NbBundle.getBundle(Git.class);

        item = menu.add(new OpenInEditorAction());
        Mnemonics.setLocalizedText(item, item.getText());
        menu.add(new JSeparator());
View Full Code Here

TOP

Related Classes of org.netbeans.modules.versioning.spi.VCSContext

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.