Semantic Version Control

Keeping code quality high requires constant refactors.
Semantic Version Control helps you diffing refactored code.
Semantic Version Control
The new semantic diff + analyze refactors support included with Plastic SCM understands C#, Java, C and
(and you can plug your own parsers too)

Built-in semantic diff

Tracks moved code to help you focus on the relevant changes
  • 1

    Check the next diff: one method was moved to a new class and changed at the same time. Plastic detects that and shows the diffs semantically. Note how the deleted "usings" are also correctly identified.

    Plastic detects that and shows the diffs semantically
  • Check the second example: it is a crisscross diff that happens when two methods swap their relative positions on the file. Plastic parses the code, finds where the methods are, and then diffs them. A traditional text-based diff tries to match line by line, which doesn’t work here.

    crisscross diff
  • The integrated semantic diff also adds an outline on the left to quickly navigate and highlight changes.

    Java outline
  • Plastic also includes a "visual diff" to understand the refactors at a higher level:

    And a “visual diff” helps you understanding complex refactor at first glance:
  • 2

    Refactor Analysis adds multi-file semantic diff capabilities – what if you decide to split a class in two and move one of them to another file? The new “analyze refactors” in Plastic SCM can easily track it.

    Take a careful look at the example below: the old Socket class was split in two. The “Listen()” method was moved to the new ServerSocket.cs file and Plastic can track it and show you how it was changed!

    Refactoring is key to keep code quality high and now diffing the refactored code will be straightforward.

    analyze refactors

    As you can see, Refactor Analysis or multi-file semantic diff is a huge step ahead in what the version control can do and how it can help you being more productive on a daily basis. We think that what you see here today will be the standard in a few years.

    Check the next screenshot to see how the regular file diff is decorated with new icons to explain that a “cross-file diff” has been detected.

    analyze refactors inside file diff
  • 3

    Semantic Method History – ever wanted to see the history of a method? Yes, a method, not a file. Even if the method was renamed or moved inside the file...

    Plastic SCM for .NET developers
Interested in all things semantic? Then close the loop with SemanticMerge!