Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367064

Summary: Contribution for Pagination control
Product: z_Archived Reporter: Angelo ZERR <azerr>
Component: NebulaAssignee: Wim Jongman <wim.jongman>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aymen.laabidi, azerr, elias, mistria, pascal.leclercq, ronald.so, wim.jongman
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
5 Plug-Ins for Nebula Pagination + odt documentation
none
Nebula Pagination without Spring Data
none
Nebula Pagination with Spring Data
none
Nebula Pagination without Spring Data - BeanUtils comments
none
Nebula Pagination with Spring Data - BeanUtils comments
none
pagination control+example+snippets+feature+tests Plug-In none

Description Angelo ZERR CLA 2011-12-19 06:34:15 EST
Created attachment 208542 [details]
5 Plug-Ins for Nebula Pagination + odt documentation

Hi Nebula Team,

After this discussion http://dev.eclipse.org/mhonarc/lists/nebula-dev/msg01605.html we wish contribute to Nebula Pagination to manage pagination in a SWT Table for instance (or another thing) with Eclipse RCP and RAP. You can find secreenshot, explanation about Nebula Pagination in the NebulaPagination.odt attached in this zip.

Nebula Pagination contribution provides 5 Plug-Ins : 

* org.eclipse.nebula.widgets.pagination : Eclipse Nebula Pagination which provides abstract class to manage pagination and implementation of thoses classes with Spring Data pagination structure.
 * org.eclipse.nebula.widgets.pagination.example : sample with table pagination  by using Nebula Pagination.
 * org.eclipse.nebula.widgets.pagination.tests : tests of  Eclipse Nebula Pagination.
 * org.springframework.data.domain-only : Spring Data  with just Pagination structure.
 * org.springframework.data.domain.collections : Spring Data domain Collections support.

Hope you will like it.

Regards Angelo
Comment 1 Mickael Istria CLA 2011-12-19 06:45:26 EST
The examples are very promising: this powerful widget seems easy to use!

The dependance to SpringData will make contribution a bit more complex:
1. Open a CQ to request usage of SpringData
2. Once approved, make SpringData part of Orbit
3. Then open a CQ for the contribution
4. Once approved, check in.
Comment 2 Angelo ZERR CLA 2011-12-19 06:55:27 EST
(In reply to comment #1)
> The examples are very promising: this powerful widget seems easy to use!
> 
> The dependance to SpringData will make contribution a bit more complex:
> 1. Open a CQ to request usage of SpringData
> 2. Once approved, make SpringData part of Orbit
> 3. Then open a CQ for the contribution
> 4. Once approved, check in.

Hi Mickael 

Thank a lot to have taking time to see Pagination control. I hav etried to explain the problem with Spring Data : the "official" bundles of Spring Data requires Spring Core, AOP etc. So I have created org.springframework.data.domain-only with just the sources of Pagination structures. More Spring Data doens't support Java list in memory (to create a Page from Pageable by using Sort and java List), so I have created org.springframework.data.domain.collections

I would like call about 2 two projects org.springframework.data.domain-only and org.springframework.data.domain.collections to teh Spring Data Team but I think if Nebula accept the Nebula Pagination I think I will have more luck that they accept those 2 bundles.

Regards Angelo
Comment 3 Mickael Istria CLA 2011-12-19 07:08:08 EST
The Eclipse IP policy makes that it is impossible to check-in code that depends on non-Eclipse.org code without a CQ.
So we are in a kind of deadlock.

Some other Eclipse.org - mainly Virgo [1] - have done the necessary to be able to contribute code that uses Spring [2]. We could probably try that for Nebula too.

Waiting for the Spring team to perform this refactoring would delay the contribution of this widgets of several monthes. Not cool.
I advise you to first identify which Spring "official" bundles you need, and then we could request the CQ to get Nebula authorized to use and ship these bundles along with your widgets.

[1] http://www.eclipse.org/virgo/
[2] https://dev.eclipse.org/ipzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=spring&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Importance&field0-0-0=noop&type0-0-0=noop&value0-0-0=
Comment 4 Angelo ZERR CLA 2011-12-19 08:20:57 EST
(In reply to comment #3)
> The Eclipse IP policy makes that it is impossible to check-in code that depends
> on non-Eclipse.org code without a CQ.
> So we are in a kind of deadlock.
> 
> Some other Eclipse.org - mainly Virgo [1] - have done the necessary to be able
> to contribute code that uses Spring [2]. We could probably try that for Nebula
> too.
> 
> Waiting for the Spring team to perform this refactoring would delay the
> contribution of this widgets of several monthes. Not cool.
> I advise you to first identify which Spring "official" bundles you need, and
> then we could request the CQ to get Nebula authorized to use and ship these
> bundles along with your widgets.

I agree with you (even if it's not a refactoring). I have downloaded Virgo Kernel and it seems that Spring Data is not included. So I suppose I must open a CQ to request usage of SpringData.

For the org.springframework.data.domain.collections (it's my code) we could rename with Nebula packagen if needed by waiting for Spring Data choice.

Regards Angelo

> 
> [1] http://www.eclipse.org/virgo/
> [2]
> https://dev.eclipse.org/ipzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=spring&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Importance&field0-0-0=noop&type0-0-0=noop&value0-0-0=
Comment 5 Angelo ZERR CLA 2011-12-19 08:27:55 EST
Ok I have created an Opn CQ for Spring Data Commons at https://bugs.eclipse.org/bugs/show_bug.cgi?id=367072

Regards Angelo

(In reply to comment #4)
> (In reply to comment #3)
> > The Eclipse IP policy makes that it is impossible to check-in code that depends
> > on non-Eclipse.org code without a CQ.
> > So we are in a kind of deadlock.
> > 
> > Some other Eclipse.org - mainly Virgo [1] - have done the necessary to be able
> > to contribute code that uses Spring [2]. We could probably try that for Nebula
> > too.
> > 
> > Waiting for the Spring team to perform this refactoring would delay the
> > contribution of this widgets of several monthes. Not cool.
> > I advise you to first identify which Spring "official" bundles you need, and
> > then we could request the CQ to get Nebula authorized to use and ship these
> > bundles along with your widgets.
> 
> I agree with you (even if it's not a refactoring). I have downloaded Virgo
> Kernel and it seems that Spring Data is not included. So I suppose I must open
> a CQ to request usage of SpringData.
> 
> For the org.springframework.data.domain.collections (it's my code) we could
> rename with Nebula packagen if needed by waiting for Spring Data choice.
> 
> Regards Angelo
> 
> > 
> > [1] http://www.eclipse.org/virgo/
> > [2]
> > https://dev.eclipse.org/ipzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=spring&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Importance&field0-0-0=noop&type0-0-0=noop&value0-0-0=
Comment 6 Wim Jongman CLA 2011-12-19 08:31:20 EST
Angelo, is the dependency on Spring really needed for the core widget? I would like it if we could isolate only the pagination control with the MVC methods that you use WITHOUT the dependency on any framework. 

What I mean is, can people without Spring also use the widget?
Comment 7 Mickael Istria CLA 2011-12-19 08:47:56 EST
Renaming org.springframework.data.domain.collections seems necessary in that case.

+1 for Wim: is the Spring part of the code necessary? Do you think you could get rid of it by introducing something like a IPagedContentProvider, and the Spring part would just be an implementation of this class?
Comment 8 Angelo ZERR CLA 2011-12-19 09:05:53 EST
(In reply to comment #7)
> Renaming org.springframework.data.domain.collections seems necessary in that
> case.
> 
> +1 for Wim: is the Spring part of the code necessary? Do you think you could
> get rid of it by introducing something like a IPagedContentProvider, and the
> Spring part would just be an implementation of this class?

Ok I understand your idea. I will see how to manage that. I think it's important to create a default IPagedContentProvider and an imlementation with Spring Data that we can create  that in another project like org.eclipse.nebula.widgets.pagination.springdata).

I will study that.

Regards Angelo
Comment 9 Mickael Istria CLA 2011-12-19 09:35:06 EST
Maybe in order to makes things more easier to get accepted in the Eclipse repo, you could split your contribution into 2 parts and contribute them separately:
* The first one is pure-widget with code only of you own, and only Eclipse dependencies
* The second one would be an example with the Spring integration, clean enough to be consumed by other people.

What do you think?
Comment 10 Angelo ZERR CLA 2011-12-19 09:42:42 EST
(In reply to comment #9)
> Maybe in order to makes things more easier to get accepted in the Eclipse repo,
> you could split your contribution into 2 parts and contribute them separately:
> * The first one is pure-widget with code only of you own, and only Eclipse
> dependencies
> * The second one would be an example with the Spring integration, clean enough
> to be consumed by other people.
> 
> What do you think?

Yes it was my idea. My idea is to have : 

 * org.eclipse.nebula.widgets.pagination (no dependencies to Spring Data). This Plug-In will provides basic structure like Order, Sort which will look like to Spring Data.

 * org.eclipse.nebula.widgets.pagination.springdata : use Page and Pagable Spring Data structure. Very usefull if you wish to manage JPA with Spring Data.

For the sampel we will have teh same thing : 

 * org.eclipse.nebula.widgets.pagination.example
 * org.eclipse.nebula.widgets.pagination.example.springdata.

Is it your idea?
Comment 11 Mickael Istria CLA 2011-12-19 09:47:00 EST
Yep.
But I'd like to insist on the fact that things will be much easier if you try to contribute those 2 parts independently, one after the other.
Comment 12 Angelo ZERR CLA 2011-12-19 09:48:43 EST
(In reply to comment #11)
> Yep.
> But I'd like to insist on the fact that things will be much easier if you try
> to contribute those 2 parts independently, one after the other.

You mean that I must create 2 patches? Or create a new bug for Spring Data?
Comment 13 Mickael Istria CLA 2011-12-19 09:58:13 EST
Yes, I think it will make things easier.
First, Nebula people and Eclipse EMO will approve the pure-Eclipse contribution, and you'll be able to check in it, and you'll become a Nebula committer.
Then, you'll open a bug and a CQ for the Spring part, Once EMO accept this, you'll be able to commit it.
Comment 14 Angelo ZERR CLA 2011-12-19 10:00:59 EST
(In reply to comment #13)
> Yes, I think it will make things easier.
> First, Nebula people and Eclipse EMO will approve the pure-Eclipse
> contribution, and you'll be able to check in it, and you'll become a Nebula
> committer.
> Then, you'll open a bug and a CQ for the Spring part, Once EMO accept this,
> you'll be able to commit it.

Thanks Mickael for your help. I will create 2 patches as you have suggested me.

Regards Angelo
Comment 15 Angelo ZERR CLA 2011-12-20 05:43:30 EST
Created attachment 208598 [details]
Nebula Pagination without Spring Data

This Zip contains documentation in the NebulaPagination.odt 
It provides the 3 Plug-Ins (works with Nebula PageResult pagination structure and have no dependencies to Spring Data) : 

 * org.eclipse.nebula.widgets.pagination : Eclipse Nebula Pagination which provides abstract class to manage pagination and implementation of thoses classes with PageResult pagination structure. Eclipse Nebula Pagination  defines an IPageContentProvider to work with any Pagination structure (by default it works with Nebula PageResult, but you can use Spring Data Page structure if you wish (see org.eclipse.nebula.widgets.pagination.springdata)
 * org.eclipse.nebula.widgets.pagination.example : sample with table pagination  by using Nebula Pagination.
 * org.eclipse.nebula.widgets.pagination.tests : tests of  Eclipse Nebula Pagination.
Comment 16 Angelo ZERR CLA 2011-12-20 05:46:52 EST
Created attachment 208599 [details]
Nebula Pagination with Spring Data

This zip contains 4 Plug-Ins for Nebula Pagination with Spring Data:

* org.eclipse.nebula.widgets.pagination.springdata : defines an  IpageContentProvider to works with Spring Data Page, Pageable.
 * org.eclipse.nebula.widgets.pagination.example.springdata : same sample than org.eclipse.nebula.widgets.pagination.example but works with Spring Data structure.
 * org.springframework.data.domain-only : Spring Data  with just Pagination structure.
 * org.springframework.data.domain.collections : Spring Data domain Collections support.
Comment 17 Wim Jongman CLA 2011-12-20 08:27:39 EST
Nice!! Good work guys. I will ask the Nebula committers to comment on this bug.
Comment 18 Angelo ZERR CLA 2012-01-09 15:47:29 EST
(In reply to comment #17)
> Nice!! Good work guys. I will ask the Nebula committers to comment on this bug.

Hi,

Here information about my contribution for PaginationControl : 

1.  I authored 100% of the content I'm contributing
Yes except for :

1.1 org.eclipse.nebula.widgets.pagination.collections.BeanUtils (used to get value from a bean to manage sort) where I have copy/paste some piece of code from org.eclipse.core.internal.databinding.beans.BeanPropertyHelper 

=> see org.eclipse.nebula.widgets.pagination project

1.2 org.springframework.data.domain.collections.internal.BeanUtils (used to get value from a bean to manage sort) where I have copy/paste some piece of code from org.eclipse.core.internal.databinding.beans.BeanPropertyHelper 

=> see org.springframework.data.domain.collections project.

1.3 org.springframework.data.domain-only

Every classes comes from org.springframework.data.domain package fo the org.springframework.data.domain-only project comes from Spring Data Core. I have done that to have no dependencies to Spring Core, Spring AOP etc... I'm trying to speak about this problem to Spring Data guys.

But you can use Spring Data Core if you wish (but you must add Spring Core, AOP ... to test PageableTable with Spring Data).

2.  I have the rights to donate the content to Eclipse
I believe because I have already donate Eclipse code (Eclipse E4 CSS Engine and
WTP Jetty). So I suppose Yes

3.  I'm contributing it under the EPL
Yes

Regards Angelo
Comment 19 Pascal Leclercq CLA 2012-01-09 15:49:24 EST
1.  I authored 100% of the content I'm contributing
Yes, same remarks as Angelo's.

2.  I have the rights to donate the content to Eclipse
Yes

3.  I'm contributing it under the EPL
Yes

Regards Pascal
Comment 20 Angelo ZERR CLA 2012-01-18 04:33:29 EST
Created attachment 209662 [details]
Nebula Pagination without Spring Data - BeanUtils comments

Hi,

Here a new zip of Pagination Control with BeanUtils comments :

----------------------------------------------------------------------
Some pieces of code of this class comes from org.eclipse.core.internal.databinding.beans.BeanPropertyHelper
----------------------------------------------------------------------

Regards Angelo
Comment 21 Angelo ZERR CLA 2012-01-18 04:37:57 EST
Created attachment 209663 [details]
Nebula Pagination with Spring Data - BeanUtils comments

Hi,

Here a new zip of Pagination Control (with Spring Data) with BeanUtils comments :

----------------------------------------------------------------------
Some pieces of code of this class comes from
org.eclipse.core.internal.databinding.beans.BeanPropertyHelper
----------------------------------------------------------------------

Regards Angelo
Comment 22 Wim Jongman CLA 2012-01-18 09:14:35 EST
Angelo, you are cleared to check-in this feature, you can continue with the next step of the contribution guideline.

http://wiki.eclipse.org/Nebule/New_Contributions

Please ping me on the list if you have questions.
Comment 23 Ronald So CLA 2012-02-14 16:54:38 EST
Are the plugins available to the community?  Thanks!
Comment 24 Angelo ZERR CLA 2012-02-15 05:36:28 EST
Created attachment 211031 [details]
pagination control+example+snippets+feature+tests Plug-In

Hi Wim,

Here a new patch which contains the pagination control+example+snippets+feature+tests Plug-In with pom.xml.

I have do the same thing than oscilloscope project.

The example project contains PaginationExampleTab to see the demo of the pagination control. The snippets project is the same project than the old example project that I have renammed.

So I think (if you agree) that you can push it to Git https://github.com/eclipse/nebula/

Hope I have done no error with POM.

Rgards Angelo
Comment 25 Angelo ZERR CLA 2012-02-15 05:39:01 EST
(In reply to comment #23)
> Are the plugins available to the community?  Thanks!

Hi Ronald,

I hope that my new patch will be ok to push it to Git.

Regards Angelo
Comment 26 abidi aymen CLA 2012-02-15 10:50:22 EST
how can i refresh the data list of tableviewer
Comment 27 Angelo ZERR CLA 2012-02-16 05:25:53 EST
(In reply to comment #26)
> how can i refresh the data list of tableviewer

Use PageableTable#refreshPage(boolean reset)
Comment 28 Angelo ZERR CLA 2012-02-17 10:47:03 EST
(In reply to comment #23)
> Are the plugins available to the community?  Thanks!

Yes! Since today you can download it with P2 URL at http://download.eclipse.org/technology/nebula/incubation/snapshot/

Regards Angelo