Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster dev » Non Java projects Proposal
Non Java projects Proposal [message #22210] Mon, 21 July 2008 14:44 Go to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Hi everyone,

As you suggested Thomas I'm back on the forum. Our exchanges can be useful to everyone.
So let me sum up what happened the past days.

I wrote this proposal : http://wiki.eclipse.org/Non_Java_projects_Proposal and implemented it.

The *fetcher* actor depended on third-party library (activation.jar, tar.jar and bzip2.jar). Thomas suggested to use the ant plugin which provides those jars - what I did.

Thomas proposed me to extend the code Expander in org.eclipse.buckminster.ant.materializer as there's already a TarExpander and a TGZExpander, I could add the TBZ2Expander and propose them as extension points.

I can do this but the classes I already wrote to uncompress streams have added functionalities : they can flatten the hierarchy and filter the archive content. This would slightly modify the IExpander interface from :
public interface IExpander
{
void expand(InputStream input, File finalLocation, IProgressMonitor monitor) throws IOException, CoreException;
}

to something like

public interface IExpander
{
void expand(InputStream input, File finalLocation, IProgressMonitor monitor) throws IOException, CoreException;
void setFlattenHierarchy(boolean flatten);
void setFilter(IArchiveFilter filter);
}

IArchiveFilter is another interface used to configure the filtering. Something like
public interface IArchiveFilter
{
void addIncludeFilter(String regex);
void addExcludeFilter(String regex);
}

If no one is against this proposal I'll implement the TBZ2Expander in org.eclipse.buckminster.ant.materializer and add an extension point for it.

Regards,
Guillaume
Re: Non Java projects Proposal [message #22582 is a reply to message #22210] Mon, 21 July 2008 18:43 Go to previous messageGo to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Instead of defining yet another interface (IArchiveFilter), I propose
this definition

public interface IExpander
{
void expand(InputStream input, File finalLocation, IProgressMonitor
monitor) throws IOException, CoreException;
void setFlattenHierarchy(boolean flatten);
void setFileFilter(java.io.FileFilter filter);
}

FileFilter is a standard Java interface that can do the job.
http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.h tml

Regards,
Guillaume

Guillaume CHATELET wrote :
> Hi everyone,
>
> As you suggested Thomas I'm back on the forum. Our exchanges can be
> useful to everyone.
> So let me sum up what happened the past days.
>
> I wrote this proposal :
> http://wiki.eclipse.org/Non_Java_projects_Proposal and implemented it.
>
> The *fetcher* actor depended on third-party library (activation.jar,
> tar.jar and bzip2.jar). Thomas suggested to use the ant plugin which
> provides those jars - what I did.
>
> Thomas proposed me to extend the code Expander in
> org.eclipse.buckminster.ant.materializer as there's already a
> TarExpander and a TGZExpander, I could add the TBZ2Expander and propose
> them as extension points.
>
> I can do this but the classes I already wrote to uncompress streams have
> added functionalities : they can flatten the hierarchy and filter the
> archive content. This would slightly modify the IExpander interface from :
> public interface IExpander
> {
> void expand(InputStream input, File finalLocation, IProgressMonitor
> monitor) throws IOException, CoreException;
> }
>
> to something like
>
> public interface IExpander
> {
> void expand(InputStream input, File finalLocation, IProgressMonitor
> monitor) throws IOException, CoreException;
> void setFlattenHierarchy(boolean flatten);
> void setFilter(IArchiveFilter filter);
> }
>
> IArchiveFilter is another interface used to configure the filtering.
> Something like
> public interface IArchiveFilter
> {
> void addIncludeFilter(String regex);
> void addExcludeFilter(String regex);
> }
>
> If no one is against this proposal I'll implement the TBZ2Expander in
> org.eclipse.buckminster.ant.materializer and add an extension point for it.
>
> Regards,
> Guillaume
Re: Non Java projects Proposal [message #22759 is a reply to message #22582] Mon, 21 July 2008 19:55 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Guillaume CHATELET wrote:
> Instead of defining yet another interface (IArchiveFilter), I propose
> this definition
>
> public interface IExpander
> {
> void expand(InputStream input, File finalLocation, IProgressMonitor
> monitor) throws IOException, CoreException;
> void setFlattenHierarchy(boolean flatten);
> void setFileFilter(java.io.FileFilter filter);
> }
>
> FileFilter is a standard Java interface that can do the job.
> http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.h tml
>
I assume that this FileFilter will be fed with path names relative to
the archive root?

- thomas
Re: Non Java projects Proposal [message #22802 is a reply to message #22759] Mon, 21 July 2008 20:01 Go to previous messageGo to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Thomas Hallgren a écrit :
> Guillaume CHATELET wrote:
>> Instead of defining yet another interface (IArchiveFilter), I propose
>> this definition
>>
>> public interface IExpander
>> {
>> void expand(InputStream input, File finalLocation, IProgressMonitor
>> monitor) throws IOException, CoreException;
>> void setFlattenHierarchy(boolean flatten);
>> void setFileFilter(java.io.FileFilter filter);
>> }
>>
>> FileFilter is a standard Java interface that can do the job.
>> http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.h tml
>>
> I assume that this FileFilter will be fed with path names relative to
> the archive root?
>
> - thomas

You're right. I presume FileFilter's interface is sufficient to provide
include and exclude strategy on both directories and files.

Guillaume
Re: Non Java projects Proposal [message #22844 is a reply to message #22802] Tue, 22 July 2008 09:10 Go to previous messageGo to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
I've finished implementing the changes :
- new project : org.eclipse.buckminster.executor
- new project : org.eclipse.buckminster.fetcher

Small modifications to projects :
org.eclipse.buckminster.download
org.eclipse.buckminster.core
org.eclipse.buckminster.ant

The types .tar.bz2,.tbz2,.tb2,.tbz are now handled via the class org.eclipse.buckminster.ant.materializer.TBZ2Expander using extension point org.eclipse.buckminster.download.expanders.

My fetcher project is using the registered expanders to unzip, untar, untargz, and untarbz2 archives. Maybe we could add a 7z expander in the future as a third party feature (LGPL license).

How can I contribute my work to Buckminster ?

Regards,
Guillaume

Guillaume CHATELET wrote:
> Thomas Hallgren a écrit :
>> Guillaume CHATELET wrote:
>>> Instead of defining yet another interface (IArchiveFilter), I propose
>>> this definition
>>>
>>> public interface IExpander
>>> {
>>> void expand(InputStream input, File finalLocation, IProgressMonitor
>>> monitor) throws IOException, CoreException;
>>> void setFlattenHierarchy(boolean flatten);
>>> void setFileFilter(java.io.FileFilter filter);
>>> }
>>>
>>> FileFilter is a standard Java interface that can do the job.
>>> http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.h tml
>>>
>> I assume that this FileFilter will be fed with path names relative to
>> the archive root?
>>
>> - thomas
>
> You're right. I presume FileFilter's interface is sufficient to provide
> include and exclude strategy on both directories and files.
>
> Guillaume
Re: Non Java projects Proposal [message #22887 is a reply to message #22844] Tue, 22 July 2008 12:47 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Guillaume,
First of all. Great work! I really look forward to incorporating this
into Buckminster.

The best way for you to do that is to enter a Bugzilla enhancement
request and add the code as attachments (patches applicable to trunk
where possible). In the text, you should include a paragraph similar to
this:

"I hereby declare that I have authored the code, that I have the rights
to donate the code to Eclipse, and that I am submitting the code for
inclusion in future Eclipse releases under the Eclipse Public License"

Kind Regards,
Thomas Hallgren



Guillaume CHATELET wrote:
> I've finished implementing the changes :
> - new project : org.eclipse.buckminster.executor
> - new project : org.eclipse.buckminster.fetcher
>
> Small modifications to projects :
> org.eclipse.buckminster.download
> org.eclipse.buckminster.core
> org.eclipse.buckminster.ant
>
> The types .tar.bz2,.tbz2,.tb2,.tbz are now handled via the class
> org.eclipse.buckminster.ant.materializer.TBZ2Expander using extension
> point org.eclipse.buckminster.download.expanders.
>
> My fetcher project is using the registered expanders to unzip, untar,
> untargz, and untarbz2 archives. Maybe we could add a 7z expander in the
> future as a third party feature (LGPL license).
>
> How can I contribute my work to Buckminster ?
>
> Regards,
> Guillaume
>
> Guillaume CHATELET wrote:
>> Thomas Hallgren a écrit :
>>> Guillaume CHATELET wrote:
>>>> Instead of defining yet another interface (IArchiveFilter), I
>>>> propose this definition
>>>>
>>>> public interface IExpander
>>>> {
>>>> void expand(InputStream input, File finalLocation,
>>>> IProgressMonitor monitor) throws IOException, CoreException;
>>>> void setFlattenHierarchy(boolean flatten);
>>>> void setFileFilter(java.io.FileFilter filter);
>>>> }
>>>>
>>>> FileFilter is a standard Java interface that can do the job.
>>>> http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.h tml
>>>>
>>> I assume that this FileFilter will be fed with path names relative to
>>> the archive root?
>>>
>>> - thomas
>>
>> You're right. I presume FileFilter's interface is sufficient to
>> provide include and exclude strategy on both directories and files.
>>
>> Guillaume
Re: Non Java projects Proposal [message #22931 is a reply to message #22887] Tue, 22 July 2008 13:14 Go to previous message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Enhancement submitted !
https://bugs.eclipse.org/bugs/show_bug.cgi?id=241657

- Guillaume

Thomas Hallgren wrote:
> Hi Guillaume,
> First of all. Great work! I really look forward to incorporating this
> into Buckminster.
>
> The best way for you to do that is to enter a Bugzilla enhancement
> request and add the code as attachments (patches applicable to trunk
> where possible). In the text, you should include a paragraph similar to
> this:
>
> "I hereby declare that I have authored the code, that I have the rights
> to donate the code to Eclipse, and that I am submitting the code for
> inclusion in future Eclipse releases under the Eclipse Public License"
>
> Kind Regards,
> Thomas Hallgren
>
>
>
> Guillaume CHATELET wrote:
>> I've finished implementing the changes :
>> - new project : org.eclipse.buckminster.executor
>> - new project : org.eclipse.buckminster.fetcher
>>
>> Small modifications to projects :
>> org.eclipse.buckminster.download
>> org.eclipse.buckminster.core
>> org.eclipse.buckminster.ant
>>
>> The types .tar.bz2,.tbz2,.tb2,.tbz are now handled via the class
>> org.eclipse.buckminster.ant.materializer.TBZ2Expander using extension
>> point org.eclipse.buckminster.download.expanders.
>>
>> My fetcher project is using the registered expanders to unzip, untar,
>> untargz, and untarbz2 archives. Maybe we could add a 7z expander in
>> the future as a third party feature (LGPL license).
>>
>> How can I contribute my work to Buckminster ?
>>
>> Regards,
>> Guillaume
>>
>> Guillaume CHATELET wrote:
>>> Thomas Hallgren a écrit :
>>>> Guillaume CHATELET wrote:
>>>>> Instead of defining yet another interface (IArchiveFilter), I
>>>>> propose this definition
>>>>>
>>>>> public interface IExpander
>>>>> {
>>>>> void expand(InputStream input, File finalLocation,
>>>>> IProgressMonitor monitor) throws IOException, CoreException;
>>>>> void setFlattenHierarchy(boolean flatten);
>>>>> void setFileFilter(java.io.FileFilter filter);
>>>>> }
>>>>>
>>>>> FileFilter is a standard Java interface that can do the job.
>>>>> http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileFilter.h tml
>>>>>
>>>> I assume that this FileFilter will be fed with path names relative
>>>> to the archive root?
>>>>
>>>> - thomas
>>>
>>> You're right. I presume FileFilter's interface is sufficient to
>>> provide include and exclude strategy on both directories and files.
>>>
>>> Guillaume
Previous Topic:Problem with features on a buckminster created updatesite
Next Topic:Re: [buckminster-dev] Hello XML World Example error
Goto Forum:
  


Current Time: Thu Dec 26 16:23:44 GMT 2024

Powered by FUDForum. Page generated in 0.03820 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top