Summary: | Ability for Apply Patch wizard to work with multiple-project patches | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Bogdan Gheorghe <gheorghe> | ||||||||
Component: | Compare | Assignee: | Andre Weinand <andre_weinand> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | enhancement | ||||||||||
Priority: | P3 | CC: | andre_weinand, Michael.Valenta | ||||||||
Version: | 3.2 | ||||||||||
Target Milestone: | 3.2 M3 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Bogdan Gheorghe
2005-09-23 14:44:54 EDT
Created attachment 27460 [details]
Apply Patch zip
BTW, the Create Patch portion of this has already been commited to head. So to try this out, apply the attached patch and then start up Eclipse with the VM flag: -DworkspacePatch=true This enables workspace patch creation in Create Patch. To try it out, you can select multiple projects, resources etc and create a patch (the wizard will only allow you to create a workspace format patch if you have multiple selections). I've applied the patch and it works for me. Cool stuff, thanks! Here are some remarks: - the layout of the first page is slightly confusing. At least on MacOS X it is not obvious that the workspace radio button and the workspace tree underneath it, belongs together (see attached screenshot). One way to fix this would be to indent the tree so that it looks "grouped" under the workspace button. - I'm reluctant to add the two new API methods to CompareUI (it is already a kitchen sink :-). Why not create a new package org.eclipse.compare.patch for the public API of patch? (There are other requests to make the patcher available as API, so we could use the new package anyway) - I would rename method Utilities.getResource(ISelection) to getFirstResource and keep it in internal.patch package by creating a local Utilities class there. How should we proceed? Should I release your code and you'll create new patches based on that, or should I wait for a new patch from you? Created attachment 27925 [details]
existing layout
I think it will be easier if you release the patch and we send you an additional patch with the requested modifications. That way, we can have it available in the next integration build and will have time to get comments from others before M3. patch released to HEAD. Here are some changes for Apply Patch relating to Bugs 110481, Bug 112169 and Bug 112661. Changes are as follows: From Bug 110481: 1) The workspace tree on the first page of the wizard has been indented to fall under the Workspace selection button. 2) Created new org.eclipse.compare.patch package that has WorkspacePatcherUI.java which contains the API needed to write out workspace format patches. 3) Renamed Utilities.getResource(ISelection) to getFirstResource From Bug 112169: 4) Added a check to PreviewPatchPage to make sure that users can't select Diffs or Hunks that have problems From Bug 112661 5) Changed the error reporting so that no errors are shown when the dialog first starts up (the user can't continue unless a patch is selected) 6) Changed the initial patch selection mechanism as follows: i) See if the resource that the user has selected to run Apply Patch on is a patch file. If it is, select it in the workspace tree and choose the workspace button. If not go on. ii) See if the clipboard contains a valid patch. If so select the clipboard button. If not go on. iii) Load the persisted setting from the last time apply patch was run. (If it has never been run, the default setting is file). If the previous option no longer exists (ie. junk on the clipboard or workspace file has been deleted) default to file. 7) Changed title on first page to "Select the patch location." 8) Added mnemonics to workspace trees on both the first and second pages. 9) Changed sorter in workspace trees to ResourceSorter(ResourceSorter.Name) 10) Save dialog resize settings. Andre, if you could release this patch to HEAD sometime next week, it would give us a chance to exercise the code before M3. Thanks! Created attachment 28602 [details]
Apply Patch Fixes
Thanks for the patch. Looks good and works great! Since I'll be on vacation for the next two weeks, I've already applied the patch and tagged the project for the next build input. In addition I've updated component.xml for the new package and the new public type. Verified using I20051213-0010 Filed additional bug 120531 |