eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Proposal: Opening/Closing Mechanism for Zip Files

Open Michael5601 opened this issue 1 year ago • 6 comments

Proposal: Opening/Closing Mechanism for Zip Files

Background

The Eclipse IDE has no built in functionality to open Zip Files and read or manipulate their content. Because of this, other operations like searching inside of Zip Files or comparing two Zip Files were also not possible.

Description

This PR introduces UI support for accesing the opening/closing mechanism for Zip Files over the UI-menu. It is accessed by right-clicking the Zip File that should be opened and then clicking on "Open Zip File". Closing is accessed the same way but when right-clicking an opened Zip File.

Please see Plaform PR for the PR on the repository eclipse.platform for the platform implementation and further information.

Co-Authored-By: CodeLtDave [email protected]

Michael5601 avatar Jun 10 '24 10:06 Michael5601

Please post some screenshots about the workflow.

jukzi avatar Jun 10 '24 14:06 jukzi

I want to clarify the workflow with the following screenshots:

At first the Zip File is closed and it is not possible to view/modify or search its contents. ClosedZip

By right-clicking and selection "Open Zip File" the Zip File can be opened. Menu

Opening the Zip File allows using it like a normal folder with all operations supported. OpenedZip

Opening a resource inside of the zip opens the editor for the resource. OpenedResource

Opened Zip Files can be closed by right-clicking and selecting "Close Zip File". Menu2

After closing the zip file we have the same state as in the beginning. ClosedZip

For other archive types than "zip" the button will not show in the menu when right-clicking the archive. I hope these screenshots could help to understand the workflow.

Michael5601 avatar Jun 11 '24 12:06 Michael5601

I hope these screenshots could help to understand the workflow.

Makes sense. I would have expected open/close to be more at the top, as the normal "Open" action is: image

jukzi avatar Jun 11 '24 12:06 jukzi

Just another idea: explicit open/closing zipfiles could be avoided by adding a node "Archives" like JDT already does for "Referenced Libraries" which makes it possible to explore the zip files contents too. image

jukzi avatar Jun 14 '24 09:06 jukzi

Test Results

0 files   -  1 815  0 suites   - 1 815   0s :stopwatch: - 1h 31m 7s 0 tests  -  7 636  0 :white_check_mark:  -  7 408  0 :zzz:  - 228  0 :x: ±0  0 runs   - 24 069  0 :white_check_mark:  - 23 320  0 :zzz:  - 749  0 :x: ±0 

Results for commit 91f9a51a. ± Comparison against base commit 385b30bb.

github-actions[bot] avatar Jun 17 '24 12:06 github-actions[bot]

Just another idea: explicit open/closing zipfiles could be avoided by adding a node "Archives" like JDT already does for "Referenced Libraries" which makes it possible to explore the zip files contents too. image

This was our initial approach to the topic, though I don't recall the exact reasons we decided against it, given the time that has passed. The main issue, I believe, was that this window relies on JDT, while we wanted to exclusively use platform content. Additionally, the search functionality only targets content within the local workspace. Since our project aimed to improve the file search at first, we quickly abandoned the JDT approach. If you know a specific way how this could work with JDT we can also examine it further.

Michael5601 avatar Jun 18 '24 12:06 Michael5601