Community
Participate
Working Groups
The purpose of this demo is to integrate all three UI components in one demo for EclipseCon to show the new features.
Yves, I thought that XWT could give you equivalent to CSS via XAML markup for specifying visual attributes? ie. that you don't need CSS.
(In reply to comment #1) > Yves, I thought that XWT could give you equivalent to CSS via XAML markup for > specifying visual attributes? ie. that you don't need CSS. > Yes, it is possible. But it is a different grammar. For Java Develop and Web developer, CSS is well known. I think it is very important to support both. CSS is easy to setup entire application style.
I have looked at the photo demo in detail. I think we should complete it with more UI elements to reflect a real application and show XWT capabilities. The key concept of XWT is Data Presentation. To provide a clean and consistent architecture, we should use this concpet at Application (workbench) level. A workbench contains an Application data. Application Data is in fact the shared information by different ViewParts. In this photo demo, the Application Data should have two properties: selectedImage, selectedProject and projects. class ApplicationData { protected Image selectedImage; protected Project selectedProject; protected Collection<Project> projects; } The DataContext of all views (Library, ImageView and Thumbnails) is the ApplicationData. The library dins to the properties "projects", the ImageView binds to the property "selectedImage" of ApplicationData and Thumbnails binds to "selectedProject". When we select a project, the "selectedProject" gets changed in ApplicationData. The Thumbnails catches the update event and switches the project and show all images of the selected project. When we select the image this Thumbnails or a project in "Library", the property "selectedImage" gets updated. The ImageView gets the update event and display the selected image. As you can see, the entire application uses the true MVC and relies on "Data Binding" mechanism. Any idea ?
With the new Contexts work, the selection behaviour is via selection service notification change in the Context, ie. in Library.java its outputContext.set(IServiceConstants.SELECTION, event.getSelection()) This is how we drive the loose coupling selection behaviour. After that there's not much of a data model to talk about, it's just IResource. Maybe XWT could provide something in this aspect? Maybe it's my own misunderstanding, but where I thought XWT would fit in is as a declarative approach to the contents within the parts (ie. XWT starts where the modeled workbench stops). So in that sense I thought it might be used to describe say the Exif table in the photo demo.
...or maybe an editor for Exif data?
(In reply to comment #5) > ...or maybe an editor for Exif data? > It is a good start. What should we show up?
I have looked at the editor of Exif data. To develop this editor, we need to encode the Exif data in image file. It seems it is not a simple work.
We could start with an editor that just changes the in-memory representation. I don't think it is important to be able to save the changes to disk for real, after all, it's just a demo.
Created attachment 127113 [details] XWT integration There is the patch that replaces Exif viewer and and the edition support in XWT.
(In reply to comment #4) > With the new Contexts work, the selection behaviour is via selection service > notification change in the Context, ie. in Library.java its > outputContext.set(IServiceConstants.SELECTION, event.getSelection()) > > This is how we drive the loose coupling selection behaviour. > > After that there's not much of a data model to talk about, it's just IResource. > Maybe XWT could provide something in this aspect? > > Maybe it's my own misunderstanding, but where I thought XWT would fit in is as > a declarative approach to the contents within the parts (ie. XWT starts where > the modeled workbench stops). So in that sense I thought it might be used to > describe say the Exif table in the photo demo. > I think Property change notification services on the class IEclipseContext could be very helpful for the integration with all applications/frameworks on DataBinding: addPropertyChangedListener(PropertyChangedListener); removePropertyChangedListener(PropertyChangedListener); yves
I have a question about the CSS integration: https://bugs.eclipse.org/bugs/show_bug.cgi?id=264825#c10
Created attachment 127963 [details] XWT Integration support the item selection
Boris and Kevin, I wonder if I have taken a wrong direction. We have developed a solution based on Cell editors. Maybe your suggestion is to provide a Form editor in a Dialog.
I was thinking of a form based editor, yes. Sorry for not following what you have been doing - what are the steps so that I can try it out myself?
(In reply to comment #14) > I was thinking of a form based editor, yes. Sorry for not following what you > have been doing - what are the steps so that I can try it out myself? > In fact, the form based editor is more simple to make. We had spent some energy to support the Cell editor. You can take a look: 1. Get the last version of XWT from CVS 2. Get the patch attached in this bug 3. Apply it in your workspace 4. Maybe, you need to update your e4photo.product to take the org.eclipse.e4.xwt in plugin list. 5. Run you e4photo In the Exif view, you can select an item. Some fields can be edited, others are forbidden. It is specified in the following elements: <k:ExifEditableTable.cellEditors> <x:Null/> <TextCellEditor /> <TextCellEditor /> <TextCellEditor /> <TextCellEditor /> <TextCellEditor /> <x:Null/> <x:Null/> <x:Null/> <x:Null/> <x:Null/> <x:Null/> <x:Null/> <x:Null/> <x:Null/> <x:Null/> <TextCellEditor /> <TextCellEditor /> <TextCellEditor /> </k:ExifEditableTable.cellEditors> This table editor is little complicated. I don't like to specify the columnProperties and cellEditors separately as Array. It is the JFace model. I prefer the following: <k:ExifEditableTable.columns> <TableViewerColumn width="100" text="Name" property="name"/> <TableViewerColumn width="50" text="Make" property="make" editor="TextCellEditor"/> ... <k:ExifEditableTable.columns> So I think we need to develop a Form based editor to provide a simple and classic editor.
Created attachment 139276 [details] XWT integration New features are: - Master/Detail presentation pattern in the Exif View - Popup menu to call edit and show - Dialog to edit Exif
Created attachment 139277 [details] Main screen shot
Created attachment 139278 [details] Exif edition dialog
Created attachment 140691 [details] XWT Integration
Created attachment 140699 [details] XWT Integration
Created attachment 140706 [details] Refactoring update Refactoring XWTPart by introducing XWTStaticPart and XWTDynamicPart
In light of WB, VDE is not supported anymore.