Class WorkspacePatcherUI

java.lang.Object
org.eclipse.compare.patch.WorkspacePatcherUI

public class WorkspacePatcherUI extends Object
Provides the headers required to create a workspace patch.
Since:
3.2
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.
  • Constructor Details

    • WorkspacePatcherUI

      public WorkspacePatcherUI()
  • Method Details

    • getWorkspacePatchHeader

      public static String getWorkspacePatchHeader()
      Returns a string that must be the first line of a workspace patch (a multi-project patch that is understood by the Apply Patch wizard). Each project to be included in the patch must be prefixed by the line obtained from the getWorkspacePatchProjectHeader(). This snippet outlines how the a workspace patch is to be created:
        //Write out workspace patch header
        stream.println(CompareUI.getWorkspacePatchHeader());
        for (int i=0; i<projects.length; i++){
          //Write out project header
          stream.println(CompareUI.getWorkspacePatchProjectHeader(projects[i]);
          //Write out patches in Unified Diff format
        }
       
      Returns:
      String
      Since:
      3.2
      See Also:
    • getWorkspacePatchProjectHeader

      public static String getWorkspacePatchProjectHeader(IProject project)
      Returns the project header that must appear before any patches that apply to that project. All patches that are encountered after this header and before the next header are understood to belong the the project.
      Parameters:
      project - project to be patched
      Returns:
      String
      Since:
      3.2
      See Also: