本文整理汇总了Java中com.intellij.openapi.ui.DialogBuilder.showNotModal方法的典型用法代码示例。如果您正苦于以下问题:Java DialogBuilder.showNotModal方法的具体用法?Java DialogBuilder.showNotModal怎么用?Java DialogBuilder.showNotModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.ui.DialogBuilder
的用法示例。
在下文中一共展示了DialogBuilder.showNotModal方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showDirDiffDialog
import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
private void showDirDiffDialog(@NotNull FilePath path, @Nullable String hash1, @Nullable String hash2, @NotNull List<Change> diff) {
DialogBuilder dialogBuilder = new DialogBuilder(myProject);
String title;
if (hash2 != null) {
if (hash1 != null) {
title = String.format("Difference between %s and %s in %s", GitUtil.getShortHash(hash1), GitUtil.getShortHash(hash2), path.getName());
}
else {
title = String.format("Initial commit %s in %s", GitUtil.getShortHash(hash2), path.getName());
}
}
else {
LOG.assertTrue(hash1 != null, "hash1 and hash2 can't both be null. Path: " + path);
title = String.format("Difference between %s and local version in %s", GitUtil.getShortHash(hash1), path.getName());
}
dialogBuilder.setTitle(title);
dialogBuilder.setActionDescriptors(new DialogBuilder.ActionDescriptor[] { new DialogBuilder.CloseDialogAction()});
final ChangesBrowser changesBrowser = new ChangesBrowser(myProject, null, diff, null, false, true,
null, ChangesBrowser.MyUseCase.COMMITTED_CHANGES, null);
changesBrowser.setChangesToDisplay(diff);
dialogBuilder.setCenterPanel(changesBrowser);
dialogBuilder.showNotModal();
}
示例2: showDirDiffDialog
import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
private void showDirDiffDialog(@NotNull FilePath path, @Nullable String hash1, @Nullable String hash2, @NotNull List<Change> diff) {
DialogBuilder dialogBuilder = new DialogBuilder(myProject);
String title;
if (hash2 != null) {
if (hash1 != null) {
title = String.format("Difference between %s and %s in %s", hash1, hash2, path.getName());
}
else {
title = String.format("Initial commit %s in %s", hash2, path.getName());
}
}
else {
LOG.assertTrue(hash1 != null, "hash1 and hash2 can't both be null. Path: " + path);
title = String.format("Difference between %s and local version in %s", hash1, path.getName());
}
dialogBuilder.setTitle(title);
dialogBuilder.setActionDescriptors(new DialogBuilder.ActionDescriptor[]{new DialogBuilder.CloseDialogAction()});
final ChangesBrowser changesBrowser = new ChangesBrowser(myProject, null, diff, null, false, true,
null, ChangesBrowser.MyUseCase.COMMITTED_CHANGES, null);
changesBrowser.setChangesToDisplay(diff);
dialogBuilder.setCenterPanel(changesBrowser);
dialogBuilder.showNotModal();
}
示例3: showChangesDialog
import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
protected void showChangesDialog(@NotNull String title, @NotNull 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();
}
示例4: showChangesDialog
import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
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();
}
示例5: showChangesDialog
import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
@RequiredDispatchThread
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();
}