Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

STP/XEF XML Framework

< STP

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.

Using XEF Framework-1.JPG


Three tier interfaces

1. Model API

This is a lowest level to access XEF Framework. This interface provides access to XMLModelFactory and XMLInstanceElement XEF model classes. Interface is designed to build and control XEF model on the low level.

XEF Model ClassDiagram.JPG

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 representation on views, dialogs, preference pages. Draft proposal rendering API is represented bellow. The IXEFFramework is rendering interface of the framework. IXEFCallback should be implemented by framework consumer to receive notifications.

XEF Render ClassDiagram-1.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, receive 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);

XML Schemas

XML Schemas for XEF Framework can be provided by different ways:

  • Explicitly as files
  • Custom Schema Catalogs
  • WTP Schema Catalog

In case of using WTP Schema Catalog it is possible to register it via extension point. After it all schemas will be automatically available in XEF Framework model.

Back to the top