Package org.mevenide.idea.project.ui

Examples of org.mevenide.idea.project.ui.PomManagerPanel


                //because if we create the pom manager panel now, it will
                //try to load available goals from maven. this is done via
                //PSI, but unfortunately, PSI is not available at this stage.
                //
                final ToolWindowManager twMgr = ToolWindowManager.getInstance(project);
                final PomManagerPanel ui = new PomManagerPanel(project);
                final ToolWindow tw = twMgr.registerToolWindow(PomManagerPanel.TITLE,
                                                               ui,
                                                               ToolWindowAnchor.RIGHT);
                tw.setIcon(Icons.MAVEN);
            }
View Full Code Here


            return;
        }

        final PomManager pomMgr = PomManager.getInstance(project);
        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final PomManagerPanel ui = pomMgr.getToolWindowComponent();
            if (ui == null) {
                pEvent.getPresentation().setEnabled(false);
                return;
            }

            final String[] projects = ui.getPomsWithSelectedGoals(false);
            if (projects.length > 0) {
                pEvent.getPresentation().setEnabled(false);
                return;
            }

            final Goal[] goals = ui.getSelectedGoalsForPom(null, true);
            pEvent.getPresentation().setEnabled(goals.length > 0);
        }
    }
View Full Code Here

        if (project == null)
            return;

        final PomManager pomMgr = PomManager.getInstance(project);
        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final PomManagerPanel ui = pomMgr.getToolWindowComponent();
            if (ui == null)
                return;

            final String[] projects = ui.getPomsWithSelectedGoals(false);
            final Goal[] goals = ui.getSelectedGoalsForPom(null, true);
            if (projects.length > 0 || goals.length == 0)
                return;

            final String url = PomUtils.selectPom(project, DLG_TITLE, DLG_LABEL);
            if (url == null || url.trim().length() == 0)
View Full Code Here

            return;
        }

        final PomManager pomMgr = PomManager.getInstance(project);
        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final PomManagerPanel ui = pomMgr.getToolWindowComponent();
            if (ui == null) {
                pEvent.getPresentation().setEnabled(false);
                return;
            }

            final String[] projects = ui.getPomsWithSelectedGoals(false);
            pEvent.getPresentation().setEnabled(projects.length > 0);
        }
    }
View Full Code Here

        if (project == null)
            return;

        final PomManager pomMgr = PomManager.getInstance(project);
        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final PomManagerPanel ui = pomMgr.getToolWindowComponent();
            if (ui == null)
                return;

            final PomPluginGoalsManager plgMgr = PomPluginGoalsManager.getInstance(project);

            final String[] projects = ui.getPomsWithSelectedGoals(false);
            for (String url : projects) {
                final Goal[] goals = ui.getSelectedGoalsForPom(url);
                for (Goal goal : goals)
                    if (goal instanceof PluginGoal)
                        plgMgr.removePluginGoal(url, (PluginGoal) goal);
            }
View Full Code Here

            return;
        }

        final PomManager pomMgr = PomManager.getInstance(project);
        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final PomManagerPanel ui = pomMgr.getToolWindowComponent();
            if (ui == null) {
                pEvent.getPresentation().setEnabled(false);
                return;
            }

            final Goal[] goals = ui.getSelectedGoals();
            pEvent.getPresentation().setEnabled(
                    goals != null && goals.length > 0);
        }
    }
View Full Code Here

        final PomManager pomMgr = PomManager.getInstance(getProject(pEvent));

        final String[] poms;
        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final PomManagerPanel ui = pomMgr.getToolWindowComponent();
            if (ui != null)
                poms = ui.getPomsWithSelectedGoals(false);
            else
                poms = new String[0];
        }
        else
            poms = pomMgr.getFileUrls();
View Full Code Here

        final Project project = getProject(pEvent);
        if (project == null)
            return new Goal[0];

        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final PomManagerPanel ui = PomManager.getInstance(project).getToolWindowComponent();
            if (ui != null) {
                final Goal[] goals = ui.getSelectedGoals();
                if (goals != null)
                    return goals;
            }
        }
View Full Code Here

    }

    protected String getSelectedPomUrl(final AnActionEvent pEvent) {
        if (PomManagerPanel.PLACE.equals(pEvent.getPlace())) {
            final Component comp = pEvent.getInputEvent().getComponent();
            final PomManagerPanel pomPanel = (PomManagerPanel) SwingUtilities.getAncestorOfClass(
                    PomManagerPanel.class,
                    comp);
            return pomPanel.getSelectedPomUrl();
        }
        else {
            final VirtualFile file = getVirtualFile(pEvent);
            if (file == null || !file.isValid() || !FileUtils.exists(file))
                return null;
View Full Code Here

            pEvent.getPresentation().setEnabled(false);
            return;
        }

        final PomManager pomMgr = PomManager.getInstance(project);
        final PomManagerPanel ui = pomMgr.getToolWindowComponent();
        if (ui != null)
            ui.refresh();
    }
View Full Code Here

TOP

Related Classes of org.mevenide.idea.project.ui.PomManagerPanel

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.