EMF Editor drag and drop doesn't preserve node order [message #394988] |
Sat, 13 August 2005 17:07  |
Eclipse User |
|
|
|
I have a model of an Outline defined using an XML Schema. I generate the
model, edit and editor and all behaves as expected except that if I select
a sequence of nodes (say ON2001, ON2002 and ON2003) and then drag the
nodes under another node (say ON1003) then the resulting node order under
ON1003 is ON2003, ON2002 and ON 2001. So it is reversed. I assume this is
a defect.
|
|
|
|
Re: EMF Editor drag and drop doesn't preserve node order [message #395010 is a reply to message #395008] |
Mon, 15 August 2005 12:24   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090906000006050309020501
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
I'm using EMF 2.1/Eclipse 3.1 on Mac OS X 10.4.2 with Java 1.4.2_09.
I've attached the XML schema and its include file. I simply create an
EMF project from the schema (which is in its own project with many other
schema) and generate the model, edit and editor with taking all the
defaults. When I run the application and create an outline and then add
some nodes as below and then drag a selected set of nodes under another
(different) node then I see this ordering issue. I haven't tried paring
down the schema since I assumed that the problem had little to do with
the additional elements of the schema. It just looked like a LIFO issue
on the move.
Dave Steinberg wrote:
> Chris Tomlinson wrote:
>
>> I have a model of an Outline defined using an XML Schema. I generate
>> the model, edit and editor and all behaves as expected except that if
>> I select a sequence of nodes (say ON2001, ON2002 and ON2003) and then
>> drag the nodes under another node (say ON1003) then the resulting node
>> order under ON1003 is ON2003, ON2002 and ON2001. So it is reversed. I
>> assume this is a defect.
>
>
> Hi Chris,
>
> I can't reproduce this. Are you using the latest version of EMF?
> Perhaps you could provide a model/scenario that I could try?
>
> Cheers,
> Dave
--------------090906000006050309020501
Content-Type: text/xml; x-mac-type="0"; x-mac-creator="0";
name="common.xsd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="common.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Note">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="work" type="workRID" use="optional"/>
<xsd:attribute name="location" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Subject">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="class" type="anyRID"/>
<xsd:attribute name="type" type="usageTypeAttr"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="corporationRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="C\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="eventRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="E\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="imagegroupRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="I\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="lineageRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="L\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="libraryOfCongressRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="LC\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="officeRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="R\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="outlineRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="O\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="outlineNodeRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="ON\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="personRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="P\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="placeRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="G\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="pubinfoRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="MW\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="topicRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="T\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="workRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="W\d+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="productRID">
<xsd:restriction base="xsd:string">
<xsd:pattern value="PR\w+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="entityRID">
<xsd:union memberTypes="personRID corporationRID"/>
</xsd:simpleType>
<xsd:simpleType name="anyRID">
<xsd:union memberTypes="workRID topicRID pubinfoRID placeRID personRID outlineRID
officeRID libraryOfCongressRID imagegroupRID eventRID corporationRID"/>
</xsd:simpleType>
<xsd:simpleType name="langTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="tibetan"/>
<xsd:enumeration value="english"/>
<xsd:enumeration value="chinese"/>
<xsd:enumeration value="sanskrit"/>
<xsd:enumeration value="mongolian"/>
<xsd:enumeration value="french"/>
<xsd:enumeration value="russian"/>
<xsd:enumeration value="zhangZhung"/>
<xsd:enumeration value="dzongkha"/>
<xsd:enumeration value="miNyag"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="langEncTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="extendedWylie"/>
<xsd:enumeration value="wadeGiles"/>
<xsd:enumeration value="pinyin"/>
<xsd:enumeration value="libraryOfCongress"/>
<xsd:enumeration value="native"/>
<xsd:enumeration value="rma"/>
<xsd:enumeration value="sansDiacritics"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="titleTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="bibliographicalTitle"/>
<xsd:enumeration value="titlePageTitle"/>
<xsd:enumeration value="subtitle"/>
<xsd:enumeration value="runningTitle"/>
<xsd:enumeration value="colophonTitle"/>
<xsd:enumeration value="coverTitle"/>
<xsd:enumeration value="sectionTitle"/>
<xsd:enumeration value="halfTitle"/>
<xsd:enumeration value="otherTitle"/>
<xsd:enumeration value="captionTitle"/>
<xsd:enumeration value="spineTitle"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="creatorTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="hasMainAuthor"/>
<xsd:enumeration value="hasContributingAuthor"/>
<xsd:enumeration value="hasTranslator"/>
<xsd:enumeration value="hasEditor"/>
<xsd:enumeration value="hasScribe"/>
<xsd:enumeration value="hasRequester"/>
<xsd:enumeration value="hasCalligrapher"/>
<xsd:enumeration value="hasArtist"/>
<xsd:enumeration value="hasCommentator"/>
<xsd:enumeration value="hasBard"/>
<xsd:enumeration value="hasAttributedAuthor"/>
<xsd:enumeration value="hasTerton"/>
<xsd:enumeration value="hasRecipientOfResponseToQuery"/>
<xsd:enumeration value="hasPandita"/>
<xsd:enumeration value="hasReviserOfTranslation"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="eventTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="birth"/>
<xsd:enumeration value="death"/>
<xsd:enumeration value="marriage"/>
<xsd:enumeration value="divorce"/>
<xsd:enumeration value="assumeOffice"/>
<xsd:enumeration value="leavesOffice"/>
<xsd:enumeration value="foundsMonastery"/>
<xsd:enumeration value="rabByungOrdination"/>
<xsd:enumeration value="finalOrdination"/>
<xsd:enumeration value="discoveryOfGterMa"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="usageTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="isAboutControlled"/>
<xsd:enumeration value="isAboutUncontrolled"/>
<xsd:enumeration value="isInstanceOfGenre"/>
<xsd:enumeration value="isAboutPerson"/>
<xsd:enumeration value="isAboutCorporation"/>
<xsd:enumeration value="isAboutMeeting"/>
<xsd:enumeration value="isAboutPlace"/>
<xsd:enumeration value="isAboutClan"/>
<xsd:enumeration value="isCommentaryOn"/>
<xsd:enumeration value="isAboutDeity"/>
<xsd:enumeration value="isAboutSect"/>
<xsd:enumeration value="isAboutText"/>
<xsd:enumeration value="isInstanceOf"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
--------------090906000006050309020501
Content-Type: text/xml; x-mac-type="0"; x-mac-creator="0";
name="outline.xsd"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="outline.xsd"
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.tbrc.org/models/outline#"
xmlns="http://www.tbrc.org/models/outline#" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:annotation>
<xsd:documentation>
<p>Outlines describe the contents of Works. An outline may apply to a collection of
works such as the bka' 'gyur or rgyud 'bum or it may
apply to a single work such as chos bying mdzod or ye shes bla ma. The Work which is
the target of the Outline may be a ConceptualWork or a PublishedWork. Each node of
an Outline may be a Section which describes a subset of the Work, e.g., the gzhung
bsdus of the bka' 'gyur; or it may be a Text which is contained in
the Work, e.g., chos bying mdzod which is contained in the mdzod bdun, or it might
be a chapter of sub-text of a Work, e.g., Chapter 5 of the phyogs bcu mun sel.</p>
<p>Section nodes include one or more section Names and zero or more Descriptions
typically differing by language. A Section may also contain zero or more
CrossReferences to nodes of other Outlines. This is used to describe how one Outline
corresponds to another. A Section may also contain any mix of zero or more (sub)
Sections and Texts. Section nodes are introduced in order to convey structure that
is typically not explicit on the Work being outlined. Such structure may be passed
on in oral tradition or other written Works that are referenced in the construction
of the Outline.</p>
<p>Text nodes typically describe a single work, e.g., a sutra, tantra or commentary; or
a textually defined sub-text of such a work, e.g., the second of the third of the
first part of Chapter 9 of a particular text. Text nodes have one or more Names,
zero or more Creators, an optional Date of writing, and zero or more Places that
describe where the Text was revealed or written and so on. There may be no Creator
if the Creator is implicit in the Work being Outlined. If the Outlined Work is a
PublishedWork then a Text node will typically contain volume, page, line and phrase
information for the segments of the containing work that comprise the Text. A Text
node of a ConceptualWork will not have any pagination information since the Work is
not physically manifest. A Text node may also contain a link to more Detail which is
another Outline which provides detail on the node which contains the Detail.</p>
<p> </p>
</xsd:documentation>
</xsd:annotation>
<xsd:include schemaLocation="common.xsd"/>
<!-- root elements for TBRC: outline -->
<xsd:element name="outline" type="Outline"/>
<xsd:complexType name="Outline">
<xsd:sequence>
<xsd:element name="isOutlineOf" type="IsOutlineOf" minOccurs="1" maxOccurs="1"/>
<xsd:element name="name" type="Name" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element name="location" type="Location" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation> In the case that the Outline is the detail of a particular
Text then the location typically will specify the Work and Volume (relative
to 1) that contains the Outlined Text. Thus Locations on the sub-structure
need only mention page, line and phrase</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="parent" type="Parent" minOccurs="0" maxOccurs="1"/>
<xsd:element name="creator" type="Creator" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="description" type="Description" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="node" type="Node" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="note" type="Note" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="RID" type="outlineRID" use="required"/>
</xsd:complexType>
<xsd:complexType name="Node">
<xsd:annotation>
<xsd:documentation>Section nodes include one or more section Names and zero or more
Descriptions typically differing by language. A Section may also contain zero or
more References to nodes of other Outlines. This is used to describe how one Outline
corresponds to another. A Section may also contain any mix of zero or more (sub)
Sections and Texts. Section nodes are introduced in order to convey structure that
is typically not explicit on the Work being outlined. Such structure may be passed
on in oral tradition or other written Works that are referenced in the construction
of the Outline. Sections may also be used to represent sub-structure within a Text
such as a chapter or other sub-section. In this case a Location(s) may be used to
indicate the start or start and finish of the section within the text. Further the
work and volume information may be defaulted with a Location at the top-level
Outline element.</xsd:documentation>
<xsd:documentation>Text nodes typically describe a single work, e.g., a sutra, tantra or
commentary; or a textually defined sub-text of such a work, e.g., the second of the
third of the first part of Chapter 9 of a particular text. Text nodes have one or
more Names, zero or more Creators, an optional Date of writing, and zero or more
Places that describe where the Text was revealed or written and so on. There may be
no Creator if the Creator is implicit in the Work being Outlined. If the Outlined
Work is a PublishedWork then a Text node will typically contain volume, page, line
and phrase information for the segments of the containing work that comprise the
Text. A Text node of a ConceptualWork will not have any pagination information since
the Work is not physically manifest. A Text node may also contain a link to more
Detail which is another Outline which provides detail on the node which contains the
Detail.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="Names" minOccurs="1" maxOccurs="unbounded"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="creator" type="Creator" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="location" type="Location" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="description" type="Description" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element name="ref" type="Ref" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="site" type="Site" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="detail" type="Detail" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element name="subject" type="Subject" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="node" type="Node" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="note" type="Note" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="type" type="nodeTypeAttr"/>
<xsd:attribute name="work" type="workRID"/>
<xsd:attribute name="RID" type="outlineNodeRID" use="required"/>
</xsd:complexType>
<xsd:group name="Names">
<xsd:choice>
<xsd:element name="name" type="Name"/>
<xsd:element name="title" type="Title"/>
</xsd:choice>
</xsd:group>
<xsd:complexType name="Description">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lang" type="langTypeAttr" default="english"/>
<xsd:attribute name="encoding" type="langEncTypeAttr" default="native"/>
<xsd:attribute name="type" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Ref">
<xsd:annotation>
<xsd:documentation> If the outline attribute is not present then the reference is to a
Node in the current Outline. Text if present is typically a name or title from the
referenced Node </xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="outline" type="outlineRID" use="optional"/>
<xsd:attribute name="node" type="outlineNodeRID" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="IsOutlineOf">
<xsd:annotation>
<xsd:documentation>links to the work that this outline describes. The content of this
element is the primary title of the target work.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="outlineTypeAttr" use="required"/>
<xsd:attribute name="work" type="workRID"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Name">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lang" type="langTypeAttr" default="tibetan"/>
<xsd:attribute name="encoding" type="langEncTypeAttr" default="extendedWylie"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Title">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lang" type="langTypeAttr" default="tibetan"/>
<xsd:attribute name="encoding" type="langEncTypeAttr" default="extendedWylie"/>
<xsd:attribute name="type" type="titleTypeAttr"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Creator">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="person" type="personRID"/>
<xsd:attribute name="type" type="creatorTypeAttr"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Site">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="place" type="placeRID"/>
<xsd:attribute name="type" type="siteTypeAttr"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Location">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="locationTypeAttr" default="page"/>
<xsd:attribute name="work" type="workRID"/>
<xsd:attribute name="vol" type="xsd:positiveInteger"/>
<xsd:attribute name="page" type="xsd:positiveInteger"/>
<xsd:attribute name="side" type="xsd:string"/>
<xsd:attribute name="line" type="xsd:positiveInteger"/>
<xsd:attribute name="phrase" type="xsd:positiveInteger"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Parent">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="outline" type="outlineRID" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Detail">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="outline" type="outlineRID" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="nodeTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="section"/>
<xsd:enumeration value="text"/>
<xsd:enumeration value="chapter"/>
<xsd:enumeration value="volume"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="siteTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="started"/>
<xsd:enumeration value="completed"/>
<xsd:enumeration value="edited"/>
<xsd:enumeration value="revealed"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="outlineTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="gsungBum"/>
<xsd:enumeration value="compositeVolume"/>
<xsd:enumeration value="partialCollectedWorks"/>
<xsd:enumeration value="multivolumeCollection"/>
<xsd:enumeration value="subjectCollection"/>
<xsd:enumeration value="saBcad"/>
<xsd:enumeration value="gterChos"/>
<xsd:enumeration value="notAssigned"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="locationTypeAttr">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="page"/>
<xsd:enumeration value="folio"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
--------------090906000006050309020501--
|
|
|
Re: EMF Editor drag and drop doesn't preserve node order [message #395013 is a reply to message #395010] |
Mon, 15 August 2005 15:07  |
Eclipse User |
|
|
|
Xristy wrote:
> I've attached the XML schema and its include file. I simply create an
> EMF project from the schema (which is in its own project with many other
> schema) and generate the model, edit and editor with taking all the
> defaults. When I run the application and create an outline and then add
> some nodes as below and then drag a selected set of nodes under another
> (different) node then I see this ordering issue. I haven't tried paring
> down the schema since I assumed that the problem had little to do with
> the additional elements of the schema. It just looked like a LIFO issue
> on the move.
Hi again Chris,
Nope, I still can't reproduce the problem. Perhaps it only occurs on OS
X? Open a Bugzilla, and we'll see if we can get our hands on some shiny
Mac goodness. In the mean time, if you want to try to investigate the
problem further, just add information you can find to the bug.
Cheers,
Dave
|
|
|
Powered by
FUDForum. Page generated in 0.03703 seconds