eclipse.platform
                                
                                 eclipse.platform copied to clipboard
                                
                                    eclipse.platform copied to clipboard
                            
                            
                            
                        Ability to modify content of zip files opened in Compare Editor
Hoping I'm filing this in the appropriate place, if not please let me know
I'd love to see the ability added that when opening zip files in the Compare Editor and comparing a (test)file from it's contents, that the Copy Left/Right actions on differences found are enabled and that I can just modify the content on either the left or right side of the compare , just like you would be able to when opening a non-zipped text file in the compare editor
This (or similar) functionality is provided by zip editor plugin.
I believe the missing bits would be a full support for a zip: filesystem/filestore in Eclipse Platform. Once we have it, then all existing operations for in-zip documents would work out of the box, in any context.
This (or similar) functionality is provided by zip editor plugin.
Not quite afaict: while that plugin allows to open a zip file, then allows opening a file from that zip file and edit it, the zip file doesn't get updated until you save & close the edited file AND additionally confirm you want to then also update the zip file, so quite cumbersome.
But more importantly, it does not support compare two zip files or two different versions of the same time (in the Git perspective for example)
I believe the missing bits would be a full support for a
zip:filesystem/filestore in Eclipse Platform
Is that planned? Is the a case for that? Should this request serve as the case for implementing that?
Is that planned?
Not by me at least ;) If someone in the active maintainers plans it, I suspect they'll reach this ticket. In the meantime, don't hesitate to try contributing improvements on this topic. While most maintainers cannot really implement new features just on the base of 1 user request (we all have more than full backlogs), we all take care of giving higher importance to code reviews.
In the meantime, don't hesitate to try contributing improvements on this topic
Any pointers of approx. where to start looking? Given that the compare editor already opens the zipfile and can compare 2 zipfiles/versions, I'm making the assumption that there's already support for a zip filesyste/store, but that it's a readOnly system/store? Or am I way off here?
Or is a matter of 'just' returning true here and implementing the public void save(IStructureComparator structure, Object input) method?
And then use Java's FileSystems api to do the modifications, like https://stackoverflow.com/a/43836969/7049810
returning true here would enable save button when comparing, but wouldn't make it work. It wouldn't allow to re-map the document from inside a zip to a zip file and to call save on this document to cascade to a save in the zip. Eclipse has a FileSystem API already, which pre-dates Java 7 (it happens that many "recent" Java API have already existed for a while). I'm not sure you'll be easily able to bypass it as I suspect a pre-requisite would be to make the Eclipse filesystem API capable of interacting with java's FileSystem API which is not the case yet... Anyway, at this stage, it's more an implementation detail, and the compare editor is just 1 particular case, not the most trivial. What you want is basically that a document created from a zip file becomes saveable. Then, once this exists, it would just be a matter of using it. I see that the Platform example code has an example of a zip filesystem. Maybe it's a good starting point to try it.
We have just started working on zip file support in the Eclipse Platform, as we have a particular need for being able to search within zip files. And it seems to make most sense to achieve that by adding proper zip file support to the platform and gain search support almost for free. Currently, we make some initial explorations but we will soon also post an issue to notify about and discuss work on that topic.
For now, as I came across this issue and it seems to relevant for you as well, I just wanted to let you know that we are interested in that topic and will invest some work into it. In case someone has already started work on that or has important input, I would be glad if you could let us know.
Jave you seen https://github.com/uvoigt/zipeditor ? That one is almost perfect.
zipeditor is quite limited, see https://github.com/eclipse-platform/eclipse.platform/issues/494#issuecomment-1588900179
zipeditor is quite limited, see #494 (comment)
This isn't really a big problem, considering the rest works fine.
That really depends on your perspective 🙂