Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Apply patch in Sync view"

m (Solution)
m (Tasks)
Line 21: Line 21:
 
* org.eclipse.core.runtime.adapters -
 
* org.eclipse.core.runtime.adapters -
  
==Tasks==
+
=Tasks=
  
 
Required changes are grouped in the following areas:
 
Required changes are grouped in the following areas:
  
===Model Provider===
+
==Synchronize participant, subscriber==
===UI===
+
* Add synchronize participant + subscriber
====Context menu====
+
* IResourceVariant implementation should return patched files when asked for Storage
====View toolbar===
+
==Synchronize wizard==
===Operations===
+
* Embed apply patch wizard into synchronize wizard so patch (input) can be selected
====Patch options====
+
* Add a page to the new wizard where user can select how the patch should be applied (traditionally, preview in the wizard or in Sync view)
 +
==Model Provider==
 +
* <strikie>Use DiffProject, FilePatch2 and Hunk as model objects</strike>
 +
* Use PatchDiffNodes as model objects, they represent the result of applying a patch (not the patch strucutre as types above) and they implement ICompareInput so are compare-ready
 +
==Sync view==
 +
===Context menu===
 +
* Update means 'Apply'
 +
* No "Exclude" action available, replace with "Remove from the view"
 +
===View toolbar===
 +
* 'Copy All Incoming Changes...' means 'Apply All'
 +
==Operations==
 +
===Patch options===
 +
* Re-applying patch -> synchronize again
  
 
==Source code==
 
==Source code==

Revision as of 08:05, 3 December 2009

Problem

Provide an alternative way of applying patches. Desired behavior, which could in future replace the current one, is to use the Synchronize View to display content of a patch, resolve potential conflicts and apply the patch eventually. This way while the comparison is being done, other features of Eclipse are available to use, we are not bounded to the current Apply Patch wizard.

This is tracked by bug 236169.

Solution

The proposed solution consist of several parts:

  • Subscriber -
  • SyncInfo -
  • IResourceVariant -
  • ModelProvider
    • model objects
    • ResourceMappings
  • org.eclipse.team.ui.synchronizeWizards extension point - Synchronize Participant Creation Wizards
  • org.eclipse.team.ui.synchronizeParticipants extension point -
  • org.eclipse.ui.navigator.navigatorContent extension point -
    • content providers -
    • label providers -
  • org.eclipse.core.runtime.adapters -

Tasks

Required changes are grouped in the following areas:

Synchronize participant, subscriber

  • Add synchronize participant + subscriber
  • IResourceVariant implementation should return patched files when asked for Storage

Synchronize wizard

  • Embed apply patch wizard into synchronize wizard so patch (input) can be selected
  • Add a page to the new wizard where user can select how the patch should be applied (traditionally, preview in the wizard or in Sync view)

Model Provider

  • <strikie>Use DiffProject, FilePatch2 and Hunk as model objects</strike>
  • Use PatchDiffNodes as model objects, they represent the result of applying a patch (not the patch strucutre as types above) and they implement ICompareInput so are compare-ready

Sync view

Context menu

  • Update means 'Apply'
  • No "Exclude" action available, replace with "Remove from the view"

View toolbar

  • 'Copy All Incoming Changes...' means 'Apply All'

Operations

Patch options

  • Re-applying patch -> synchronize again

Source code

Back to the top