Package com.intellij.notification

Examples of com.intellij.notification.NotificationListener


        } else if (status == DUPLICATE) {
          type = NotificationType.WARNING;
        } else {
          type = NotificationType.INFORMATION;
        }
        NotificationListener listener = url != null ? new NotificationListener() {
          @Override
          public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
            BrowserUtil.browse(url);
            notification.expire();
          }
View Full Code Here


    public static void sendErrorNotification(Project project, String title, String message, String ... args) {
        sendNotification(project, NotificationType.ERROR, title, message, args);
    }

    public static void sendNotification(Project project, NotificationType type, String title, String message, String ... args) {
        final NotificationListener listener = new NotificationListener() {
            public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
                notification.expire();
            }
        };
View Full Code Here

  }

  public static void checkThatGroovyIsOnClasspath() {
    if (isGroovyOnClasspath()) return;

    NotificationListener listener = new NotificationListener() {
      @Override public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
        boolean downloaded = downloadFile("http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.0.6/", "groovy-all-2.0.6.jar", LIVEPLUGIN_LIBS_PATH);
        if (downloaded) {
          notification.expire();
          askIsUserWantsToRestartIde("For Groovy libraries to be loaded IDE restart is required. Restart now?");
View Full Code Here

    private static final String OLD_IMPORT = "import intellijeval";
    private static final String NEW_STATIC_IMPORT = "import static liveplugin";
    private static final String NEW_IMPORT = "import liveplugin";

    public static void askIfUserWantsToMigrate(final Runnable migrationCallback) {
      NotificationListener listener = new NotificationListener() {
        @Override public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
          migrationCallback.run();
          notification.expire();
        }
      };
View Full Code Here

              filterMapping.addUrlPattern().setStringValue("/*");
            }
          }.execute();


          final NotificationListener showFacetSettingsListener = new NotificationListener() {
            public void hyperlinkUpdate(@NotNull final Notification notification,
                                        @NotNull final HyperlinkEvent event) {
              if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                notification.expire();
                ModulesConfigurator.showFacetSettingsDialog(strutsFacet, null);
View Full Code Here

            if (!StringUtil.isEmpty(defaultConfiguration.getCompilerOutputPath())) {
                config.setCompilerOutputPath(defaultConfiguration.getCompilerOutputPath());
            } else {
                final String text = PbBundle.message("facet.protobuf.configuration.missing_output_dir", module.getName());
                NotificationGroup ng = NotificationGroup.balloonGroup("Framework Detection");
                ng.createNotification("Framework configuration incomplete", text, NotificationType.INFORMATION, new NotificationListener() {
                    @Override
                    public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
                        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                            ShowSettingsUtil.getInstance().editConfigurable(project, ProjectStructureConfigurable.getInstance(project), new Runnable() {
                                @Override
View Full Code Here

        }
    }

    public static void notifyEnableMessage(final Project project) {

        Notification notification = new Notification("Symfony2 Plugin", "Symfony2 Plugin", "Enable the Symfony2 Plugin in <a href=\"config\">Project Settings</a> or <a href=\"dismiss\">dismiss</a> further messages", NotificationType.INFORMATION, new NotificationListener() {
            @Override
            public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {

                // handle html click events
                if("config".equals(event.getDescription())) {
View Full Code Here

    }

    public void showAddGitRepositoryNotification(final Project project) {
        NotificationBuilder notification = new NotificationBuilder(project, "Insufficient dependencies for Gerrit plugin",
                "Please configure a Git repository.<br/><a href='vcs'>Open Settings</a>")
                .listener(new NotificationListener() {
                    @Override
                    public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
                        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                            if (event.getDescription().equals("vcs")) {
                                ShowSettingsUtil.getInstance().showSettingsDialog(project, ActionsBundle.message("group.VcsGroup.text"));
View Full Code Here

TOP

Related Classes of com.intellij.notification.NotificationListener

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.