Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Creating/Loading (Legacy) UML Resources
Creating/Loading (Legacy) UML Resources [message #987891] Wed, 28 November 2012 14:52
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1618
Registered: July 2009
Senior Member
I would like to bring your attention to some changes in UML2 which may
impact you if you happen to be programmatically creating/loading UML
resources; for all the gory details, see bug 389542 [1].

Juno

The UML editor in UML2 4.0.0 didn't properly handle legacy resources
because a file extension registration occluded the content type
registration for *.uml resources.

Juno SR1

In UML2 4.0.1, the problematic file extension registration was removed
from UMLUtil#init(ResourceSet), which fixed the UML editor (when loading
resources directly) but meant that creation of resources based on file
extension alone when using UMLResourcesUtil#init(ResourceSet), stopped
working. Support for indirectly-loaded legacy UML resources, however,
still depends on the fix in EMF for bug 390951 [2], scheduled for Juno SR2.

Juno SR2

Fixes in UML2 4.0.2 will affect clients that are using
UMLResourcesUtil#init(ResourceSet). The intention is to ensure that
behavior of Eclipse and standalone modes are equivalent; to do this,
only "local" registrations are done in UMLUtil#init(ResourceSet) (since
the global ones are already done by various plug-in manifests) and only
"global" registrations, including one for the *.uml file extension, are
done in UMLResourcesUtil#init(ResourceSet). The net effect being that
support for legacy resources and creation of UML resources based only on
file extension should work the same in both modes.

Basically, if you're looking to programmatically create/load UML
resources with UML2 4.0.2 (and releases thereafter), it's like this:

- if you want to work with (only new) UML resources in Eclipse, do nothing

- if you want support for legacy resources in Eclipse, call
UMLUtil#init(ResourceSet) with a resource set (since passing null is
essentially a no-op)

- if you want to work with (only new) UML resources standalone, call
UMLResourcesUtil#init(ResourceSet) with null (once)

- if you want support for legacy resources standalone, call
UMLResourcesUtil#init(ResourceSet) with a resource set


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=389542

[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=390951
Previous Topic:Empty Build Dependencies
Next Topic:Growing profile file size
Goto Forum:
  


Current Time: Thu Nov 27 16:34:50 GMT 2014

Powered by FUDForum. Page generated in 0.02249 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software