Search in sources :

Example 36 with DialogWrapper

use of com.intellij.openapi.ui.DialogWrapper in project intellij-community by JetBrains.

the class MembersBasedViewSwingImpl method showConflictsDialog.

@Override
public boolean showConflictsDialog(@NotNull final MultiMap<PyClass, PyMemberInfo<?>> duplicatesConflict, @NotNull final Collection<PyMemberInfo<?>> dependenciesConflicts) {
    Preconditions.checkArgument(!(duplicatesConflict.isEmpty() && dependenciesConflicts.isEmpty()), "Can't show dialog for empty conflicts");
    final DialogWrapper conflictsDialog = new MembersConflictDialog(myProject, duplicatesConflict, dependenciesConflicts);
    return conflictsDialog.showAndGet();
}
Also used : DialogWrapper(com.intellij.openapi.ui.DialogWrapper) MembersConflictDialog(com.jetbrains.python.refactoring.classes.membersManager.MembersConflictDialog)

Example 37 with DialogWrapper

use of com.intellij.openapi.ui.DialogWrapper in project intellij-plugins by JetBrains.

the class KarmaRunConfigurationEditor method updatePreferredWidth.

private void updatePreferredWidth() {
    DialogWrapper dialogWrapper = DialogWrapper.findInstance(myRootComponent);
    if (dialogWrapper instanceof SingleConfigurableEditor) {
        // dialog for single run configuration
        myNodeInterpreterField.setPreferredWidthToFitText();
        myKarmaPackageField.setPreferredWidthToFitText();
        SwingHelper.setPreferredWidthToFitText(myConfigPathField);
        ApplicationManager.getApplication().invokeLater(() -> SwingHelper.adjustDialogSizeToFitPreferredSize(dialogWrapper), ModalityState.any());
    }
}
Also used : SingleConfigurableEditor(com.intellij.openapi.options.ex.SingleConfigurableEditor) DialogWrapper(com.intellij.openapi.ui.DialogWrapper)

Aggregations

DialogWrapper (com.intellij.openapi.ui.DialogWrapper)37 Project (com.intellij.openapi.project.Project)7 VirtualFile (com.intellij.openapi.vfs.VirtualFile)7 ActionEvent (java.awt.event.ActionEvent)6 Nullable (org.jetbrains.annotations.Nullable)6 JBScrollPane (com.intellij.ui.components.JBScrollPane)5 ActionListener (java.awt.event.ActionListener)4 AnAction (com.intellij.openapi.actionSystem.AnAction)3 AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)3 Document (com.intellij.openapi.editor.Document)3 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 MockDocument (com.intellij.mock.MockDocument)2 MockPsiFile (com.intellij.mock.MockPsiFile)2 javax.swing (javax.swing)2 HyperlinkEvent (javax.swing.event.HyperlinkEvent)2 NotNull (org.jetbrains.annotations.NotNull)2 AnnotationTargetUtil (com.intellij.codeInsight.AnnotationTargetUtil)1 DaemonCodeAnalyzer (com.intellij.codeInsight.daemon.DaemonCodeAnalyzer)1 HighlightDisplayKey (com.intellij.codeInsight.daemon.HighlightDisplayKey)1