Skip to content

Commit

Permalink
Adds the netbeans.diff.default.compact system property for a more com…
Browse files Browse the repository at this point in the history
…pact diff view that only shows the graphical diff and not the big tabbed pane with the graphical and text diff
  • Loading branch information
emilianbold committed May 2, 2018
1 parent ae65358 commit 8ce2cf5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions diff/apichanges.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ is the proper place.

<changes>

<change id="netbeans_diff_default_compact">
<api name="diff"/>
<summary>Show compact diff with netbeans.diff.default.compact system property</summary>
<version major="1" minor="52"/>
<date day="2" month="5" year="2018"/>
<author login="emi"/>
<compatibility addition="yes" binary="compatible" source="compatible" semantic="compatible" deprecation="no" deletion="no" modification="no"/>
<description>
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).
</description>
</change>
<change id="diff-api">
<api name="diff"/>
<summary>The Diff APIs created</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 8ce2cf5

Please sign in to comment.