Package com.intellij.ui

Examples of com.intellij.ui.AnActionButtonRunnable


  };

  private JComponent createJComponent() {
    JPanel panelForTable = ToolbarDecorator.createDecorator(mySonarResourcesTable, null).
        setAddAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton anActionButton) {
            final String selectedSonarServerName = mySonarServersView.getSelectedItem();
            if (!NO_SONAR.equals(selectedSonarServerName)) {
              ResourcesSelectionConfigurable dlg = new ResourcesSelectionConfigurable(myProject, selectedSonarServerName);
              dlg.show();
              if (dlg.isOK()) {
                final java.util.List<Resource> selectedSonarResources = dlg.getSelectedSonarResources();
                final java.util.List<Resource> currentSonarResources = mySonarResourcesTable.getItems();

                Set<Resource> mergedSonarResourcesAsSet = new TreeSet<Resource>(new Comparator<Resource>() {
                  @Override
                  public int compare(Resource resource, Resource resource2) {
                    return resource.getKey().compareTo(resource2.getKey());
                  }
                });
                mergedSonarResourcesAsSet.addAll(currentSonarResources);
                mergedSonarResourcesAsSet.addAll(selectedSonarResources);

                setModel(Lists.newArrayList(mergedSonarResourcesAsSet));
              }
            }
          }
        }).
        setRemoveAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton anActionButton) {
            TableUtil.removeSelectedItems(mySonarResourcesTable);
          }
        })
View Full Code Here


    scrollPane.setMinimumSize(scrollDimension);

    myComponent = ToolbarDecorator.createDecorator(table)
      .disableUpAction()
      .disableDownAction()
      .setAddAction(new AnActionButtonRunnable() {
        @Override
        public void run(AnActionButton anActionButton) {
          addPath(project, table);
        }
      }).setRemoveAction(new AnActionButtonRunnable() {
        @Override
        public void run(AnActionButton anActionButton) {
          removePaths(table);
        }
      }).createPanel();
View Full Code Here

    });

    final CommonActionsManager actionManager = CommonActionsManager.getInstance();
    myTreePanel.add(
      ToolbarDecorator.createDecorator(myTree)
        .setAddAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton button) {
            final StrutsFileSet fileSet =
              new StrutsFileSet(StrutsFileSet.getUniqueId(myBuffer),
                                StrutsFileSet.getUniqueName(StrutsBundle.message("facet.fileset.my.fileset"), myBuffer),
                                originalConfiguration) {
                public boolean isNew() {
                  return true;
                }
              };

            final FileSetEditor editor = new FileSetEditor(myPanel,
                                                           fileSet,
                                                           facetEditorContext,
                                                           myConfigsSearcher);
            editor.show();
            if (editor.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
              final StrutsFileSet editedFileSet = editor.getEditedFileSet();
              Disposer.register(strutsFacetConfiguration, editedFileSet);
              myBuffer.add(editedFileSet);
              myModified = true;
              myBuilder.updateFromRoot();
              selectFileSet(fileSet);
            }
            myTree.requestFocus();
          }
        })
        .setRemoveAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton button) {
            remove();
            myModified = true;
            myBuilder.updateFromRoot();
            myTree.requestFocus();
          }
        })
        .setEditAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton button) {
            final StrutsFileSet fileSet = getCurrentFileSet();
            if (fileSet != null) {
              final FileSetEditor editor = new FileSetEditor(myPanel,
View Full Code Here

    }
    Collections.sort(addActions);

    myFrameworkInstancesPanel.add(
      ToolbarDecorator.createDecorator(myFrameworkInstances)
        .setAddAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton button) {
            JBPopupFactory.getInstance().createActionGroupPopup(
              OsmorcBundle.message("frameworks.add.title"),
              new DefaultActionGroup(addActions),
              DataManager.getInstance().getDataContext(button.getContextComponent()),
              false, false, false, null, -1, null
            ).show(button.getPreferredPopupPoint());
          }
        })
        .setRemoveAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton button) {
            removeFrameworkInstance();
          }
        })
        .setEditAction(new AnActionButtonRunnable() {
          @Override
          public void run(AnActionButton button) {
            editFrameworkInstance();
          }
        })
View Full Code Here

            public boolean canCreateElement() {
                return true//To change body of implemented methods use File | Settings | File Templates.
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                TwigSettingsForm.this.openTwigPathDialog(TwigSettingsForm.this.tableView.getSelectedObject());
            }
        });


        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
               TwigSettingsForm.this.openTwigPathDialog(null);
            }
        });
View Full Code Here

            public boolean canCreateElement() {
                return true;
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                ContainerFile containerFile = ContainerSettingsForm.this.tableView.getSelectedObject();
                if(containerFile != null) {
                    String uri = ContainerSettingsForm.this.getPathDialog(null);
                    if(uri != null) {
                        containerFile.setPath(uri);
                        ContainerSettingsForm.this.changed = true;
                    }

                }
            }
        });

        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                String uri = ContainerSettingsForm.this.getPathDialog(null);
                if(uri != null) {
                    ContainerSettingsForm.this.tableView.getListTableModel().addRow(new ContainerFile(uri));
View Full Code Here

            public boolean canCreateElement() {
                return true;
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodParameterReferenceSettingsForm.this.openTwigPathDialog(MethodParameterReferenceSettingsForm.this.tableView.getSelectedObject());
            }
        });


        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodParameterReferenceSettingsForm.this.openTwigPathDialog(null);
            }
        });
View Full Code Here

            public boolean canCreateElement() {
                return true;
            }
        });

        tablePanel.setEditAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodSignatureTypeSettingsForm.this.openTwigPathDialog(MethodSignatureTypeSettingsForm.this.tableView.getSelectedObject());
            }
        });


        tablePanel.setAddAction(new AnActionButtonRunnable() {
            @Override
            public void run(AnActionButton anActionButton) {
                MethodSignatureTypeSettingsForm.this.openTwigPathDialog(null);
            }
        });
View Full Code Here

            @Override public void mouseExited(final MouseEvent mouseEvent) {}
        });

        final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(profileMappingTable);
        decorator
                .setAddAction(new AnActionButtonRunnable() {
                    @Override
                    public void run(final AnActionButton button) {
                        addRow();
                    }
                })
                .setEditAction(new AnActionButtonRunnable() {
                    @Override
                    public void run(final AnActionButton button) {
                        editRow();
                    }
                })
View Full Code Here

TOP

Related Classes of com.intellij.ui.AnActionButtonRunnable

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.