Skip to main content
Jump to: navigation, search

Difference between revisions of "STP/XEF XML Framework"

< STP
Line 9: Line 9:
 
* generation of test WS requests
 
* generation of test WS requests
 
* editing XML-based configuration, descriptors
 
* editing XML-based configuration, descriptors
* etc  
+
* administration of XML-based entities
 +
* etc
 
This proposal also will be very helpful to redesign Policy Editor regarding UI Walkthrough [[http://wiki.eclipse.org/10122008PolicyEditor Policy Editor UI Walkthrough]].
 
This proposal also will be very helpful to redesign Policy Editor regarding UI Walkthrough [[http://wiki.eclipse.org/10122008PolicyEditor Policy Editor UI Walkthrough]].
  
 
<h1>Using of XEF Framework</h1>
 
<h1>Using of XEF Framework</h1>
XEF Framework provides well defined public interface. Components and applications will use XEF Framework in different contexts and scenarios via this interface. Policy Editor can use XEF Framework directly or via XEF Editor.
+
XEF Framework provides well defined public interfaces.  
 +
Interfaces are defined for the tree following tiers:
 +
* Model (low)
 +
* Rendering (middle)
 +
* Editor (high)
 +
Components and applications will use XEF Framework in different contexts and scenarios via these interfaces.
  
 
[[Image:XEF_Framework.JPG]]
 
[[Image:XEF_Framework.JPG]]
  
  
<h1>Draft Interface Proposal</h1>
+
<h1>Three tier interfaces</h1>
Draft proposal of two interfaces is represented bellow. The IXEFFramework is public interface of framework. IXEFCallback should be implemented by framework consumer to receive notifications.
+
1. Model API
 +
 
 +
This is a lowest level to access XEF Framework. On this interface provides access to XMLModelFactory and XMLInstanceElement.
 +
 
 +
2. Rendering API
 +
 
 +
The second level API (Rendering) allows to display and process GUI representation of XML schema on any composite. This API could be used for schema representaton on views, dialogs, preference pages.
 +
Draft proposal rendering API is represented bellow. The IXEFRender is public interface of framework. IXEFCallback should be implemented by framework consumer to receive notifications.
  
 
[[Image:XEF_Framework_ClassDiagram.JPG]]
 
[[Image:XEF_Framework_ClassDiagram.JPG]]
 +
 +
3. Editor API
 +
 +
This API provides the possibility to use XEF as normal Eclipse Editor. Using extension point user can
 +
open editor, load files, recieve notifications.
 +
 +
Typical using of XEF Editor in this case is:
 +
 +
String XEF_ID = "org.eclipse.stp.ui.xef.editor.XefEditor";
 +
PolicyDetailEditorInput edInput = new PolicyDetailEditorInput(text, streamIn, project, callback);
 +
IWorkbench workbench = PlatformUI.getWorkbench();
 +
IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow();
 +
IWorkbenchPage workbenchPage = activeWindow.getActivePage();
 +
IEditorPart part = IDE.openEditor(workbenchPage, edInput, XEF_ID);
 +
 +
So XEF editor will be activated as standard Eclipse editor.
  
 
|}
 
|}

Revision as of 15:10, 24 January 2009

Proposal

The main idea of this proposal is to expose XEF editor in more generic way: as XML framework. GUI representation of XML schema is very common task, required by the number of applications and Eclipse projects. So intention is to make XEF usable not only in context of policy editor, but also for many another scenarios like:

  • representation of WSDL for WS invocation
  • generation of test WS requests
  • editing XML-based configuration, descriptors
  • administration of XML-based entities
  • etc

This proposal also will be very helpful to redesign Policy Editor regarding UI Walkthrough [Policy Editor UI Walkthrough].

Using of XEF Framework

XEF Framework provides well defined public interfaces. Interfaces are defined for the tree following tiers:

  • Model (low)
  • Rendering (middle)
  • Editor (high)

Components and applications will use XEF Framework in different contexts and scenarios via these interfaces.

XEF Framework.JPG


Three tier interfaces

1. Model API

This is a lowest level to access XEF Framework. On this interface provides access to XMLModelFactory and XMLInstanceElement.

2. Rendering API

The second level API (Rendering) allows to display and process GUI representation of XML schema on any composite. This API could be used for schema representaton on views, dialogs, preference pages. Draft proposal rendering API is represented bellow. The IXEFRender is public interface of framework. IXEFCallback should be implemented by framework consumer to receive notifications.

XEF Framework ClassDiagram.JPG

3. Editor API

This API provides the possibility to use XEF as normal Eclipse Editor. Using extension point user can open editor, load files, recieve notifications.

Typical using of XEF Editor in this case is:

String XEF_ID = "org.eclipse.stp.ui.xef.editor.XefEditor";
PolicyDetailEditorInput edInput = new PolicyDetailEditorInput(text, streamIn, project, callback);
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow();
IWorkbenchPage workbenchPage = activeWindow.getActivePage();
IEditorPart part = IDE.openEditor(workbenchPage, edInput, XEF_ID);

So XEF editor will be activated as standard Eclipse editor.

Back to the top