Example usage for com.intellij.openapi.diff DiffTool HINT_SHOW_NOT_MODAL_DIALOG

List of usage examples for com.intellij.openapi.diff DiffTool HINT_SHOW_NOT_MODAL_DIALOG

Introduction

In this page you can find the example usage for com.intellij.openapi.diff DiffTool HINT_SHOW_NOT_MODAL_DIALOG.

Prototype

Object HINT_SHOW_NOT_MODAL_DIALOG

To view the source code for com.intellij.openapi.diff DiffTool HINT_SHOW_NOT_MODAL_DIALOG.

Click Source Link

Usage

From source file:com.urswolfer.intellij.plugin.gerrit.ui.diff.CustomizableFrameDiffTool.java

License:Apache License

static void showDiffDialog(DialogBuilder builder, Collection hints) {
    builder.showModal(!hints.contains(DiffTool.HINT_SHOW_NOT_MODAL_DIALOG));
}

From source file:com.urswolfer.intellij.plugin.gerrit.ui.diff.CustomizableFrameDiffTool.java

License:Apache License

static boolean shouldOpenDialog(Collection hints) {
    if (hints.contains(DiffTool.HINT_SHOW_MODAL_DIALOG))
        return true;
    if (hints.contains(DiffTool.HINT_SHOW_NOT_MODAL_DIALOG))
        return true;
    if (hints.contains(DiffTool.HINT_SHOW_FRAME))
        return false;
    return KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow() instanceof JDialog;
}

From source file:jetbrains.communicator.idea.DiffWindowOpener.java

License:Apache License

public void showDiff() {
    DiffTool diffTool = DiffManager.getInstance().getIdeaDiffTool();
    SimpleDiffRequest diffRequest = new SimpleDiffRequest(myProject, "Diff for " + myVFile.getDisplayName());
    diffRequest.addHint(DiffTool.HINT_SHOW_NOT_MODAL_DIALOG);

    Document localDocument = FileDocumentManager.getInstance().getDocument(myVirtualFile);

    diffRequest.setContentTitles("My Version", myRemoteUser.getDisplayName() + "'s Version");
    diffRequest.setContents(new DocumentContent(localDocument), new SimpleContent(myRemoteText));

    diffTool.show(diffRequest);//from   w ww.  j a  v  a 2s .  c  o m
}