Java Code Examples for com.intellij.openapi.ui.DialogBuilder#showNotModal()

The following examples show how to use com.intellij.openapi.ui.DialogBuilder#showNotModal() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseDiffFromHistoryHandler.java    From consulo with Apache License 2.0 5 votes vote down vote up
protected void showChangesDialog(@Nonnull String title, @Nonnull List<Change> changes) {
  DialogBuilder dialogBuilder = new DialogBuilder(myProject);

  dialogBuilder.setTitle(title);
  dialogBuilder.setActionDescriptors(new DialogBuilder.ActionDescriptor[]{new DialogBuilder.CloseDialogAction()});
  final ChangesBrowser changesBrowser =
          new ChangesBrowser(myProject, null, changes, null, false, true, null, ChangesBrowser.MyUseCase.COMMITTED_CHANGES, null);
  changesBrowser.setChangesToDisplay(changes);
  dialogBuilder.setCenterPanel(changesBrowser);
  dialogBuilder.setPreferredFocusComponent(changesBrowser.getPreferredFocusedComponent());
  dialogBuilder.showNotModal();
}
 
Example 2
Source File: VcsDiffUtil.java    From consulo with Apache License 2.0 5 votes vote down vote up
@RequiredUIAccess
public static void showChangesDialog(@Nonnull Project project, @Nonnull String title, @Nonnull List<Change> changes) {
  DialogBuilder dialogBuilder = new DialogBuilder(project);

  dialogBuilder.setTitle(title);
  dialogBuilder.setActionDescriptors(new DialogBuilder.CloseDialogAction());
  final ChangesBrowser changesBrowser =
          new ChangesBrowser(project, null, changes, null, false, true, null, ChangesBrowser.MyUseCase.COMMITTED_CHANGES, null);
  changesBrowser.setChangesToDisplay(changes);
  dialogBuilder.setCenterPanel(changesBrowser);
  dialogBuilder.setPreferredFocusComponent(changesBrowser.getPreferredFocusedComponent());
  dialogBuilder.showNotModal();
}