This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 263720 - e4 Demo with CSS, XWT and modelled workbench
Summary: e4 Demo with CSS, XWT and modelled workbench
Status: CLOSED WONTFIX
Alias: None
Product: XWT
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-04 19:33 EST by Yves YANG CLA
Modified: 2013-01-24 15:32 EST (History)
5 users (show)

See Also:


Attachments
XWT integration (805 bytes, patch)
2009-03-01 14:49 EST, Yves YANG CLA
no flags Details | Diff
XWT Integration (16.73 KB, patch)
2009-03-08 16:38 EDT, Yves YANG CLA
no flags Details | Diff
XWT integration (36.42 KB, patch)
2009-06-16 07:23 EDT, Yves YANG CLA
no flags Details | Diff
Main screen shot (417.27 KB, image/png)
2009-06-16 07:27 EDT, Yves YANG CLA
no flags Details
Exif edition dialog (140.61 KB, image/png)
2009-06-16 07:28 EDT, Yves YANG CLA
no flags Details
XWT Integration (36.69 KB, patch)
2009-07-02 09:08 EDT, Yves YANG CLA
no flags Details | Diff
XWT Integration (36.70 KB, patch)
2009-07-02 10:31 EDT, Yves YANG CLA
no flags Details | Diff
Refactoring update (36.64 KB, patch)
2009-07-02 13:11 EDT, Yves YANG CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yves YANG CLA 2009-02-04 19:33:36 EST
The purpose of this demo is to integrate all three UI components in one demo for EclipseCon to show the new features.
Comment 1 Kevin McGuire CLA 2009-02-04 20:53:45 EST
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.
Comment 2 Yves YANG CLA 2009-02-04 21:29:09 EST
 (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. 
Comment 3 Yves YANG CLA 2009-02-04 21:31:14 EST
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 ?
Comment 4 Kevin McGuire CLA 2009-02-04 22:28:15 EST
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.
Comment 5 Boris Bokowski CLA 2009-02-04 22:39:16 EST
...or maybe an editor for Exif data?
Comment 6 Yves YANG CLA 2009-02-06 16:40:47 EST
(In reply to comment #5)
> ...or maybe an editor for Exif data?
> 
It is a good start. What should we show up?
Comment 7 Yves YANG CLA 2009-02-07 17:03:08 EST
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.
Comment 8 Boris Bokowski CLA 2009-02-09 22:02:35 EST
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.
Comment 9 Yves YANG CLA 2009-03-01 14:49:27 EST
Created attachment 127113 [details]
XWT integration

There is the patch that replaces Exif viewer and and the edition support in XWT.
Comment 10 Yves YANG CLA 2009-03-01 15:16:58 EST
(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
Comment 11 Yves YANG CLA 2009-03-08 16:22:39 EDT
I have a question about the CSS integration:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264825#c10
Comment 12 Yves YANG CLA 2009-03-08 16:38:07 EDT
Created attachment 127963 [details]
XWT Integration

support the item selection
Comment 13 Yves YANG CLA 2009-03-10 11:51:05 EDT
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.  
Comment 14 Boris Bokowski CLA 2009-03-10 16:14:21 EDT
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?
Comment 15 Yves YANG CLA 2009-03-10 19:18:08 EDT
(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.
Comment 16 Yves YANG CLA 2009-06-16 07:23:19 EDT
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
Comment 17 Yves YANG CLA 2009-06-16 07:27:01 EDT
Created attachment 139277 [details]
Main screen shot
Comment 18 Yves YANG CLA 2009-06-16 07:28:10 EDT
Created attachment 139278 [details]
Exif edition dialog
Comment 19 Yves YANG CLA 2009-07-02 09:08:22 EDT
Created attachment 140691 [details]
XWT Integration
Comment 20 Yves YANG CLA 2009-07-02 10:31:42 EDT
Created attachment 140699 [details]
XWT Integration
Comment 21 Yves YANG CLA 2009-07-02 13:11:05 EDT
Created attachment 140706 [details]
Refactoring update

Refactoring XWTPart by introducing XWTStaticPart and XWTDynamicPart
Comment 22 Yves YANG CLA 2012-04-13 19:34:22 EDT
In light of WB, VDE is not supported anymore.