Index: buildDoc.xml =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/doc/org.eclipse.gmf.runtime.doc.isv/buildDoc.xml,v retrieving revision 1.5 diff -u -r1.5 buildDoc.xml --- buildDoc.xml 12 Oct 2005 20:55:11 -0000 1.5 +++ buildDoc.xml 29 Dec 2005 17:04:31 -0000 @@ -55,7 +55,6 @@ - Index: toc-common-ext-pt.xml =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/doc/org.eclipse.gmf.runtime.doc.isv/toc-common-ext-pt.xml,v retrieving revision 1.3 diff -u -r1.3 toc-common-ext-pt.xml --- toc-common-ext-pt.xml 12 Sep 2005 21:25:58 -0000 1.3 +++ toc-common-ext-pt.xml 29 Dec 2005 17:04:31 -0000 @@ -26,7 +26,6 @@ - Index: html/reference/extension-points/index.html =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/doc/org.eclipse.gmf.runtime.doc.isv/html/reference/extension-points/index.html,v retrieving revision 1.5 diff -u -r1.5 index.html --- html/reference/extension-points/index.html 22 Dec 2005 19:13:12 -0000 1.5 +++ html/reference/extension-points/index.html 29 Dec 2005 17:04:32 -0000 @@ -38,7 +38,6 @@
  • org.eclipse.gmf.runtime.emf.core.MetaModelProviders
  • org.eclipse.gmf.runtime.emf.core.Pathmaps
  • -
  • org.eclipse.gmf.runtime.emf.core.resourcePolicies
  • org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders
  • Index: html/examples-guide/msl/modelManagementExample.html =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/doc/org.eclipse.gmf.runtime.doc.isv/html/examples-guide/msl/modelManagementExample.html,v retrieving revision 1.2 diff -u -r1.2 modelManagementExample.html --- html/examples-guide/msl/modelManagementExample.html 3 Oct 2005 20:36:37 -0000 1.2 +++ html/examples-guide/msl/modelManagementExample.html 29 Dec 2005 17:04:31 -0000 @@ -11,8 +11,8 @@

    Introduction

    This example describes the usage of model management framework within the SDK. -It demonstrates some of the model management capabilities (editing domain, validation -batch notification, semantic procedures etc.) applied to library models. +It demonstrates some of the model management capabilities (editing domain, validation, +batched notification, semantic procedures etc.) applied to library models.

    References

    @@ -35,11 +35,6 @@ This plug-in contributes the MSL menu to the MSL library editor's main menu and context menu. The menu has the following actions:
      -
    1. Control Unit: Creates a new separate resource (controlled unit) in a - logical resource. The new resource's URI is determined automatically - by an extension point
    2. -
    3. Uncontrol Unit: Absorbs a separate resource in a logical resource - into its container
    4. Edit: Allows to edit the properties of a library model element. The changes made will be committed as a whole or can be undone as a whole (demonstrates the concept of an MUndoInterval)
    5. Create Resource: Creates a library resource
    6. @@ -70,7 +65,6 @@
    7. Unified Transaction Semantics
    8. Undo/Redo management
    9. Multi-threaded access control
    10. -
    11. Management of logical resources persisted in multiple physical resources
    12. Batch notification of events
    13. Evaluation of live constraints
    14. Common read and write operations
    15. Index: html/tutorials/msl/modelManagementTutorial.html =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/doc/org.eclipse.gmf.runtime.doc.isv/html/tutorials/msl/modelManagementTutorial.html,v retrieving revision 1.3 diff -u -r1.3 modelManagementTutorial.html --- html/tutorials/msl/modelManagementTutorial.html 3 Oct 2005 20:36:37 -0000 1.3 +++ html/tutorials/msl/modelManagementTutorial.html 29 Dec 2005 17:04:32 -0000 @@ -15,8 +15,9 @@ - - + + +
      Version: 0.1Date: June 08, 2005Version: 0.2Date: Dec. 28, 2005
      @@ -28,7 +29,6 @@
    16. Introduction
    17. Creating and Using an MSL Editing Domain
    18. Making Changes to Resources
    19. -
    20. Working with Logical Resources
    21. MSL Listeners
    22. Model Validation
    23. MSL Copy and Paste Support
    24. @@ -44,7 +44,7 @@

      [back to top]

      -The Model Service Layer(MSL) provides a number of facilities to ease model management: +The Model Service Layer (MSL) provides a number of facilities to ease model management: model modification semantics, uniform resource creation and loading, uniform listener registration, batching of notifications, live validation with automatic modification abandonment, copy/paste support, automated pathmap support and additional metamodel support. @@ -203,190 +203,6 @@ editingDomain.saveResource(r1); -

      Working with Logical Resources

      - -

      [back to top]

      - -

      -The MSL's default resource implementation conforms to the -ILogicalResource -interface. This resource creates an in-memory logical view of an EMF tree -(or forest) structure that is persisted in multiple physical resources, all of -which are XMI-compliant. The central concept in the logical-to-physical mapping -of an MSL resource is the "separate" element. A separate elements is persisted -in a different, or separate, physical resource than its container. -

      -To obtain a logical resource, use the editing domain to create a resource as -described above and then get a view of it as -an ILogicalResource. -To store a model element in its own physical resource, just ask the logical -resource to separate it into a new resource on a URI of your choosing. Don't -forget to ask first whether it can be separated (the metamodel may -implement rules restricting what can be separated; see below): -

      -
      -Resource r1 = 
      -	editingDomain.createResource("file://c:/eclipse/workspace/aProject/test.rmplibrary", 
      -					RMPLibraryPackage.eINSTANCE.getLibrary());
      -ILogicalResource logical = editingDomain.asLogicalResource(r1);
      -
      -// ... fill the resource with contents
      -
      -EObject element = // ... find an element to be separated
      -
      -if (logical.canSeparate(element)) {
      -    try {
      -        logical.separate(
      -            element,
      -            URI.createURI("file://c:/eclipse/workspace/aProject/test.sub1.rmplibrary"));
      -    } catch (CannotSeparateException e) {
      -        System.out.println("Could not separate the element: " + element);
      -        e.printStackTrace();
      -    }
      -}
      -
      -editingDomain.saveResource(logical);  // or logical.save(Collections.EMPTY_MAP);
      -
      -

      -We now have one logical resource stored in two files. -

      -Note the use of the ILogicalResource MEditingDomain.asLogicalResource(Resource) -method to obtain a view of an arbitrary resource as a logical resource. This is -necessary because the editing domain might actually instantiate any resource -implementation, not necessarily a logical resource, depending on the registered -resource factories. If the resource is not actually a logical resource, then -this method creates a wrapper that provides compatibility with the logical -resource API. -

      -In the snippet above, we catch CannotSeparateException despite -being informed that the separation would be permitted because there may be -unexpected conditions that prevent the separation from succeeding (such as -incorrect file permissions). No attempt is made to actually persist the new -physical resource until the logical resource is saved, but a metamodel extension -might be proactive in checking even at this point whether certain I/O limitations -would be exceeded. -

      -To do the inverse of a separation operation, we can absorb an element -from a separate resource into the same resource as its container: -

      - -
      -if (logical.isSeparate(element)) {
      -    try {
      -        logical.absorb(element);
      -    } catch (CannotAbsorbException e) {
      -        System.out.println("Could not absorb the element: " + element);
      -        e.printStackTrace();
      -    }
      -}
      -
      -editingDomain.saveResource(logical);
      -
      -

      -Now, our logical resource is again stored in a single file. Note that the -test.sub1.rmplibrary file is not deleted, though it will be empty. -This simplifies comparing and merging changes with a source control repository. -Note also that, like separation, absorption can fail unexpectedly. -

      -How does the MSL framework determine whether an element can be separated? By -default, any element of any EMF metamodel can be separated, unless it is a -root of the logical resource or has already been separated. However, a metamodel -provider or an application may for some reason want to restrict the elements -that may be separated. This is accomplished by registering a policy on the -org.eclipse.gmf.runtime.emf.core.resourcePolicies -extension point: -

      -
      -<extension
      -      point="org.eclipse.gmf.runtime.emf.core.resourcePolicies">
      -   <policy
      -         class="org.eclipse.gmf.examples.runtime.emf.resources.LibraryResourcePolicy"
      -         nsURI="http:///com/ibm/xtools/emf/metamodel/example/pde/rmplibrary.ecore/1.0.0"/>
      -</extension>
      -
      -

      -The policy implements the -ILogicalResourcePolicy -interface, usually by extending the AbstractLogicalResourcePolicy -class. Our example allows only libraries to be separated: -

      -
      -public class LibraryResourcePolicy
      -    extends AbstractLogicalResourcePolicy {
      -
      -    public boolean canSeparate(ILogicalResource resource, EObject eObject) {
      -        return eObject instanceof Library;
      -    }
      -}
      -
      -

      -Policies can also suggest default URIs for new physical resources according to -some application-specific naming system, implement extra checks when clients -perform separations or absorptions, etc. -

      -By default, logical resources initially load only the root resource (corresponding -to the logical URI) and automatically load other resources as they are needed -by access of containment references or proxy resolution. The ILogicalResource -interface defines load options to disable incremental loading or to initially -load the entire logical resource contents. Automatic incremental loading of -separate objects from containment references requires a custom EList -that loads the necessary resources on demand. Two convenient implementations -are provided by the MSL for metamodels to use in place of the -EObjectContainmentEList and EObjectContainmentWithInverseEList -classes. However, it may be necessary for a metamodel to be deployable without -the MSL, in a "pure EMF" configuration. To address this need, the -resourcePolicies extension point allows the registration of -an EFactory that creates alternative *Impl classes -that use these special lists, to be deployed only in MSL configurations: -

      -
      -<extension
      -      point="org.eclipse.gmf.runtime.emf.core.resourcePolicies">
      -   <efactory
      -          class="org.eclipse.gmf.examples.runtime.emf.resources.LoadingRMPLibraryFactoryImpl"
      -          nsURI="http:///com/ibm/xtools/emf/metamodel/example/pde/rmplibrary.ecore/1.0.0"/>
      -</extension>
      -
      -

      -The MSL framework will use this factory instead of the default when loading -a logical resource; it does not need to be used by clients to create new objects. -In our example, only libraries can be separated and only libraries can contain -other libraries, so our factory simply creates a specialization of the default -LibraryImpl class: -

      -
      -public class LoadingRMPLibraryFactoryImpl
      -    extends RMPLibraryFactoryImpl {
      -
      -    public Library createLibrary() {
      -        return new LoadingLibraryImpl();
      -    }
      -	
      -    public EPackage getEPackage() {
      -        return RMPLibraryPackage.eINSTANCE;
      -    }
      -}
      -
      -class LoadingLibraryImpl
      -    extends LibraryImpl {
      -
      -    public LoadingLibraryImpl() {
      -        super();
      -
      -        // use the custom containment-with-inverse list to perform automatic
      -        //   loading of contained elements in this feature.  This pre-empts
      -        //   the superclass's lazy initialization of this list
      -        branches = new EObjectContainmentWithInverseLoadingEList(
      -            Library.class, this, RMPLibraryPackage.LIBRARY__BRANCHES,
      -            RMPLibraryPackage.LIBRARY__PARENT_BRANCH);
      -    }
      -}
      -
      -

      -Note how we only concern ourselves here with overriding the implementation of -those features that will be able to contain separate elements. -

      -

      MSL Listeners

      [back to top]

      @@ -755,8 +571,6 @@
    25. Registered the MSL resource factory for the .rmplibrary file extension
    26. Made changes to MSL resources using an undo interval and a write action
    27. Undid and redid the changes made during an undo interval
    28. -
    29. Created logical resources consisting of multiple files
    30. -
    31. Customized the management of logical resources for library models
    32. Registerd an MSL listener that informed us whenever a resource was dirtied
    33. Learned how live validation can be used to enforce resource integrity during write actions
    34. Learned how to perform batch validation when using MSL
    35. Index: html/howto/RMP_MSL_HowToDoc.html =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/doc/org.eclipse.gmf.runtime.doc.isv/html/howto/RMP_MSL_HowToDoc.html,v retrieving revision 1.3 diff -u -r1.3 RMP_MSL_HowToDoc.html --- html/howto/RMP_MSL_HowToDoc.html 3 Oct 2005 20:36:37 -0000 1.3 +++ html/howto/RMP_MSL_HowToDoc.html 29 Dec 2005 17:04:32 -0000 @@ -276,7 +276,6 @@
    36. Unified Transaction Semantics
    37. Undo/Redo management
    38. Multi-threaded access control
    39. -
    40. Logical or composite resources
    41. Batch notification of events
    42. Evaluation of live constraints
    43. Common read and write operations
    44. @@ -305,13 +304,6 @@ of all concrete commands that perform model operations. Clients must provide a definition of the doExecute() method to perform some operation. All model commands have an associated undo interval, through which they can be undone or redone. -
    45. Logical resource support: The extension point org.eclipse.gmf.runtime.emf.core.resourcePolicies is defined for -EMF meta-model providers to provide policies that customize the resource structure for their models. The ILogicalResource -interface provides a logical view in memory of a tree structure that is persisted in multiple physical resources. -Metamodel-specific customizations are provided as ILogicalResourcePolicy implementations that define -the locations in a logical structure where boundaries in the physical structure are permitted and provide automatic -naming of physical resources. EFactory implementations registered on this extension point provide support -for incremental loading of logical resources.
    46. Path map support: The extension point org.eclipse.gmf.runtime.emf.core.Pathmaps is defined for path map variables. Path map variables allow for portability of URIs, similar to Eclipse's core path variables. The actual location indicated by a URI depends on the run-time binding of the path variable. Thus, different environments can work with the @@ -338,8 +330,7 @@
      • EventTypes.CREATE, EventTypes.DESTROY
      • EventTypes.IMPORT, EventTypes.EXPORT
      • -
      • EventTypes.UNRESOLVE
      • -
      • EventTypes.SEPARATE, EventTypes.ABSORB, EventTypes.LOAD
    47. +
    48. EventTypes.UNRESOLVE
    49. Meta-model Support: The extension point org.eclipse.gmf.runtime.emf.core. MetaModelProviders allows clients to provide meta-model support services. Providers implement the interface IMetamodelSupportProvider. The implementation of the interface method getMetamodelSupport returns the IMetamodelSupport object.