From 8ce2cf5bf7339d2f55d5db915cfbc9313ed07dab Mon Sep 17 00:00:00 2001 From: Emilian Bold Date: Wed, 2 May 2018 08:21:48 +0300 Subject: [PATCH] Adds the netbeans.diff.default.compact system property for a more compact diff view that only shows the graphical diff and not the big tabbed pane with the graphical and text diff --- diff/apichanges.xml | 12 ++++++++++++ .../diff/builtin/DefaultDiffControllerProvider.java | 3 +++ 2 files changed, 15 insertions(+) diff --git a/diff/apichanges.xml b/diff/apichanges.xml index f678efbd8a1b..e604a3c05167 100644 --- a/diff/apichanges.xml +++ b/diff/apichanges.xml @@ -91,6 +91,18 @@ is the proper place. + + + Show compact diff with netbeans.diff.default.compact system property + + + + + + Added the system property netbeans.diff.default.compact which instructs the default DiffControllerProvider to + show only the graphical diff (instead of the tabbed pane with the graphical and textual diffs). + + The Diff APIs created diff --git a/diff/src/org/netbeans/modules/diff/builtin/DefaultDiffControllerProvider.java b/diff/src/org/netbeans/modules/diff/builtin/DefaultDiffControllerProvider.java index e9b47fa27a51..0d8ad51935b0 100644 --- a/diff/src/org/netbeans/modules/diff/builtin/DefaultDiffControllerProvider.java +++ b/diff/src/org/netbeans/modules/diff/builtin/DefaultDiffControllerProvider.java @@ -39,6 +39,9 @@ public DiffControllerImpl createDiffController(StreamSource base, StreamSource m @Override public DiffControllerImpl createEnhancedDiffController(StreamSource base, StreamSource modified) throws IOException { + if (Boolean.getBoolean("netbeans.diff.default.compact")) { + return createDiffController(base, modified); + } return new EditableDiffView(base, modified, true); } }