Re: [nebula-dev] NatTable and Eclipse RAP
I woulk like tell you about 3 things :
* NatTable with XDocReport
* NatTable with Nebula Pagination Control
* NatTable with RAP
1) NatTable with XDocReport
I have noticed that you have an OOXML Excel exporter. I think it should be cool if you have a docx, odt exporter too. So I would like tell you about our XDocReport
project where the idea is to design your docx/odt report with MS Word or OpenOffice where you type some fields to replace, set loop, condition with Freemarker or Velocity and you merge it with Java model to generate report. So my idea is to use the NatTable Java model in a docx or odt and generate docx/odt export. So instead of coding your report with Java code, you can use docx/odt template and customize it as you wish. XDocReport will support too excel (when, I don't know for the moment) and you could add XDocReport excel exporter too.
Hope you will understand my idea.
If you understand, what do you think about that?
2) NatTable with Nebula Pagination Control
I have created http://angelozerr.wordpress.com/2012/01/06/nebula_pagination/
an dhope this project will be a part of Nebula.
This control is very generic and I think we could use it to manage pagination with NatTable.
What do you think about that?
3) NatTable with RAP
I have testes quickly if NatTable works on RAP context and the answer is
no. Perhaps it works for some simple feature (not tested) but when you
wish try Component in RAP context, the first test is to try if the
Component compile with RAP classes. The test is very simple. Create you a
Target Platform with RAP (see attached nattable-rap.target) and set the
Target Platform. You will see several compilation problems (see 3.1)
Compilation Problem )
3.1) Compilation Problem
In RAP those classes doesn't exists:
* org.eclipse.swt.dnd.Clipboard (see CopyDataToClipboardSerializer)
* Control#addPaintListener/removePaintListener doesn't exist (see ControlDecorationProvider)
* org.eclipse.swt.widgets.FileDialog (see FileOutputStreamProvider)
* GC#setClipping doesn't exists (see CompositeFreezeLayer, TextPainter, VerticalTextPainter)
* IDialogConstants.CANCEL_LABEL doesn't exists (see CreateColumnGroupDialog, CompositeLayer, SearchDialog)
* org.eclipse.swt.graphics.Pattern doesnt exist (see BackgroundImagePainter, GridLayerPrinter)
* GC(Image image) doesnt exsist (see GraphicsUtils, ColorPicker, CellDragMode)
* SWT.LINE_CUSTOM, GC.setLineDash, GC.setLineStyle doesnt exist (see SelectionLayerPainter)
* new Image(Displa, Rectangle )doesn't exist (see ColorPicker)
* StyledText doesnt exist (see SeparatorPanel) . I believe that it exists a SeparatorPanel for RAP but just in READ-ONLY mode.
* SWT.LINE_SOLID, SWT.LINE_DASHDOTDOT, SWT.LINE_DASHDOT, SWT.LINE_DOT, SWT.LINE_SOLID, SWT.SOLID doesnt exist (see BorderStyle)
* Table#addMouseMoveListener doesnt exists (see ModeSupport)
* ScrollBar.setIncrement doesnt exists (see HorizontalScrollBarHandler, VerticalScrollBarHandler)
* ScrollBar.setPageIncrement doesnt exist (see ScrollBarHandlerTemplate)
3.2) Resolution problem = Single Sourcing.
To resolve compilation problem you have 2 choices :
* copy/paste code of NatTable to build a new bunlde (ex: net.sourceforge.nattable.core.rap) and comment the code where there is compilation problem. The RAP workspace is done like this.
Problem with that is that you must maintain 2 projects.
* resolve problem with Java Reflection (in your code you can do (if !SWT.getPlatform("rap") //type your RCP code here with Java reflection (dont use table.addMouseMoveListener , but Method method = Table.getClass().getMethod("addMouseMoveListener ",...
For FileDialog resolution you must use incubator RAP :
add that in your TP :
<location includeAllPlatforms="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rap.incubator.feature.feature.group" version="220.127.116.11108091246"/>
The problem is import package used. You have splitted package problem, because org.eclipse.swt.widgets.FileDialog comes from a some bundle and org.eclipse.swt.widgets.* is exported into the RAP Workspace bundle. So you must use Required-Bundle with optionnal instead of using import org.eclipse.swt.widgets
Hope those information will help you to support RAP with NatTable.
Le 13 janvier 2012 17:50, Wim Jongman <wim.jongman@xxxxxxxxx>
a écrit :
Did you try to run Nattable in a RAP environment? Are you willing to investigate this? It should/could work because RAP also implements the GC.
On Fri, Jan 13, 2012 at 5:34 PM, Edwin Park <esp@xxxxxxxxxx>
We haven't been planning on RAP support, but if there's interest in
this it is certainly something we will consider. I personally don't
have much experience with RAP. Are there others who can give guidance
on what is necessary to provide compatibility?
On Fri, Jan 13, 2012 at 4:14 AM, Stephan Leicht
> I just saw in the latest Eclipse Project Update the NatTable project
> proposal. Will there be a RAP implementation of this new table?
> Thanks and greetings
> Stephan Leicht
> BSI Business Systems Integration AG
> Täfernstrasse 16a, CH-5405 Baden
> T +41 56 484 19 47
> nebula-dev mailing list
nebula-dev mailing list
nebula-dev mailing list
Description: Binary data