Search in sources :

Example 1 with MergePanel2

use of com.intellij.openapi.diff.impl.incrementalMerge.ui.MergePanel2 in project intellij-community by JetBrains.

the class MergeList method fromDataContext.

@Nullable
public static MergeList fromDataContext(DataContext dataContext) {
    MergeList mergeList = DATA_KEY.getData(dataContext);
    if (mergeList != null)
        return mergeList;
    MergePanel2 mergePanel = MergePanel2.fromDataContext(dataContext);
    return mergePanel == null ? null : mergePanel.getMergeList();
}
Also used : MergePanel2(com.intellij.openapi.diff.impl.incrementalMerge.ui.MergePanel2) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with MergePanel2

use of com.intellij.openapi.diff.impl.incrementalMerge.ui.MergePanel2 in project intellij-community by JetBrains.

the class MergeTool method showDialog.

private static void showDialog(MergeRequestImpl data) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("MergeTool - dialog");
    }
    DialogBuilder builder = new DialogBuilder(data.getProject());
    builder.setDimensionServiceKey(data.getGroupKey());
    builder.setTitle(data.getWindowTitle());
    Disposable parent = Disposer.newDisposable();
    builder.addDisposable(parent);
    MergePanel2 mergePanel = createMergeComponent(data, builder, parent);
    builder.setCenterPanel(mergePanel.getComponent());
    builder.setPreferredFocusComponent(mergePanel.getPreferredFocusedComponent());
    builder.setHelpId(data.getHelpId());
    int result = builder.show();
    MergeRequestImpl lastData = mergePanel.getMergeRequest();
    if (lastData != null) {
        lastData.setResult(result);
    }
}
Also used : Disposable(com.intellij.openapi.Disposable) DialogBuilder(com.intellij.openapi.ui.DialogBuilder) MergePanel2(com.intellij.openapi.diff.impl.incrementalMerge.ui.MergePanel2)

Example 3 with MergePanel2

use of com.intellij.openapi.diff.impl.incrementalMerge.ui.MergePanel2 in project intellij-community by JetBrains.

the class MergeTool method createMergeComponent.

private static MergePanel2 createMergeComponent(DiffRequest data, DialogBuilder builder, @NotNull Disposable parent) {
    MergePanel2 mergePanel = new MergePanel2(builder, parent);
    mergePanel.setDiffRequest(data);
    return mergePanel;
}
Also used : MergePanel2(com.intellij.openapi.diff.impl.incrementalMerge.ui.MergePanel2)

Aggregations

MergePanel2 (com.intellij.openapi.diff.impl.incrementalMerge.ui.MergePanel2)3 Disposable (com.intellij.openapi.Disposable)1 DialogBuilder (com.intellij.openapi.ui.DialogBuilder)1 Nullable (org.jetbrains.annotations.Nullable)1