From 0e4d5df279b8c92255af38579cdc15a545766a21 Mon Sep 17 00:00:00 2001
From: Eike Stepper
Date: Tue, 10 Jan 2012 15:52:23 +0100
Subject: [367905] [CDO] Allow Adapters to be notified during loading
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367905
---
plugins/org.eclipse.emf.cdo.doc/build.xml | 6 +
.../html/programmers/client/Architecture.html | 4 +-
.../html/programmers/client/ViewProviders.html | 190 +++++++++++++++++++++
.../html/programmers/client/index.html | 4 +
.../html/programmers/index.html | 4 +
.../html/programmers/server/index.html | 4 +-
.../cdo/doc/programmers/client/ViewProviders.java | 146 ++++++++++++++++
plugins/org.eclipse.emf.cdo.doc/toc.html | 1 +
plugins/org.eclipse.emf.cdo.doc/toc.xml | 1 +
plugins/org.eclipse.emf.cdo.releng.help/build.xml | 6 +
plugins/org.eclipse.emf.cdo.releng/help/toc.html | 1 +
plugins/org.eclipse.net4j.db.doc/build.xml | 6 +
plugins/org.eclipse.net4j.doc/build.xml | 6 +
plugins/org.eclipse.net4j.util.doc/build.xml | 6 +
14 files changed, 381 insertions(+), 4 deletions(-)
create mode 100644 plugins/org.eclipse.emf.cdo.doc/html/programmers/client/ViewProviders.html
create mode 100644 plugins/org.eclipse.emf.cdo.doc/src/org/eclipse/emf/cdo/doc/programmers/client/ViewProviders.java
diff --git a/plugins/org.eclipse.emf.cdo.doc/build.xml b/plugins/org.eclipse.emf.cdo.doc/build.xml
index 7447d450ca..973fa58e87 100644
--- a/plugins/org.eclipse.emf.cdo.doc/build.xml
+++ b/plugins/org.eclipse.emf.cdo.doc/build.xml
@@ -53,6 +53,8 @@
classpathref="javadoc.classpath" />
@@ -60,7 +60,7 @@ function windowTitle()
+
- Understanding the Architecture of a Client Application
+
View Providers |
+ + |
+ A view provider
allows clients to inject custom logic into the resource factory
mechansim, capable of handling the whole session
and view
+ instantiation process. This permits to obtain resources
through the resource set
+ API transparently, without any prior CDO client API code. The view provider automatically kicks in the middle of the
+ ResourceSet.getResource()
call, forgetting
+ about the whole openning session / openning transaction process, which happens behind the scenes.
+
+ This is quite useful when integrating CDO with EMF-based frameworks and tools that are not prepared for a CDO + scenario themselves. +
+ Table of Contents
+
1 | Implementing a View Provider | ||
2 | Contributing View Providers Programmatically | ||
3 | Contributing View Providers Using Extension Points |
+ Clients should implement the CDOViewProvider
interface, or sub class the AbstractCDOViewProvider
+ class, which provides common functionality.
+
+ The example below shows a simple implementation that opens a new session
to a local
+ server and a new transaction
on that session.
+
+ + +
+
+CDOViewProviderRegistry
.
+
++ + +
+ A client's view provider implementation can be contributed programmatically to the CDOViewProviderRegistry
,
+ as the following example suggests:
+
+ + +
++
CDOViewProvider
implementation.
+
+CDOViewProviderRegistry
.
+
++ + +
+ A specific CDOViewProvider
implementation can also be contributed using the
+ org.eclipse.emf.cdo.viewProviders
extension point. Clients specify:
+
+
class
implementing the CDOViewProvider
interface.
+ URIs
that should match with the contributed provider.
+ priority
integer value, to indicate preference over other implementations
+ matching the same regular expression. A higher value indicates a higher priority, Integer#MAX_VALUE
being
+ the maximum priority value and Integer#MIN_VALUE
the minimum.
+ diff --git a/plugins/org.eclipse.emf.cdo.doc/html/programmers/client/ViewProviders.html b/plugins/org.eclipse.emf.cdo.doc/html/programmers/client/ViewProviders.html new file mode 100644 index 0000000000..d1d2cf3a59 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.doc/html/programmers/client/ViewProviders.html @@ -0,0 +1,190 @@ + + + +
+
+ + + + + + + +
+