Search in sources :

Example 1 with DiffRequestChain

use of com.intellij.diff.chains.DiffRequestChain in project intellij-community by JetBrains.

the class DiffManagerImpl method showDiffBuiltin.

@Override
public void showDiffBuiltin(@Nullable Project project, @NotNull DiffRequest request, @NotNull DiffDialogHints hints) {
    DiffRequestChain requestChain = new SimpleDiffRequestChain(request);
    showDiffBuiltin(project, requestChain, hints);
}
Also used : SimpleDiffRequestChain(com.intellij.diff.chains.SimpleDiffRequestChain) DiffRequestChain(com.intellij.diff.chains.DiffRequestChain) SimpleDiffRequestChain(com.intellij.diff.chains.SimpleDiffRequestChain)

Example 2 with DiffRequestChain

use of com.intellij.diff.chains.DiffRequestChain in project intellij-community by JetBrains.

the class ShowDiffAction method showDiffForChange.

private static void showDiffForChange(@Nullable Project project, @NotNull List<ChangeDiffRequestProducer> presentables, int index, @NotNull ShowDiffContext context) {
    if (presentables.isEmpty())
        return;
    if (index < 0 || index >= presentables.size())
        index = 0;
    DiffRequestChain chain = new ChangeDiffRequestChain(presentables);
    chain.setIndex(index);
    for (Map.Entry<Key, Object> entry : context.getChainContext().entrySet()) {
        chain.putUserData(entry.getKey(), entry.getValue());
    }
    chain.putUserData(DiffUserDataKeys.CONTEXT_ACTIONS, context.getActions());
    DiffManager.getInstance().showDiff(project, chain, context.getDialogHints());
}
Also used : Map(java.util.Map) DiffRequestChain(com.intellij.diff.chains.DiffRequestChain) Key(com.intellij.openapi.util.Key)

Example 3 with DiffRequestChain

use of com.intellij.diff.chains.DiffRequestChain in project intellij-community by JetBrains.

the class MigrateDiffTool method show.

@Override
public void show(DiffRequest request) {
    DiffRequestChain newChain = MigrateToNewDiffUtil.convertRequestChain(request);
    WindowWrapper.Mode mode = FrameDiffTool.shouldOpenDialog(request.getHints()) ? WindowWrapper.Mode.MODAL : WindowWrapper.Mode.FRAME;
    DiffManager.getInstance().showDiff(request.getProject(), newChain, new DiffDialogHints(mode));
}
Also used : WindowWrapper(com.intellij.openapi.ui.WindowWrapper) DiffDialogHints(com.intellij.diff.DiffDialogHints) DiffRequestChain(com.intellij.diff.chains.DiffRequestChain)

Example 4 with DiffRequestChain

use of com.intellij.diff.chains.DiffRequestChain in project intellij-community by JetBrains.

the class DiffManagerImpl method showDiff.

@Override
public void showDiff(@Nullable Project project, @NotNull DiffRequest request, @NotNull DiffDialogHints hints) {
    DiffRequestChain requestChain = new SimpleDiffRequestChain(request);
    showDiff(project, requestChain, hints);
}
Also used : SimpleDiffRequestChain(com.intellij.diff.chains.SimpleDiffRequestChain) DiffRequestChain(com.intellij.diff.chains.DiffRequestChain) SimpleDiffRequestChain(com.intellij.diff.chains.SimpleDiffRequestChain)

Aggregations

DiffRequestChain (com.intellij.diff.chains.DiffRequestChain)4 SimpleDiffRequestChain (com.intellij.diff.chains.SimpleDiffRequestChain)2 DiffDialogHints (com.intellij.diff.DiffDialogHints)1 WindowWrapper (com.intellij.openapi.ui.WindowWrapper)1 Key (com.intellij.openapi.util.Key)1 Map (java.util.Map)1