Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 283367 - make DLTK support non-zip archive
Summary: make DLTK support non-zip archive
Status: RESOLVED FIXED
Alias: None
Product: DLTK
Classification: Technology
Component: Common (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: dltk.common-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 22:54 EDT by Zhongwei Zhao CLA
Modified: 2010-06-11 06:25 EDT (History)
2 users (show)

See Also:


Attachments
patch for supporting non-zip archive in DLTK (18.05 KB, patch)
2009-07-13 22:54 EDT, Zhongwei Zhao CLA
no flags Details | Diff
patch for supporting non-zip archive in DLTK (19.72 KB, patch)
2009-07-13 23:48 EDT, Zhongwei Zhao CLA
no flags Details | Diff
patch for supporting non-zip archive in DLTK (19.90 KB, patch)
2009-07-14 09:13 EDT, Zhongwei Zhao CLA
alex.panchenko: iplog+
Details | Diff
patch for supporting non-zip archive in DLTK (102.11 KB, patch)
2009-07-16 23:08 EDT, Zhongwei Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhongwei Zhao CLA 2009-07-13 22:54:51 EDT
Created attachment 141475 [details]
patch for supporting non-zip archive in DLTK

i have asked this question in the newsgroup.but none answers me.
and i think DLTK could not support non-zip archive after i look into the source code.


sometimes the archive are not zip,maybe it is tar archive or other.
i want to know if there is a plan for this,and i have written a patch for this.there is a Archive interface and it can be gained by IDLTKLanguageToolkit/IDLTKLanguageToolkitExtension interface according to the file path.the Archive implementation is just subclass of ZipFile/TarFile/...,and there are entries in Archive ,they are the wrapper classes of ZipEntry/TarEntry/...

i am very glad to contribute my code or there are other implementation for this function
Comment 1 Zhongwei Zhao CLA 2009-07-13 23:48:51 EDT
Created attachment 141478 [details]
patch for supporting non-zip archive in DLTK
Comment 2 Zhongwei Zhao CLA 2009-07-14 09:13:12 EDT
Created attachment 141515 [details]
patch for supporting non-zip archive in DLTK
Comment 3 Roy Ganor CLA 2009-07-16 18:48:36 EDT
ok, I reviewed the fix and it seems really good except for two important comments:
1. The Archive and ArchiveEntry  should be refactored to be under 
org.eclipse.dltk.core as it is part of the API, (it should not be part of the internal package and thus the .api file can be removed)

2. from org.eclipse.dltk.core we should not refer to org.eclipse.ui.ide so we need to move the TarFile classes from the core plugin. if some extension will need it they will probably use extend it in their plugin.

contributed by zhaozhongwei.
Comment 4 Zhongwei Zhao CLA 2009-07-16 20:38:39 EDT
(In reply to comment #3)
> ok, I reviewed the fix and it seems really good except for two important
> comments:
> 1. The Archive and ArchiveEntry  should be refactored to be under 
> org.eclipse.dltk.core as it is part of the API, (it should not be part of the
> internal package and thus the .api file can be removed)
> 
> 2. from org.eclipse.dltk.core we should not refer to org.eclipse.ui.ide so we
> need to move the TarFile classes from the core plugin. if some extension will
> need it they will probably use extend it in their plugin.
> 
> contributed by zhaozhongwei.
> 

it works for me.and i have run all tests.there are 15 failures,i do not why.it seems with less relation what i have done.for example hightling todo,ruby launching and so on.


i have copyed the references to DLTK and i will  refactor the internal classses out:)
Comment 5 Zhongwei Zhao CLA 2009-07-16 23:08:08 EDT
Created attachment 141840 [details]
patch for supporting non-zip archive in DLTK
Comment 6 Alex Panchenko CLA 2009-07-17 00:59:52 EDT
I strongly believe we should not copy Tar and other archive implementations into DLTK.

It would be better to ask platform team to move the appropriate code from org.eclipse.ui.internal.wizards.datatransfer into non-UI plugins and make it public API.

Btw, tar support is also available in the org.eclipse.rse.services.clientserver.archiveutils - why copy it into each project?