Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Fasani2015-05-12 12:47:53 +0000
committerPierre-Charles David2015-05-14 12:39:31 +0000
commitc158f08463784451a1f4320ef9050b91512b3dbe (patch)
tree2d420f9b1582381f505e90e105477f96d96af910
parentcea378bd5d97851d3decfff5250841c00e601db3 (diff)
downloadorg.eclipse.sirius-c158f08463784451a1f4320ef9050b91512b3dbe.tar.gz
org.eclipse.sirius-c158f08463784451a1f4320ef9050b91512b3dbe.tar.xz
org.eclipse.sirius-c158f08463784451a1f4320ef9050b91512b3dbe.zip
[436833] Add EEF integration for docbook meta-model
Add org.eclipse.sirius.tests.sample.docbook.edit and org.eclipse.sirius.tests.sample.docbook.editor plug-ins. Bug: 436833 Change-Id: I2a947b52d742519ab116b9a89c7c1574080c5f59 Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
-rw-r--r--packaging/org.eclipse.sirius.tests.parent/pom.xml2
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/.checkstyle13
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/.classpath7
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/.project28
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/build.properties19
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_para_Para.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_title_Title.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_bookinfo_Info.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_chapter_Chapter.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_para_Para.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_sect1_Sect1.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_title_Title.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateInfo_author_Author.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateItemizedList_listitem_ListItem.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect1_sect2_Sect2.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect2_sect3_Sect3.gifbin0 -> 223 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Author.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Book.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Chapter.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Emphasis.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Example.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Info.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ItemizedList.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Link.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ListItem.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/OrderedList.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Para.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect1.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect2.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect3.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/SimpleList.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Title.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ULink.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/XRef.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.components332
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.eefgen9
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.properties78
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.xml546
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/pom.xml28
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/docbook_properties.plugin.xml145
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/AuthorPropertiesEditionComponent.java226
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/BookPropertiesEditionComponent.java293
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ChapterPropertiesEditionComponent.java301
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/EmphasisPropertiesEditionComponent.java175
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ExamplePropertiesEditionComponent.java212
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/InfoPropertiesEditionComponent.java268
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ItemizedListPropertiesEditionComponent.java243
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/OrderedListPropertiesEditionComponent.java175
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ParaPropertiesEditionComponent.java175
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect1PropertiesEditionComponent.java301
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect2PropertiesEditionComponent.java301
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect3PropertiesEditionComponent.java242
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/TitlePropertiesEditionComponent.java175
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ULinkPropertiesEditionComponent.java200
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/XRefPropertiesEditionComponent.java175
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/AuthorPropertiesEditionPart.java81
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/BookPropertiesEditionPart.java131
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ChapterPropertiesEditionPart.java148
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/DocbookViewsRepository.java272
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/EmphasisPropertiesEditionPart.java51
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ExamplePropertiesEditionPart.java86
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/InfoPropertiesEditionPart.java116
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ItemizedListPropertiesEditionPart.java101
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/LinkPropertiesEditionPart.java36
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ListItemPropertiesEditionPart.java36
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/OrderedListPropertiesEditionPart.java51
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ParaPropertiesEditionPart.java51
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect1PropertiesEditionPart.java148
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect2PropertiesEditionPart.java148
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect3PropertiesEditionPart.java101
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/SimpleListPropertiesEditionPart.java36
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Title_PropertiesEditionPart.java51
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ULinkPropertiesEditionPart.java66
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/XRefPropertiesEditionPart.java51
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/AuthorPropertiesEditionPartForm.java462
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/BookPropertiesEditionPartForm.java625
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ChapterPropertiesEditionPartForm.java576
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/EmphasisPropertiesEditionPartForm.java260
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ExamplePropertiesEditionPartForm.java315
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/InfoPropertiesEditionPartForm.java525
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ItemizedListPropertiesEditionPartForm.java426
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/LinkPropertiesEditionPartForm.java127
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ListItemPropertiesEditionPartForm.java127
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/OrderedListPropertiesEditionPartForm.java260
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ParaPropertiesEditionPartForm.java260
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect1PropertiesEditionPartForm.java576
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect2PropertiesEditionPartForm.java576
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect3PropertiesEditionPartForm.java425
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/SimpleListPropertiesEditionPartForm.java127
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Title_PropertiesEditionPartForm.java260
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ULinkPropertiesEditionPartForm.java362
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/XRefPropertiesEditionPartForm.java260
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/AuthorPropertiesEditionPartImpl.java423
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/BookPropertiesEditionPartImpl.java586
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ChapterPropertiesEditionPartImpl.java551
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/EmphasisPropertiesEditionPartImpl.java235
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ExamplePropertiesEditionPartImpl.java298
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/InfoPropertiesEditionPartImpl.java493
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ItemizedListPropertiesEditionPartImpl.java401
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/LinkPropertiesEditionPartImpl.java113
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ListItemPropertiesEditionPartImpl.java113
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/OrderedListPropertiesEditionPartImpl.java235
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ParaPropertiesEditionPartImpl.java235
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect1PropertiesEditionPartImpl.java551
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect2PropertiesEditionPartImpl.java551
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect3PropertiesEditionPartImpl.java400
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/SimpleListPropertiesEditionPartImpl.java113
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Title_PropertiesEditionPartImpl.java235
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ULinkPropertiesEditionPartImpl.java330
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/XRefPropertiesEditionPartImpl.java235
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AbstractSectItemProvider.java160
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AuthorItemProvider.java172
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/BookItemProvider.java216
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ChapterItemProvider.java192
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookEditPlugin.java93
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookItemProviderAdapterFactory.java694
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/EmphasisItemProvider.java144
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ExampleItemProvider.java101
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/InfoItemProvider.java198
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ItemizedListItemProvider.java186
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/LinkItemProvider.java119
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ListItemItemProvider.java119
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/OrderedListItemProvider.java146
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ParaItemProvider.java144
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect1ItemProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect2ItemProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect3ItemProvider.java126
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/SimpleListItemProvider.java121
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/TitleItemProvider.java144
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ULinkItemProvider.java158
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/XRefItemProvider.java144
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/AuthorPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/BookPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ChapterPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookEEFAdapterFactory.java188
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookMessages.java232
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookPropertiesEditionPartProvider.java199
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/EmphasisPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ExamplePropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/InfoPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ItemizedListPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/OrderedListPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ParaPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect1PropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect2PropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect3PropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Title_PropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ULinkPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/XRefPropertiesEditionProvider.java166
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages.properties115
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages_fr.properties115
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/.checkstyle13
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/.classpath7
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/.project28
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/build.properties18
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/obj16/DocbookModelFile.gifbin0 -> 346 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/wizban/NewDocbook.gifbin0 -> 2462 bytes
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.properties61
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.xml46
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/pom.xml28
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookActionBarContributor.java433
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditor.java1761
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditorPlugin.java94
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookModelWizard.java596
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/model/docbook.genmodel226
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/AbstractSect.java10
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Author.java16
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Book.java22
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Chapter.java16
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookFactory.java42
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookPackage.java502
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Emphasis.java8
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Example.java4
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Info.java14
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ItemizedList.java10
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Link.java4
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ListItem.java4
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/OrderedList.java8
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Para.java8
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect1.java10
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect2.java10
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect3.java8
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/SimpleList.java4
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Title.java8
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ULink.java12
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/XRef.java8
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AbstractSectImpl.java52
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AuthorImpl.java76
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/BookImpl.java114
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ChapterImpl.java81
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookFactoryImpl.java67
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookPackageImpl.java531
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/EmphasisImpl.java38
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ExampleImpl.java6
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/InfoImpl.java64
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ItemizedListImpl.java45
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/LinkImpl.java6
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ListItemImpl.java6
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/OrderedListImpl.java38
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ParaImpl.java38
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect1Impl.java45
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect2Impl.java45
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect3Impl.java38
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/SimpleListImpl.java6
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/TitleImpl.java38
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ULinkImpl.java57
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/XRefImpl.java38
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookAdapterFactory.java60
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceFactoryImpl.java6
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceImpl.java4
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookSwitch.java125
-rw-r--r--plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookXMLProcessor.java10
214 files changed, 30602 insertions, 1232 deletions
diff --git a/packaging/org.eclipse.sirius.tests.parent/pom.xml b/packaging/org.eclipse.sirius.tests.parent/pom.xml
index ae138cca31..a17ffaa5c5 100644
--- a/packaging/org.eclipse.sirius.tests.parent/pom.xml
+++ b/packaging/org.eclipse.sirius.tests.parent/pom.xml
@@ -69,6 +69,8 @@
<module>../../plugins/org.eclipse.sirius.tests.sample.benchmark</module>
<module>../../plugins/org.eclipse.sirius.tests.sample.docbook</module>
<module>../../plugins/org.eclipse.sirius.tests.sample.docbook.design</module>
+ <module>../../plugins/org.eclipse.sirius.tests.sample.docbook.edit</module>
+ <module>../../plugins/org.eclipse.sirius.tests.sample.docbook.editor</module>
<module>../../plugins/org.eclipse.sirius.tests.sample.migration</module>
<module>../../plugins/org.eclipse.sirius.tests.sample.migration.design</module>
<module>../../plugins/org.eclipse.sirius.tests.sample.component</module>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.checkstyle b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.checkstyle
new file mode 100644
index 0000000000..3c756ff819
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.checkstyle
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <local-check-config name="Sirius Checks" location="/org.eclipse.sirius.settings/CheckstyleConfiguration.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="false"/>
+ </local-check-config>
+ <fileset name="all" enabled="true" check-config-name="Sirius Checks" local="true">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src-gen"/>
+ </filter>
+</fileset-config>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.classpath b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.classpath
new file mode 100644
index 0000000000..e4dad7e73e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.project b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.project
new file mode 100644
index 0000000000..51aaf16418
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.sirius.tests.sample.docbook.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..6cf9b41725
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.sirius.tests.sample.docbook.edit;singleton:=true
+Bundle-Version: 3.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.sirius.tests.sample.docbook.provider.DocbookEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.sirius.tests.sample.docbook.provider,
+ org.eclipse.sirius.tests.sample.docbook.providers
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.sirius.tests.sample.docbook;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.eef.runtime;bundle-version="1.5.0";visibility:=reexport,
+ org.eclipse.sirius.eef.adapters;bundle-version="3.0.0"
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/build.properties b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/build.properties
new file mode 100644
index 0000000000..f71d3f2f1b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/build.properties
@@ -0,0 +1,19 @@
+# Copyright (c) 2015 Obeo
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+
+bin.includes = .,\
+ models/,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_para_Para.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_para_Para.gif
new file mode 100644
index 0000000000..d8233b0ffd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_para_Para.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_title_Title.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_title_Title.gif
new file mode 100644
index 0000000000..9dc67ff8ba
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateAbstractSect_title_Title.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_bookinfo_Info.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_bookinfo_Info.gif
new file mode 100644
index 0000000000..407220bf47
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_bookinfo_Info.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_chapter_Chapter.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_chapter_Chapter.gif
new file mode 100644
index 0000000000..207b658fbb
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateBook_chapter_Chapter.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_para_Para.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_para_Para.gif
new file mode 100644
index 0000000000..dabd6f416d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_para_Para.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_sect1_Sect1.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_sect1_Sect1.gif
new file mode 100644
index 0000000000..84d32674ac
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_sect1_Sect1.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_title_Title.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_title_Title.gif
new file mode 100644
index 0000000000..ddf43a1824
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateChapter_title_Title.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateInfo_author_Author.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateInfo_author_Author.gif
new file mode 100644
index 0000000000..bdbdd7bacc
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateInfo_author_Author.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateItemizedList_listitem_ListItem.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateItemizedList_listitem_ListItem.gif
new file mode 100644
index 0000000000..5d52b42ea3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateItemizedList_listitem_ListItem.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect1_sect2_Sect2.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect1_sect2_Sect2.gif
new file mode 100644
index 0000000000..1fedc13ad8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect1_sect2_Sect2.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect2_sect3_Sect3.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect2_sect3_Sect3.gif
new file mode 100644
index 0000000000..bdcb71c7dd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/ctool16/CreateSect2_sect3_Sect3.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Author.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Author.gif
new file mode 100644
index 0000000000..d92f34c8ae
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Author.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Book.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Book.gif
new file mode 100644
index 0000000000..c3370c7ddd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Book.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Chapter.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Chapter.gif
new file mode 100644
index 0000000000..90d10f9470
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Chapter.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Emphasis.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Emphasis.gif
new file mode 100644
index 0000000000..5915591825
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Emphasis.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Example.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Example.gif
new file mode 100644
index 0000000000..b3643da048
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Example.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Info.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Info.gif
new file mode 100644
index 0000000000..94c953e013
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Info.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ItemizedList.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ItemizedList.gif
new file mode 100644
index 0000000000..83afb9b3c9
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ItemizedList.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Link.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Link.gif
new file mode 100644
index 0000000000..89ad5da38a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Link.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ListItem.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ListItem.gif
new file mode 100644
index 0000000000..106881e5d9
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ListItem.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/OrderedList.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/OrderedList.gif
new file mode 100644
index 0000000000..a26660ec28
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/OrderedList.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Para.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Para.gif
new file mode 100644
index 0000000000..98b351f1c4
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Para.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect1.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect1.gif
new file mode 100644
index 0000000000..45731fe28e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect1.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect2.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect2.gif
new file mode 100644
index 0000000000..10d222998a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect2.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect3.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect3.gif
new file mode 100644
index 0000000000..b1f8afa476
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Sect3.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/SimpleList.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/SimpleList.gif
new file mode 100644
index 0000000000..7c2aaac84e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/SimpleList.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Title.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Title.gif
new file mode 100644
index 0000000000..e4b530eca1
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/Title.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ULink.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ULink.gif
new file mode 100644
index 0000000000..ef56c14085
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/ULink.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/XRef.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/XRef.gif
new file mode 100644
index 0000000000..83afb9b3c9
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/icons/full/obj16/XRef.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.components b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.components
new file mode 100644
index 0000000000..abc93156bc
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.components
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:eef-components="http://www.eclipse.org/emf/eef/components/1.0.0" xmlns:eef-views="http://www.eclipse.org/emf/eef/views/1.0.0">
+ <eef-components:PropertiesEditionContext xmi:id="_6u7x0PiOEeSjnZMs8ur7NQ" documentation="Edition Context for docbook GenPackage">
+ <categories xmi:id="_6u7x0fiOEeSjnZMs8ur7NQ" name="docbook">
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x0viOEeSjnZMs8ur7NQ" name="Book" views="_6u7yBfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x0_iOEeSjnZMs8ur7NQ" name="chapter" views="_6u7yB_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Book/chapter"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x1PiOEeSjnZMs8ur7NQ" name="id" views="_6u7yCPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Book/id"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x1fiOEeSjnZMs8ur7NQ" name="lang" views="_6u7yCfiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Book/lang"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x1viOEeSjnZMs8ur7NQ" name="version" views="_6u7yCviOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Book/version"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Book"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x1_iOEeSjnZMs8ur7NQ" name="Info" views="_6u7yC_iOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x2PiOEeSjnZMs8ur7NQ" name="author" views="_6u7yDfiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Info/author"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x2fiOEeSjnZMs8ur7NQ" name="date" views="_6u7yDviOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Info/date"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x2viOEeSjnZMs8ur7NQ" name="pubdate" views="_6u7yD_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Info/pubdate"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Info"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x2_iOEeSjnZMs8ur7NQ" name="Author" views="_6u7yEPiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x3PiOEeSjnZMs8ur7NQ" name="email" views="_6u7yEviOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Author/email"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x3fiOEeSjnZMs8ur7NQ" name="personname" views="_6u7yE_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Author/personname"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x3viOEeSjnZMs8ur7NQ" name="address" views="_6u7yFPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Author/address"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Author"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x3_iOEeSjnZMs8ur7NQ" name="Chapter" views="_6u7yFfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x4PiOEeSjnZMs8ur7NQ" name="para" views="_6u7yF_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Chapter/para"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x4fiOEeSjnZMs8ur7NQ" name="sect1" views="_6u7yGPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Chapter/sect1"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x4viOEeSjnZMs8ur7NQ" name="id" views="_6u7yGfiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Chapter/id"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Chapter"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x4_iOEeSjnZMs8ur7NQ" name="Title" views="_6u7yGviOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x5PiOEeSjnZMs8ur7NQ" name="data" views="_6u7yHPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Title/data"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Title"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x5fiOEeSjnZMs8ur7NQ" name="Para" views="_6u7yHfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x5viOEeSjnZMs8ur7NQ" name="data" views="_6u7yH_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Para/data"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Para"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x5_iOEeSjnZMs8ur7NQ" name="SimpleList" views="_6u7yIPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//SimpleList"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x6PiOEeSjnZMs8ur7NQ" name="ItemizedList" views="_6u7yIfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x6fiOEeSjnZMs8ur7NQ" name="mark" views="_6u7yI_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//ItemizedList/mark"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x6viOEeSjnZMs8ur7NQ" name="listitem" views="_6u7yJPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//ItemizedList/listitem"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//ItemizedList"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x6_iOEeSjnZMs8ur7NQ" name="OrderedList" views="_6u7yJfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x7PiOEeSjnZMs8ur7NQ" name="numeration" views="_6u7yJ_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//OrderedList/numeration"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//OrderedList"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x7fiOEeSjnZMs8ur7NQ" name="Sect1" views="_6u7yKPiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x7viOEeSjnZMs8ur7NQ" name="para" views="_6u7yKviOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//AbstractSect/para"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x7_iOEeSjnZMs8ur7NQ" name="id" views="_6u7yK_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect1/id"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x8PiOEeSjnZMs8ur7NQ" name="sect2" views="_6u7yLPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect1/sect2"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect1"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x8fiOEeSjnZMs8ur7NQ" name="Sect2" views="_6u7yLfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x8viOEeSjnZMs8ur7NQ" name="para" views="_6u7yL_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//AbstractSect/para"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x8_iOEeSjnZMs8ur7NQ" name="id" views="_6u7yMPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect2/id"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x9PiOEeSjnZMs8ur7NQ" name="sect3" views="_6u7yMfiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect2/sect3"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect2"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x9fiOEeSjnZMs8ur7NQ" name="Emphasis" views="_6u7yMviOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x9viOEeSjnZMs8ur7NQ" name="remap" views="_6u7yNPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Emphasis/remap"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Emphasis"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x9_iOEeSjnZMs8ur7NQ" name="ULink" views="_6u7yNfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x-PiOEeSjnZMs8ur7NQ" name="url" views="_6u7yN_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//ULink/url"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x-fiOEeSjnZMs8ur7NQ" name="data" views="_6u7yOPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//ULink/data"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//ULink"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x-viOEeSjnZMs8ur7NQ" name="Link" views="_6u7yOfiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Link"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x-_iOEeSjnZMs8ur7NQ" name="XRef" views="_6u7yOviOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x_PiOEeSjnZMs8ur7NQ" name="linkend" views="_6u7yPPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//XRef/linkend"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//XRef"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x_fiOEeSjnZMs8ur7NQ" name="Example" views="_6u7yPfiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7x_viOEeSjnZMs8ur7NQ" name="para" views="_6u7yP_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//AbstractSect/para"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Example"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7x__iOEeSjnZMs8ur7NQ" name="Sect3" views="_6u7yQPiOEeSjnZMs8ur7NQ">
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7yAPiOEeSjnZMs8ur7NQ" name="para" views="_6u7yQviOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EReference" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//AbstractSect/para"/>
+ </properties>
+ <properties xsi:type="eef-components:PropertiesEditionElement" xmi:id="_6u7yAfiOEeSjnZMs8ur7NQ" name="id" views="_6u7yQ_iOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EAttribute" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect3/id"/>
+ </properties>
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//Sect3"/>
+ </bindings>
+ <bindings xsi:type="eef-components:PropertiesEditionComponent" xmi:id="_6u7yAviOEeSjnZMs8ur7NQ" name="ListItem" views="_6u7yRPiOEeSjnZMs8ur7NQ">
+ <model xsi:type="ecore:EClass" href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.ecore#//ListItem"/>
+ </bindings>
+ </categories>
+ <model href="platform:/resource/org.eclipse.sirius.tests.sample.docbook/model/docbook.genmodel#//docbook"/>
+ </eef-components:PropertiesEditionContext>
+ <eef-views:ViewsRepository xmi:id="_6u7yA_iOEeSjnZMs8ur7NQ" documentation="Views repository for docbook GenPackage" name="docbook">
+ <RepositoryKind>SWT</RepositoryKind>
+ <RepositoryKind>Form</RepositoryKind>
+ <categories xmi:id="_6u7yBPiOEeSjnZMs8ur7NQ" name="docbook">
+ <views xmi:id="_6u7yBfiOEeSjnZMs8ur7NQ" name="Book">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yBviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yB_iOEeSjnZMs8ur7NQ" name="chapter">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yCPiOEeSjnZMs8ur7NQ" name="id">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yCfiOEeSjnZMs8ur7NQ" name="lang">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yCviOEeSjnZMs8ur7NQ" name="version">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yC_iOEeSjnZMs8ur7NQ" name="Info">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yDPiOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yDfiOEeSjnZMs8ur7NQ" name="author">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yDviOEeSjnZMs8ur7NQ" name="date">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yD_iOEeSjnZMs8ur7NQ" name="pubdate">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yEPiOEeSjnZMs8ur7NQ" name="Author">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yEfiOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yEviOEeSjnZMs8ur7NQ" name="email">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yE_iOEeSjnZMs8ur7NQ" name="personname">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yFPiOEeSjnZMs8ur7NQ" name="address">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yFfiOEeSjnZMs8ur7NQ" name="Chapter">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yFviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yF_iOEeSjnZMs8ur7NQ" name="para">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yGPiOEeSjnZMs8ur7NQ" name="sect1">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yGfiOEeSjnZMs8ur7NQ" name="id">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yGviOEeSjnZMs8ur7NQ" name="Title">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yG_iOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yHPiOEeSjnZMs8ur7NQ" name="data">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yHfiOEeSjnZMs8ur7NQ" name="Para">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yHviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yH_iOEeSjnZMs8ur7NQ" name="data">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yIPiOEeSjnZMs8ur7NQ" name="SimpleList"/>
+ <views xmi:id="_6u7yIfiOEeSjnZMs8ur7NQ" name="ItemizedList">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yIviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yI_iOEeSjnZMs8ur7NQ" name="mark">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yJPiOEeSjnZMs8ur7NQ" name="listitem">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yJfiOEeSjnZMs8ur7NQ" name="OrderedList">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yJviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yJ_iOEeSjnZMs8ur7NQ" name="numeration">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yKPiOEeSjnZMs8ur7NQ" name="Sect1">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yKfiOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yKviOEeSjnZMs8ur7NQ" name="para">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yK_iOEeSjnZMs8ur7NQ" name="id">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yLPiOEeSjnZMs8ur7NQ" name="sect2">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yLfiOEeSjnZMs8ur7NQ" name="Sect2">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yLviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yL_iOEeSjnZMs8ur7NQ" name="para">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yMPiOEeSjnZMs8ur7NQ" name="id">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yMfiOEeSjnZMs8ur7NQ" name="sect3">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yMviOEeSjnZMs8ur7NQ" name="Emphasis">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yM_iOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yNPiOEeSjnZMs8ur7NQ" name="remap">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yNfiOEeSjnZMs8ur7NQ" name="ULink">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yNviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yN_iOEeSjnZMs8ur7NQ" name="url">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yOPiOEeSjnZMs8ur7NQ" name="data">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yOfiOEeSjnZMs8ur7NQ" name="Link"/>
+ <views xmi:id="_6u7yOviOEeSjnZMs8ur7NQ" name="XRef">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yO_iOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yPPiOEeSjnZMs8ur7NQ" name="linkend">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yPfiOEeSjnZMs8ur7NQ" name="Example">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yPviOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yP_iOEeSjnZMs8ur7NQ" name="para">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yQPiOEeSjnZMs8ur7NQ" name="Sect3">
+ <elements xsi:type="eef-views:Container" xmi:id="_6u7yQfiOEeSjnZMs8ur7NQ" name="properties">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.4"/>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yQviOEeSjnZMs8ur7NQ" name="para">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/EMFProperties.toolkits#//@widgets.7"/>
+ </elements>
+ <elements xsi:type="eef-views:ElementEditor" xmi:id="_6u7yQ_iOEeSjnZMs8ur7NQ" name="id">
+ <representation href="platform:/plugin/org.eclipse.emf.eef.views/std/SWT.toolkits#//@widgets.0"/>
+ </elements>
+ </elements>
+ </views>
+ <views xmi:id="_6u7yRPiOEeSjnZMs8ur7NQ" name="ListItem"/>
+ </categories>
+ </eef-views:ViewsRepository>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.eefgen b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.eefgen
new file mode 100644
index 0000000000..ba7efe55b3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/models/docbook.eefgen
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+<eef-gen:EEFGenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:eef-gen="http://www.eclipse.org/emf/eef/generation/1.0.0" genDirectory="/org.eclipse.sirius.tests.sample.docbook.edit/src-gen" license="/**&#xD;&#xA; * Copyright (c) 2015 Obeo&#xD;&#xA; * All rights reserved. This program and the accompanying materials&#xD;&#xA; * are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; * which accompanies this distribution, and is available at&#xD;&#xA; * http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; *&#xD;&#xA; * Contributors:&#xD;&#xA; * Obeo - initial API and implementation&#xD;&#xA; *&#xD;&#xA; */">
+ <editionContexts basePackage="org.eclipse.sirius.tests.sample" descriptorsGenericPropertiesViews="true" leafComponentsSuperClass="org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent">
+ <PropertiesEditionContext href="docbook.components#_6u7x0PiOEeSjnZMs8ur7NQ"/>
+ </editionContexts>
+ <viewsRepositories basePackage="org.eclipse.sirius.tests.sample.docbook" swtViews="true" formViews="true">
+ <viewsRepository href="docbook.components#_6u7yA_iOEeSjnZMs8ur7NQ"/>
+ </viewsRepositories>
+</eef-gen:EEFGenModel>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.properties b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.properties
new file mode 100644
index 0000000000..9d1bf7eab9
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.properties
@@ -0,0 +1,78 @@
+# Copyright (c) 2015 Obeo
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+
+pluginName = Docbook Edit Support
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Book_type = Book
+_UI_Info_type = Info
+_UI_Author_type = Author
+_UI_Chapter_type = Chapter
+_UI_Title_type = Title
+_UI_Para_type = Para
+_UI_SimpleList_type = Simple List
+_UI_ItemizedList_type = Itemized List
+_UI_OrderedList_type = Ordered List
+_UI_Sect1_type = Sect1
+_UI_AbstractSect_type = Abstract Sect
+_UI_Sect2_type = Sect2
+_UI_Emphasis_type = Emphasis
+_UI_ULink_type = ULink
+_UI_Link_type = Link
+_UI_XRef_type = XRef
+_UI_Example_type = Example
+_UI_Sect3_type = Sect3
+_UI_ListItem_type = List Item
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Book_bookinfo_feature = Bookinfo
+_UI_Book_chapter_feature = Chapter
+_UI_Book_id_feature = Id
+_UI_Book_lang_feature = Lang
+_UI_Book_version_feature = Version
+_UI_Info_author_feature = Author
+_UI_Info_date_feature = Date
+_UI_Info_pubdate_feature = Pubdate
+_UI_Author_email_feature = Email
+_UI_Author_personname_feature = Personname
+_UI_Author_address_feature = Address
+_UI_Chapter_title_feature = Title
+_UI_Chapter_para_feature = Para
+_UI_Chapter_sect1_feature = Sect1
+_UI_Chapter_id_feature = Id
+_UI_Title_data_feature = Data
+_UI_Para_data_feature = Data
+_UI_ItemizedList_mark_feature = Mark
+_UI_ItemizedList_listitem_feature = Listitem
+_UI_OrderedList_numeration_feature = Numeration
+_UI_Sect1_id_feature = Id
+_UI_Sect1_sect2_feature = Sect2
+_UI_AbstractSect_title_feature = Title
+_UI_AbstractSect_para_feature = Para
+_UI_Sect2_id_feature = Id
+_UI_Sect2_sect3_feature = Sect3
+_UI_Emphasis_remap_feature = Remap
+_UI_ULink_url_feature = Url
+_UI_ULink_data_feature = Data
+_UI_XRef_linkend_feature = Linkend
+_UI_Sect3_id_feature = Id
+_UI_Unknown_feature = Unspecified
+
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.xml b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.xml
new file mode 100644
index 0000000000..db5021bbf6
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/plugin.xml
@@ -0,0 +1,546 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2015 Obeo
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Obeo - initial API and implementation
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated docbook -->
+ <factory
+ uri="http://docbook.org/ns/docbook"
+ class="org.eclipse.sirius.tests.sample.docbook.provider.DocbookItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+ <!-- EEF extensions -->
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://docbook.org/ns/docbook"
+ class="org.eclipse.sirius.tests.sample.docbook.providers.DocbookEEFAdapterFactory"
+ supportedTypes="org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider"/>
+ </extension>
+ <extension
+ point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider">
+ <PropertiesEditionPartProvider
+ providerClass="org.eclipse.sirius.tests.sample.docbook.providers.DocbookPropertiesEditionPartProvider">
+ </PropertiesEditionPartProvider>
+ </extension>
+
+ <!-- Tabbed properties views extension -->
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.sirius.tests.sample.docbook.properties"
+ labelProvider="org.eclipse.emf.eef.runtime.ui.utils.EEFLabelProvider">
+ <propertyCategory
+ category="default">
+ </propertyCategory>
+ <propertyCategory
+ category="extended">
+ </propertyCategory>
+ <propertyCategory
+ category="advanced">
+ </propertyCategory>
+ </propertyContributor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.sirius.tests.sample.docbook.properties">
+ <propertyTab
+ id="Base"
+ label="Base"
+ category="default">
+ </propertyTab>
+
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.sirius.tests.sample.docbook.properties">
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.BookPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.BookPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Book"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.InfoPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.InfoPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Info"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.AuthorPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.AuthorPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Author"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ChapterPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ChapterPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Chapter"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Title_PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Title_PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Title"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ParaPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ParaPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Para"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ItemizedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ItemizedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ItemizedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.OrderedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.OrderedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.OrderedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect1PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect1PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect1"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect2PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect2PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect2"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.EmphasisPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.EmphasisPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Emphasis"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ULinkPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ULinkPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ULink"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.XRefPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.XRefPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.XRef"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ExamplePropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ExamplePropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Example"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect3PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect3PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect3"
+ tab="Base">
+ </propertySection>
+ </propertySections>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.sirius.diagram.ui"
+ labelProvider="org.eclipse.emf.eef.runtime.ui.utils.EEFLabelProvider">
+ <propertyCategory
+ category="default">
+ </propertyCategory>
+ <propertyCategory
+ category="extended">
+ </propertyCategory>
+ <propertyCategory
+ category="advanced">
+ </propertyCategory>
+ </propertyContributor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.sirius.diagram.ui">
+ <propertyTab
+ id="Base"
+ label="Base"
+ category="default">
+ </propertyTab>
+
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.sirius.diagram.ui">
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.BookPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.BookPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Book"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.InfoPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.InfoPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Info"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.AuthorPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.AuthorPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Author"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ChapterPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ChapterPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Chapter"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Title_PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Title_PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Title"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ParaPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ParaPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Para"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ItemizedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ItemizedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ItemizedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.OrderedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.OrderedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.OrderedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect1PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect1PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect1"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect2PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect2PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect2"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.EmphasisPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.EmphasisPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Emphasis"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ULinkPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ULinkPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ULink"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.XRefPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.XRefPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.XRef"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ExamplePropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ExamplePropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Example"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect3PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect3PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect3"
+ tab="Base">
+ </propertySection>
+ </propertySections>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.sirius.tree.ui.EditorID"
+ labelProvider="org.eclipse.emf.eef.runtime.ui.utils.EEFLabelProvider">
+ <propertyCategory
+ category="default">
+ </propertyCategory>
+ <propertyCategory
+ category="extended">
+ </propertyCategory>
+ <propertyCategory
+ category="advanced">
+ </propertyCategory>
+ </propertyContributor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.sirius.tree.ui.EditorID">
+ <propertyTab
+ id="Base"
+ label="Base"
+ category="default">
+ </propertyTab>
+
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.sirius.tree.ui.EditorID">
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.BookPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.BookPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Book"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.InfoPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.InfoPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Info"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.AuthorPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.AuthorPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Author"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ChapterPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ChapterPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Chapter"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Title_PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Title_PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Title"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ParaPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ParaPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Para"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ItemizedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ItemizedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ItemizedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.OrderedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.OrderedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.OrderedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect1PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect1PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect1"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect2PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect2PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect2"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.EmphasisPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.EmphasisPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Emphasis"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ULinkPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ULinkPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ULink"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.XRefPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.XRefPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.XRef"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ExamplePropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ExamplePropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Example"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect3PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect3PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect3"
+ tab="Base">
+ </propertySection>
+ </propertySections>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.sirius.table.ui.EditorID"
+ labelProvider="org.eclipse.emf.eef.runtime.ui.utils.EEFLabelProvider">
+ <propertyCategory
+ category="default">
+ </propertyCategory>
+ <propertyCategory
+ category="extended">
+ </propertyCategory>
+ <propertyCategory
+ category="advanced">
+ </propertyCategory>
+ </propertyContributor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.sirius.table.ui.EditorID">
+ <propertyTab
+ id="Base"
+ label="Base"
+ category="default">
+ </propertyTab>
+
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.sirius.table.ui.EditorID">
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.BookPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.BookPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Book"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.InfoPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.InfoPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Info"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.AuthorPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.AuthorPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Author"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ChapterPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ChapterPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Chapter"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Title_PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Title_PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Title"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ParaPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ParaPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Para"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ItemizedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ItemizedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ItemizedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.OrderedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.OrderedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.OrderedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect1PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect1PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect1"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect2PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect2PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect2"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.EmphasisPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.EmphasisPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Emphasis"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ULinkPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ULinkPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ULink"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.XRefPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.XRefPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.XRef"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ExamplePropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ExamplePropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Example"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect3PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect3PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect3"
+ tab="Base">
+ </propertySection>
+ </propertySections>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/pom.xml b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/pom.xml
new file mode 100644
index 0000000000..3b8c94d0ad
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/pom.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Obeo
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Obeo - Initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.sirius</groupId>
+ <artifactId>sirius-tests-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../../packaging/org.eclipse.sirius.tests.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.sirius.tests.sample.docbook.edit</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <version>3.0.0-SNAPSHOT</version>
+
+</project>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/docbook_properties.plugin.xml b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/docbook_properties.plugin.xml
new file mode 100644
index 0000000000..8949eeebf3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/docbook_properties.plugin.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+ <plugin>
+
+ <!-- EEF extensions -->
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://docbook.org/ns/docbook"
+ class="org.eclipse.sirius.tests.sample.docbook.providers.DocbookEEFAdapterFactory"
+ supportedTypes="org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider"/>
+ </extension>
+ <extension
+ point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider">
+ <PropertiesEditionPartProvider
+ providerClass="org.eclipse.sirius.tests.sample.docbook.providers.DocbookPropertiesEditionPartProvider">
+ </PropertiesEditionPartProvider>
+ </extension>
+
+ <!-- Tabbed properties views extension -->
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.sirius.tests.sample.docbook.properties"
+ labelProvider="org.eclipse.emf.eef.runtime.ui.utils.EEFLabelProvider">
+ <propertyCategory
+ category="default">
+ </propertyCategory>
+ <propertyCategory
+ category="extended">
+ </propertyCategory>
+ <propertyCategory
+ category="advanced">
+ </propertyCategory>
+ </propertyContributor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="org.eclipse.sirius.tests.sample.docbook.properties">
+ <propertyTab
+ id="Base"
+ label="Base"
+ category="default">
+ </propertyTab>
+
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.sirius.tests.sample.docbook.properties">
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.BookPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.BookPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Book"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.InfoPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.InfoPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Info"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.AuthorPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.AuthorPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Author"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ChapterPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ChapterPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Chapter"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Title_PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Title_PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Title"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ParaPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ParaPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Para"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ItemizedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ItemizedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ItemizedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.OrderedListPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.OrderedListPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.OrderedList"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect1PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect1PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect1"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect2PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect2PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect2"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.EmphasisPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.EmphasisPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Emphasis"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ULinkPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ULinkPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.ULink"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.XRefPropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.XRefPropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.XRef"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.ExamplePropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.ExamplePropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Example"
+ tab="Base">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect3PropertiesEditionPartForm"
+ filter="org.eclipse.sirius.tests.sample.docbook.providers.Sect3PropertiesEditionProvider$EditionFilter"
+ id="org.eclipse.sirius.tests.sample.docbook.section.Sect3"
+ tab="Base">
+ </propertySection>
+ </propertySections>
+ </extension>
+ </plugin>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/AuthorPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/AuthorPropertiesEditionComponent.java
new file mode 100644
index 0000000000..a26c485592
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/AuthorPropertiesEditionComponent.java
@@ -0,0 +1,226 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.Author;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class AuthorPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Default constructor
+ *
+ */
+ public AuthorPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject author, String editing_mode) {
+ super(editingContext, author, editing_mode);
+ parts = new String[] { AuthorPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Author.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Author author = (Author) elt;
+ final AuthorPropertiesEditionPart basePart = (AuthorPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Author.Properties.email)) {
+ basePart.setEmail(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, author.getEmail()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.Author.Properties.personname)) {
+ basePart.setPersonname(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, author.getPersonname()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.Author.Properties.address)) {
+ basePart.setAddress(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, author.getAddress()));
+ }
+
+ // init filters
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Author.Properties.email) {
+ return DocbookPackage.eINSTANCE.getAuthor_Email();
+ }
+ if (editorKey == DocbookViewsRepository.Author.Properties.personname) {
+ return DocbookPackage.eINSTANCE.getAuthor_Personname();
+ }
+ if (editorKey == DocbookViewsRepository.Author.Properties.address) {
+ return DocbookPackage.eINSTANCE.getAuthor_Address();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Author author = (Author) semanticObject;
+ if (DocbookViewsRepository.Author.Properties.email == event.getAffectedEditor()) {
+ author.setEmail((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.Author.Properties.personname == event.getAffectedEditor()) {
+ author.setPersonname((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.Author.Properties.address == event.getAffectedEditor()) {
+ author.setAddress((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ AuthorPropertiesEditionPart basePart = (AuthorPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getAuthor_Email().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Author.Properties.email)) {
+ if (msg.getNewValue() != null) {
+ basePart.setEmail(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setEmail("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getAuthor_Personname().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Author.Properties.personname)) {
+ if (msg.getNewValue() != null) {
+ basePart.setPersonname(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setPersonname("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getAuthor_Address().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Author.Properties.address)) {
+ if (msg.getNewValue() != null) {
+ basePart.setAddress(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setAddress("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getAuthor_Email(), DocbookPackage.eINSTANCE.getAuthor_Personname(),
+ DocbookPackage.eINSTANCE.getAuthor_Address());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Author.Properties.email == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getAuthor_Email().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getAuthor_Email().getEAttributeType(), newValue);
+ }
+ if (DocbookViewsRepository.Author.Properties.personname == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getAuthor_Personname().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getAuthor_Personname().getEAttributeType(), newValue);
+ }
+ if (DocbookViewsRepository.Author.Properties.address == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getAuthor_Address().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getAuthor_Address().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/BookPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/BookPropertiesEditionComponent.java
new file mode 100644
index 0000000000..95e8f2277a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/BookPropertiesEditionComponent.java
@@ -0,0 +1,293 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.Book;
+import org.eclipse.sirius.tests.sample.docbook.Chapter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class BookPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for chapter ReferencesTable
+ */
+ protected ReferencesTableSettings chapterSettings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public BookPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject book, String editing_mode) {
+ super(editingContext, book, editing_mode);
+ parts = new String[] { BookPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Book.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Book book = (Book) elt;
+ final BookPropertiesEditionPart basePart = (BookPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Book.Properties.chapter)) {
+ chapterSettings = new ReferencesTableSettings(book, DocbookPackage.eINSTANCE.getBook_Chapter());
+ basePart.initChapter(chapterSettings);
+ }
+ if (isAccessible(DocbookViewsRepository.Book.Properties.id)) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, book.getId()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.Book.Properties.lang)) {
+ basePart.setLang(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, book.getLang()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.Book.Properties.version)) {
+ basePart.setVersion(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, book.getVersion()));
+ }
+
+ // init filters
+ if (isAccessible(DocbookViewsRepository.Book.Properties.chapter)) {
+ basePart.addFilterToChapter(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Chapter); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for chapter
+ // End of user code
+ }
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Book.Properties.chapter) {
+ return DocbookPackage.eINSTANCE.getBook_Chapter();
+ }
+ if (editorKey == DocbookViewsRepository.Book.Properties.id) {
+ return DocbookPackage.eINSTANCE.getBook_Id();
+ }
+ if (editorKey == DocbookViewsRepository.Book.Properties.lang) {
+ return DocbookPackage.eINSTANCE.getBook_Lang();
+ }
+ if (editorKey == DocbookViewsRepository.Book.Properties.version) {
+ return DocbookPackage.eINSTANCE.getBook_Version();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Book book = (Book) semanticObject;
+ if (DocbookViewsRepository.Book.Properties.chapter == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, chapterSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ chapterSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ chapterSettings.move(event.getNewIndex(), (Chapter) event.getNewValue());
+ }
+ }
+ if (DocbookViewsRepository.Book.Properties.id == event.getAffectedEditor()) {
+ book.setId((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.Book.Properties.lang == event.getAffectedEditor()) {
+ book.setLang((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.Book.Properties.version == event.getAffectedEditor()) {
+ book.setVersion((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ BookPropertiesEditionPart basePart = (BookPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getBook_Chapter().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Book.Properties.chapter)) {
+ basePart.updateChapter();
+ }
+ if (DocbookPackage.eINSTANCE.getBook_Id().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Book.Properties.id)) {
+ if (msg.getNewValue() != null) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setId("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getBook_Lang().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Book.Properties.lang)) {
+ if (msg.getNewValue() != null) {
+ basePart.setLang(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setLang("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getBook_Version().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Book.Properties.version)) {
+ if (msg.getNewValue() != null) {
+ basePart.setVersion(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setVersion("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getBook_Chapter(), DocbookPackage.eINSTANCE.getBook_Id(),
+ DocbookPackage.eINSTANCE.getBook_Lang(), DocbookPackage.eINSTANCE.getBook_Version());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Book.Properties.id == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getBook_Id().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getBook_Id().getEAttributeType(), newValue);
+ }
+ if (DocbookViewsRepository.Book.Properties.lang == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getBook_Lang().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getBook_Lang().getEAttributeType(), newValue);
+ }
+ if (DocbookViewsRepository.Book.Properties.version == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getBook_Version().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getBook_Version().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ChapterPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ChapterPropertiesEditionComponent.java
new file mode 100644
index 0000000000..e1a729d327
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ChapterPropertiesEditionComponent.java
@@ -0,0 +1,301 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.Chapter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+import org.eclipse.sirius.tests.sample.docbook.Sect1;
+import org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ChapterPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for para ReferencesTable
+ */
+ protected ReferencesTableSettings paraSettings;
+
+ /**
+ * Settings for sect1 ReferencesTable
+ */
+ protected ReferencesTableSettings sect1Settings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public ChapterPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject chapter, String editing_mode) {
+ super(editingContext, chapter, editing_mode);
+ parts = new String[] { ChapterPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Chapter.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Chapter chapter = (Chapter) elt;
+ final ChapterPropertiesEditionPart basePart = (ChapterPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Chapter.Properties.para)) {
+ paraSettings = new ReferencesTableSettings(chapter, DocbookPackage.eINSTANCE.getChapter_Para());
+ basePart.initPara(paraSettings);
+ }
+ if (isAccessible(DocbookViewsRepository.Chapter.Properties.sect1)) {
+ sect1Settings = new ReferencesTableSettings(chapter, DocbookPackage.eINSTANCE.getChapter_Sect1());
+ basePart.initSect1(sect1Settings);
+ }
+ if (isAccessible(DocbookViewsRepository.Chapter.Properties.id)) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, chapter.getId()));
+ }
+
+ // init filters
+ if (isAccessible(DocbookViewsRepository.Chapter.Properties.para)) {
+ basePart.addFilterToPara(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Para); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for para
+ // End of user code
+ }
+ if (isAccessible(DocbookViewsRepository.Chapter.Properties.sect1)) {
+ basePart.addFilterToSect1(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Sect1); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for sect1
+ // End of user code
+ }
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Chapter.Properties.para) {
+ return DocbookPackage.eINSTANCE.getChapter_Para();
+ }
+ if (editorKey == DocbookViewsRepository.Chapter.Properties.sect1) {
+ return DocbookPackage.eINSTANCE.getChapter_Sect1();
+ }
+ if (editorKey == DocbookViewsRepository.Chapter.Properties.id) {
+ return DocbookPackage.eINSTANCE.getChapter_Id();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Chapter chapter = (Chapter) semanticObject;
+ if (DocbookViewsRepository.Chapter.Properties.para == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, paraSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ paraSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ paraSettings.move(event.getNewIndex(), (Para) event.getNewValue());
+ }
+ }
+ if (DocbookViewsRepository.Chapter.Properties.sect1 == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, sect1Settings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ sect1Settings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ sect1Settings.move(event.getNewIndex(), (Sect1) event.getNewValue());
+ }
+ }
+ if (DocbookViewsRepository.Chapter.Properties.id == event.getAffectedEditor()) {
+ chapter.setId((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ ChapterPropertiesEditionPart basePart = (ChapterPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getChapter_Para().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Chapter.Properties.para)) {
+ basePart.updatePara();
+ }
+ if (DocbookPackage.eINSTANCE.getChapter_Sect1().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Chapter.Properties.sect1)) {
+ basePart.updateSect1();
+ }
+ if (DocbookPackage.eINSTANCE.getChapter_Id().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Chapter.Properties.id)) {
+ if (msg.getNewValue() != null) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setId("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getChapter_Para(), DocbookPackage.eINSTANCE.getChapter_Sect1(),
+ DocbookPackage.eINSTANCE.getChapter_Id());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Chapter.Properties.id == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getChapter_Id().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getChapter_Id().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/EmphasisPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/EmphasisPropertiesEditionComponent.java
new file mode 100644
index 0000000000..4cbfc90813
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/EmphasisPropertiesEditionComponent.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Emphasis;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.EmphasisPropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class EmphasisPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Default constructor
+ *
+ */
+ public EmphasisPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject emphasis, String editing_mode) {
+ super(editingContext, emphasis, editing_mode);
+ parts = new String[] { EmphasisPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Emphasis.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Emphasis emphasis = (Emphasis) elt;
+ final EmphasisPropertiesEditionPart basePart = (EmphasisPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Emphasis.Properties.remap)) {
+ basePart.setRemap(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, emphasis.getRemap()));
+ }
+
+ // init filters
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Emphasis.Properties.remap) {
+ return DocbookPackage.eINSTANCE.getEmphasis_Remap();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Emphasis emphasis = (Emphasis) semanticObject;
+ if (DocbookViewsRepository.Emphasis.Properties.remap == event.getAffectedEditor()) {
+ emphasis.setRemap((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ EmphasisPropertiesEditionPart basePart = (EmphasisPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getEmphasis_Remap().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Emphasis.Properties.remap)) {
+ if (msg.getNewValue() != null) {
+ basePart.setRemap(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setRemap("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getEmphasis_Remap());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Emphasis.Properties.remap == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getEmphasis_Remap().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getEmphasis_Remap().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ExamplePropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ExamplePropertiesEditionComponent.java
new file mode 100644
index 0000000000..c1b2d6c022
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ExamplePropertiesEditionComponent.java
@@ -0,0 +1,212 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Example;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ExamplePropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for para ReferencesTable
+ */
+ protected ReferencesTableSettings paraSettings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public ExamplePropertiesEditionComponent(PropertiesEditingContext editingContext, EObject example, String editing_mode) {
+ super(editingContext, example, editing_mode);
+ parts = new String[] { ExamplePropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Example.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Example example = (Example) elt;
+ final ExamplePropertiesEditionPart basePart = (ExamplePropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Example.Properties.para)) {
+ paraSettings = new ReferencesTableSettings(example, DocbookPackage.eINSTANCE.getAbstractSect_Para());
+ basePart.initPara(paraSettings);
+ }
+ // init filters
+ if (isAccessible(DocbookViewsRepository.Example.Properties.para)) {
+ basePart.addFilterToPara(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Para); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for para
+ // End of user code
+ }
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Example.Properties.para) {
+ return DocbookPackage.eINSTANCE.getAbstractSect_Para();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Example example = (Example) semanticObject;
+ if (DocbookViewsRepository.Example.Properties.para == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, paraSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ paraSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ paraSettings.move(event.getNewIndex(), (Para) event.getNewValue());
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ ExamplePropertiesEditionPart basePart = (ExamplePropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getAbstractSect_Para().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Example.Properties.para)) {
+ basePart.updatePara();
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getAbstractSect_Para());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/InfoPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/InfoPropertiesEditionComponent.java
new file mode 100644
index 0000000000..576dc4e825
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/InfoPropertiesEditionComponent.java
@@ -0,0 +1,268 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.Author;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Info;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class InfoPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for author ReferencesTable
+ */
+ protected ReferencesTableSettings authorSettings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public InfoPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject info, String editing_mode) {
+ super(editingContext, info, editing_mode);
+ parts = new String[] { InfoPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Info.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Info info = (Info) elt;
+ final InfoPropertiesEditionPart basePart = (InfoPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Info.Properties.author)) {
+ authorSettings = new ReferencesTableSettings(info, DocbookPackage.eINSTANCE.getInfo_Author());
+ basePart.initAuthor(authorSettings);
+ }
+ if (isAccessible(DocbookViewsRepository.Info.Properties.date)) {
+ basePart.setDate(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, info.getDate()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.Info.Properties.pubdate)) {
+ basePart.setPubdate(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, info.getPubdate()));
+ }
+
+ // init filters
+ if (isAccessible(DocbookViewsRepository.Info.Properties.author)) {
+ basePart.addFilterToAuthor(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Author); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for author
+ // End of user code
+ }
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Info.Properties.author) {
+ return DocbookPackage.eINSTANCE.getInfo_Author();
+ }
+ if (editorKey == DocbookViewsRepository.Info.Properties.date) {
+ return DocbookPackage.eINSTANCE.getInfo_Date();
+ }
+ if (editorKey == DocbookViewsRepository.Info.Properties.pubdate) {
+ return DocbookPackage.eINSTANCE.getInfo_Pubdate();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Info info = (Info) semanticObject;
+ if (DocbookViewsRepository.Info.Properties.author == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, authorSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ authorSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ authorSettings.move(event.getNewIndex(), (Author) event.getNewValue());
+ }
+ }
+ if (DocbookViewsRepository.Info.Properties.date == event.getAffectedEditor()) {
+ info.setDate((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.Info.Properties.pubdate == event.getAffectedEditor()) {
+ info.setPubdate((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ InfoPropertiesEditionPart basePart = (InfoPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getInfo_Author().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Info.Properties.author)) {
+ basePart.updateAuthor();
+ }
+ if (DocbookPackage.eINSTANCE.getInfo_Date().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Info.Properties.date)) {
+ if (msg.getNewValue() != null) {
+ basePart.setDate(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setDate("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getInfo_Pubdate().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Info.Properties.pubdate)) {
+ if (msg.getNewValue() != null) {
+ basePart.setPubdate(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setPubdate("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getInfo_Author(), DocbookPackage.eINSTANCE.getInfo_Date(),
+ DocbookPackage.eINSTANCE.getInfo_Pubdate());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Info.Properties.date == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getInfo_Date().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getInfo_Date().getEAttributeType(), newValue);
+ }
+ if (DocbookViewsRepository.Info.Properties.pubdate == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getInfo_Pubdate().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getInfo_Pubdate().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ItemizedListPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ItemizedListPropertiesEditionComponent.java
new file mode 100644
index 0000000000..dd15998cda
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ItemizedListPropertiesEditionComponent.java
@@ -0,0 +1,243 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.ItemizedList;
+import org.eclipse.sirius.tests.sample.docbook.ListItem;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ItemizedListPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for listitem ReferencesTable
+ */
+ protected ReferencesTableSettings listitemSettings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public ItemizedListPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject itemizedList, String editing_mode) {
+ super(editingContext, itemizedList, editing_mode);
+ parts = new String[] { ItemizedListPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.ItemizedList.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final ItemizedList itemizedList = (ItemizedList) elt;
+ final ItemizedListPropertiesEditionPart basePart = (ItemizedListPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.ItemizedList.Properties.mark)) {
+ basePart.setMark(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, itemizedList.getMark()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.ItemizedList.Properties.listitem)) {
+ listitemSettings = new ReferencesTableSettings(itemizedList, DocbookPackage.eINSTANCE.getItemizedList_Listitem());
+ basePart.initListitem(listitemSettings);
+ }
+ // init filters
+
+ if (isAccessible(DocbookViewsRepository.ItemizedList.Properties.listitem)) {
+ basePart.addFilterToListitem(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof ListItem); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for
+ // listitem
+ // End of user code
+ }
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.ItemizedList.Properties.mark) {
+ return DocbookPackage.eINSTANCE.getItemizedList_Mark();
+ }
+ if (editorKey == DocbookViewsRepository.ItemizedList.Properties.listitem) {
+ return DocbookPackage.eINSTANCE.getItemizedList_Listitem();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ ItemizedList itemizedList = (ItemizedList) semanticObject;
+ if (DocbookViewsRepository.ItemizedList.Properties.mark == event.getAffectedEditor()) {
+ itemizedList.setMark((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.ItemizedList.Properties.listitem == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, listitemSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ listitemSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ listitemSettings.move(event.getNewIndex(), (ListItem) event.getNewValue());
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ ItemizedListPropertiesEditionPart basePart = (ItemizedListPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getItemizedList_Mark().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.ItemizedList.Properties.mark)) {
+ if (msg.getNewValue() != null) {
+ basePart.setMark(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setMark("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getItemizedList_Listitem().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.ItemizedList.Properties.listitem)) {
+ basePart.updateListitem();
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getItemizedList_Mark(), DocbookPackage.eINSTANCE.getItemizedList_Listitem());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.ItemizedList.Properties.mark == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getItemizedList_Mark().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getItemizedList_Mark().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/OrderedListPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/OrderedListPropertiesEditionComponent.java
new file mode 100644
index 0000000000..a9454140c5
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/OrderedListPropertiesEditionComponent.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.OrderedList;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.OrderedListPropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class OrderedListPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Default constructor
+ *
+ */
+ public OrderedListPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject orderedList, String editing_mode) {
+ super(editingContext, orderedList, editing_mode);
+ parts = new String[] { OrderedListPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.OrderedList.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final OrderedList orderedList = (OrderedList) elt;
+ final OrderedListPropertiesEditionPart basePart = (OrderedListPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.OrderedList.Properties.numeration)) {
+ basePart.setNumeration(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, orderedList.getNumeration()));
+ }
+
+ // init filters
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.OrderedList.Properties.numeration) {
+ return DocbookPackage.eINSTANCE.getOrderedList_Numeration();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ OrderedList orderedList = (OrderedList) semanticObject;
+ if (DocbookViewsRepository.OrderedList.Properties.numeration == event.getAffectedEditor()) {
+ orderedList.setNumeration((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ OrderedListPropertiesEditionPart basePart = (OrderedListPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getOrderedList_Numeration().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.OrderedList.Properties.numeration)) {
+ if (msg.getNewValue() != null) {
+ basePart.setNumeration(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setNumeration("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getOrderedList_Numeration());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.OrderedList.Properties.numeration == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getOrderedList_Numeration().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getOrderedList_Numeration().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ParaPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ParaPropertiesEditionComponent.java
new file mode 100644
index 0000000000..432adeb869
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ParaPropertiesEditionComponent.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ParaPropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ParaPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Default constructor
+ *
+ */
+ public ParaPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject para, String editing_mode) {
+ super(editingContext, para, editing_mode);
+ parts = new String[] { ParaPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Para.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Para para = (Para) elt;
+ final ParaPropertiesEditionPart basePart = (ParaPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Para.Properties.data)) {
+ basePart.setData(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, para.getData()));
+ }
+
+ // init filters
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Para.Properties.data) {
+ return DocbookPackage.eINSTANCE.getPara_Data();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Para para = (Para) semanticObject;
+ if (DocbookViewsRepository.Para.Properties.data == event.getAffectedEditor()) {
+ para.setData((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ ParaPropertiesEditionPart basePart = (ParaPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getPara_Data().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Para.Properties.data)) {
+ if (msg.getNewValue() != null) {
+ basePart.setData(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setData("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getPara_Data());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Para.Properties.data == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getPara_Data().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getPara_Data().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect1PropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect1PropertiesEditionComponent.java
new file mode 100644
index 0000000000..d8159b03da
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect1PropertiesEditionComponent.java
@@ -0,0 +1,301 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+import org.eclipse.sirius.tests.sample.docbook.Sect1;
+import org.eclipse.sirius.tests.sample.docbook.Sect2;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect1PropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for para ReferencesTable
+ */
+ protected ReferencesTableSettings paraSettings;
+
+ /**
+ * Settings for sect2 ReferencesTable
+ */
+ protected ReferencesTableSettings sect2Settings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public Sect1PropertiesEditionComponent(PropertiesEditingContext editingContext, EObject sect1, String editing_mode) {
+ super(editingContext, sect1, editing_mode);
+ parts = new String[] { Sect1PropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Sect1.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Sect1 sect1 = (Sect1) elt;
+ final Sect1PropertiesEditionPart basePart = (Sect1PropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Sect1.Properties.para)) {
+ paraSettings = new ReferencesTableSettings(sect1, DocbookPackage.eINSTANCE.getAbstractSect_Para());
+ basePart.initPara(paraSettings);
+ }
+ if (isAccessible(DocbookViewsRepository.Sect1.Properties.id)) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, sect1.getId()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.Sect1.Properties.sect2)) {
+ sect2Settings = new ReferencesTableSettings(sect1, DocbookPackage.eINSTANCE.getSect1_Sect2());
+ basePart.initSect2(sect2Settings);
+ }
+ // init filters
+ if (isAccessible(DocbookViewsRepository.Sect1.Properties.para)) {
+ basePart.addFilterToPara(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Para); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for para
+ // End of user code
+ }
+
+ if (isAccessible(DocbookViewsRepository.Sect1.Properties.sect2)) {
+ basePart.addFilterToSect2(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Sect2); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for sect2
+ // End of user code
+ }
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Sect1.Properties.para) {
+ return DocbookPackage.eINSTANCE.getAbstractSect_Para();
+ }
+ if (editorKey == DocbookViewsRepository.Sect1.Properties.id) {
+ return DocbookPackage.eINSTANCE.getSect1_Id();
+ }
+ if (editorKey == DocbookViewsRepository.Sect1.Properties.sect2) {
+ return DocbookPackage.eINSTANCE.getSect1_Sect2();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Sect1 sect1 = (Sect1) semanticObject;
+ if (DocbookViewsRepository.Sect1.Properties.para == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, paraSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ paraSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ paraSettings.move(event.getNewIndex(), (Para) event.getNewValue());
+ }
+ }
+ if (DocbookViewsRepository.Sect1.Properties.id == event.getAffectedEditor()) {
+ sect1.setId((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.Sect1.Properties.sect2 == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, sect2Settings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ sect2Settings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ sect2Settings.move(event.getNewIndex(), (Sect2) event.getNewValue());
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ Sect1PropertiesEditionPart basePart = (Sect1PropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getAbstractSect_Para().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Sect1.Properties.para)) {
+ basePart.updatePara();
+ }
+ if (DocbookPackage.eINSTANCE.getSect1_Id().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Sect1.Properties.id)) {
+ if (msg.getNewValue() != null) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setId("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getSect1_Sect2().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Sect1.Properties.sect2)) {
+ basePart.updateSect2();
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getAbstractSect_Para(), DocbookPackage.eINSTANCE.getSect1_Id(),
+ DocbookPackage.eINSTANCE.getSect1_Sect2());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Sect1.Properties.id == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getSect1_Id().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getSect1_Id().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect2PropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect2PropertiesEditionComponent.java
new file mode 100644
index 0000000000..82021bdc11
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect2PropertiesEditionComponent.java
@@ -0,0 +1,301 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+import org.eclipse.sirius.tests.sample.docbook.Sect2;
+import org.eclipse.sirius.tests.sample.docbook.Sect3;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect2PropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for para ReferencesTable
+ */
+ protected ReferencesTableSettings paraSettings;
+
+ /**
+ * Settings for sect3 ReferencesTable
+ */
+ protected ReferencesTableSettings sect3Settings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public Sect2PropertiesEditionComponent(PropertiesEditingContext editingContext, EObject sect2, String editing_mode) {
+ super(editingContext, sect2, editing_mode);
+ parts = new String[] { Sect2PropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Sect2.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Sect2 sect2 = (Sect2) elt;
+ final Sect2PropertiesEditionPart basePart = (Sect2PropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Sect2.Properties.para)) {
+ paraSettings = new ReferencesTableSettings(sect2, DocbookPackage.eINSTANCE.getAbstractSect_Para());
+ basePart.initPara(paraSettings);
+ }
+ if (isAccessible(DocbookViewsRepository.Sect2.Properties.id)) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, sect2.getId()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.Sect2.Properties.sect3)) {
+ sect3Settings = new ReferencesTableSettings(sect2, DocbookPackage.eINSTANCE.getSect2_Sect3());
+ basePart.initSect3(sect3Settings);
+ }
+ // init filters
+ if (isAccessible(DocbookViewsRepository.Sect2.Properties.para)) {
+ basePart.addFilterToPara(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Para); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for para
+ // End of user code
+ }
+
+ if (isAccessible(DocbookViewsRepository.Sect2.Properties.sect3)) {
+ basePart.addFilterToSect3(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Sect3); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for sect3
+ // End of user code
+ }
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Sect2.Properties.para) {
+ return DocbookPackage.eINSTANCE.getAbstractSect_Para();
+ }
+ if (editorKey == DocbookViewsRepository.Sect2.Properties.id) {
+ return DocbookPackage.eINSTANCE.getSect2_Id();
+ }
+ if (editorKey == DocbookViewsRepository.Sect2.Properties.sect3) {
+ return DocbookPackage.eINSTANCE.getSect2_Sect3();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Sect2 sect2 = (Sect2) semanticObject;
+ if (DocbookViewsRepository.Sect2.Properties.para == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, paraSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ paraSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ paraSettings.move(event.getNewIndex(), (Para) event.getNewValue());
+ }
+ }
+ if (DocbookViewsRepository.Sect2.Properties.id == event.getAffectedEditor()) {
+ sect2.setId((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.Sect2.Properties.sect3 == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, sect3Settings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ sect3Settings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ sect3Settings.move(event.getNewIndex(), (Sect3) event.getNewValue());
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ Sect2PropertiesEditionPart basePart = (Sect2PropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getAbstractSect_Para().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Sect2.Properties.para)) {
+ basePart.updatePara();
+ }
+ if (DocbookPackage.eINSTANCE.getSect2_Id().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Sect2.Properties.id)) {
+ if (msg.getNewValue() != null) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setId("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getSect2_Sect3().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Sect2.Properties.sect3)) {
+ basePart.updateSect3();
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getAbstractSect_Para(), DocbookPackage.eINSTANCE.getSect2_Id(),
+ DocbookPackage.eINSTANCE.getSect2_Sect3());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Sect2.Properties.id == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getSect2_Id().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getSect2_Id().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect3PropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect3PropertiesEditionComponent.java
new file mode 100644
index 0000000000..17afd936de
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/Sect3PropertiesEditionComponent.java
@@ -0,0 +1,242 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.context.impl.EReferencePropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
+import org.eclipse.emf.eef.runtime.policies.impl.CreateEditingPolicy;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+import org.eclipse.sirius.tests.sample.docbook.Sect3;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect3PropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Settings for para ReferencesTable
+ */
+ protected ReferencesTableSettings paraSettings;
+
+ /**
+ * Default constructor
+ *
+ */
+ public Sect3PropertiesEditionComponent(PropertiesEditingContext editingContext, EObject sect3, String editing_mode) {
+ super(editingContext, sect3, editing_mode);
+ parts = new String[] { Sect3PropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Sect3.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Sect3 sect3 = (Sect3) elt;
+ final Sect3PropertiesEditionPart basePart = (Sect3PropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Sect3.Properties.para)) {
+ paraSettings = new ReferencesTableSettings(sect3, DocbookPackage.eINSTANCE.getAbstractSect_Para());
+ basePart.initPara(paraSettings);
+ }
+ if (isAccessible(DocbookViewsRepository.Sect3.Properties.id)) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, sect3.getId()));
+ }
+
+ // init filters
+ if (isAccessible(DocbookViewsRepository.Sect3.Properties.para)) {
+ basePart.addFilterToPara(new ViewerFilter() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ return (element instanceof String && element.equals("")) || (element instanceof Para); //$NON-NLS-1$
+ }
+
+ });
+ // Start of user code for additional businessfilters for para
+ // End of user code
+ }
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Sect3.Properties.para) {
+ return DocbookPackage.eINSTANCE.getAbstractSect_Para();
+ }
+ if (editorKey == DocbookViewsRepository.Sect3.Properties.id) {
+ return DocbookPackage.eINSTANCE.getSect3_Id();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Sect3 sect3 = (Sect3) semanticObject;
+ if (DocbookViewsRepository.Sect3.Properties.para == event.getAffectedEditor()) {
+ if (event.getKind() == PropertiesEditionEvent.ADD) {
+ EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, paraSettings, editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy policy = provider.getPolicy(context);
+ if (policy instanceof CreateEditingPolicy) {
+ policy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.EDIT) {
+ EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
+ PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
+ if (provider != null) {
+ PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
+ if (editionPolicy != null) {
+ editionPolicy.execute();
+ }
+ }
+ } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
+ paraSettings.removeFromReference((EObject) event.getNewValue());
+ } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
+ paraSettings.move(event.getNewIndex(), (Para) event.getNewValue());
+ }
+ }
+ if (DocbookViewsRepository.Sect3.Properties.id == event.getAffectedEditor()) {
+ sect3.setId((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ Sect3PropertiesEditionPart basePart = (Sect3PropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getAbstractSect_Para().equals(msg.getFeature()) && isAccessible(DocbookViewsRepository.Sect3.Properties.para)) {
+ basePart.updatePara();
+ }
+ if (DocbookPackage.eINSTANCE.getSect3_Id().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Sect3.Properties.id)) {
+ if (msg.getNewValue() != null) {
+ basePart.setId(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setId("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getAbstractSect_Para(), DocbookPackage.eINSTANCE.getSect3_Id());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Sect3.Properties.id == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getSect3_Id().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getSect3_Id().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/TitlePropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/TitlePropertiesEditionComponent.java
new file mode 100644
index 0000000000..68f9cf2315
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/TitlePropertiesEditionComponent.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Title;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Title_PropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class TitlePropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Default constructor
+ *
+ */
+ public TitlePropertiesEditionComponent(PropertiesEditingContext editingContext, EObject title_, String editing_mode) {
+ super(editingContext, title_, editing_mode);
+ parts = new String[] { TitlePropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.Title_.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final Title title_ = (Title) elt;
+ final Title_PropertiesEditionPart basePart = (Title_PropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.Title_.Properties.data)) {
+ basePart.setData(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, title_.getData()));
+ }
+
+ // init filters
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.Title_.Properties.data) {
+ return DocbookPackage.eINSTANCE.getTitle_Data();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ Title title_ = (Title) semanticObject;
+ if (DocbookViewsRepository.Title_.Properties.data == event.getAffectedEditor()) {
+ title_.setData((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ Title_PropertiesEditionPart basePart = (Title_PropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getTitle_Data().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.Title_.Properties.data)) {
+ if (msg.getNewValue() != null) {
+ basePart.setData(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setData("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getTitle_Data());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.Title_.Properties.data == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getTitle_Data().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getTitle_Data().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ULinkPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ULinkPropertiesEditionComponent.java
new file mode 100644
index 0000000000..b7fbb7c58b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/ULinkPropertiesEditionComponent.java
@@ -0,0 +1,200 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.ULink;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ULinkPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Default constructor
+ *
+ */
+ public ULinkPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject uLink, String editing_mode) {
+ super(editingContext, uLink, editing_mode);
+ parts = new String[] { ULinkPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.ULink.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final ULink uLink = (ULink) elt;
+ final ULinkPropertiesEditionPart basePart = (ULinkPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.ULink.Properties.url)) {
+ basePart.setUrl(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, uLink.getUrl()));
+ }
+
+ if (isAccessible(DocbookViewsRepository.ULink.Properties.data)) {
+ basePart.setData(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, uLink.getData()));
+ }
+
+ // init filters
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.ULink.Properties.url) {
+ return DocbookPackage.eINSTANCE.getULink_Url();
+ }
+ if (editorKey == DocbookViewsRepository.ULink.Properties.data) {
+ return DocbookPackage.eINSTANCE.getULink_Data();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ ULink uLink = (ULink) semanticObject;
+ if (DocbookViewsRepository.ULink.Properties.url == event.getAffectedEditor()) {
+ uLink.setUrl((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ if (DocbookViewsRepository.ULink.Properties.data == event.getAffectedEditor()) {
+ uLink.setData((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ ULinkPropertiesEditionPart basePart = (ULinkPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getULink_Url().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.ULink.Properties.url)) {
+ if (msg.getNewValue() != null) {
+ basePart.setUrl(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setUrl("");
+ }
+ }
+ if (DocbookPackage.eINSTANCE.getULink_Data().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.ULink.Properties.data)) {
+ if (msg.getNewValue() != null) {
+ basePart.setData(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setData("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getULink_Url(), DocbookPackage.eINSTANCE.getULink_Data());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.ULink.Properties.url == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getULink_Url().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getULink_Url().getEAttributeType(), newValue);
+ }
+ if (DocbookViewsRepository.ULink.Properties.data == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getULink_Data().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getULink_Data().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/XRefPropertiesEditionComponent.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/XRefPropertiesEditionComponent.java
new file mode 100644
index 0000000000..76e43a937d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/components/XRefPropertiesEditionComponent.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.components;
+
+// Start of user code for imports
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.eef.runtime.api.notify.EStructuralFeatureNotificationFilter;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.notify.NotificationFilter;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
+import org.eclipse.sirius.eef.components.SiriusAwarePropertiesEditingComponent;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.XRef;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.XRefPropertiesEditionPart;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class XRefPropertiesEditionComponent extends SiriusAwarePropertiesEditingComponent {
+
+ public static String BASE_PART = "Base"; //$NON-NLS-1$
+
+ /**
+ * Default constructor
+ *
+ */
+ public XRefPropertiesEditionComponent(PropertiesEditingContext editingContext, EObject xRef, String editing_mode) {
+ super(editingContext, xRef, editing_mode);
+ parts = new String[] { XRefPropertiesEditionComponent.BASE_PART };
+ repositoryKey = DocbookViewsRepository.class;
+ partKey = DocbookViewsRepository.XRef.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object,
+ * int, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.ecore.resource.ResourceSet)
+ *
+ */
+ @Override
+ public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
+ setInitializing(true);
+ if (editingPart != null && key == partKey) {
+ editingPart.setContext(elt, allResource);
+
+ final XRef xRef = (XRef) elt;
+ final XRefPropertiesEditionPart basePart = (XRefPropertiesEditionPart) editingPart;
+ // init values
+ if (isAccessible(DocbookViewsRepository.XRef.Properties.linkend)) {
+ basePart.setLinkend(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, xRef.getLinkend()));
+ }
+
+ // init filters
+
+ // init values for referenced views
+
+ // init filters for referenced views
+
+ }
+ setInitializing(false);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
+ */
+ @Override
+ public EStructuralFeature associatedFeature(Object editorKey) {
+ if (editorKey == DocbookViewsRepository.XRef.Properties.linkend) {
+ return DocbookPackage.eINSTANCE.getXRef_Linkend();
+ }
+ return super.associatedFeature(editorKey);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void updateSemanticModel(final IPropertiesEditionEvent event) {
+ XRef xRef = (XRef) semanticObject;
+ if (DocbookViewsRepository.XRef.Properties.linkend == event.getAffectedEditor()) {
+ xRef.setLinkend((java.lang.String) EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String) event.getNewValue()));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void updatePart(Notification msg) {
+ super.updatePart(msg);
+ if (editingPart.isVisible()) {
+ XRefPropertiesEditionPart basePart = (XRefPropertiesEditionPart) editingPart;
+ if (DocbookPackage.eINSTANCE.getXRef_Linkend().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null
+ && isAccessible(DocbookViewsRepository.XRef.Properties.linkend)) {
+ if (msg.getNewValue() != null) {
+ basePart.setLinkend(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
+ } else {
+ basePart.setLinkend("");
+ }
+ }
+
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getNotificationFilters()
+ */
+ @Override
+ protected NotificationFilter[] getNotificationFilters() {
+ NotificationFilter filter = new EStructuralFeatureNotificationFilter(DocbookPackage.eINSTANCE.getXRef_Linkend());
+ return new NotificationFilter[] { filter, };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public Diagnostic validateValue(IPropertiesEditionEvent event) {
+ Diagnostic ret = Diagnostic.OK_INSTANCE;
+ if (event.getNewValue() != null) {
+ try {
+ if (DocbookViewsRepository.XRef.Properties.linkend == event.getAffectedEditor()) {
+ Object newValue = event.getNewValue();
+ if (newValue instanceof String) {
+ newValue = EEFConverterUtil.createFromString(DocbookPackage.eINSTANCE.getXRef_Linkend().getEAttributeType(), (String) newValue);
+ }
+ ret = Diagnostician.INSTANCE.validate(DocbookPackage.eINSTANCE.getXRef_Linkend().getEAttributeType(), newValue);
+ }
+ } catch (IllegalArgumentException iae) {
+ ret = BasicDiagnostic.toDiagnostic(iae);
+ } catch (WrappedException we) {
+ ret = BasicDiagnostic.toDiagnostic(we);
+ }
+ }
+ return ret;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/AuthorPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/AuthorPropertiesEditionPart.java
new file mode 100644
index 0000000000..844423a5c1
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/AuthorPropertiesEditionPart.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface AuthorPropertiesEditionPart {
+
+ /**
+ * @return the email
+ *
+ */
+ public String getEmail();
+
+ /**
+ * Defines a new email
+ *
+ * @param newValue
+ * the new email to set
+ *
+ */
+ public void setEmail(String newValue);
+
+ /**
+ * @return the personname
+ *
+ */
+ public String getPersonname();
+
+ /**
+ * Defines a new personname
+ *
+ * @param newValue
+ * the new personname to set
+ *
+ */
+ public void setPersonname(String newValue);
+
+ /**
+ * @return the address
+ *
+ */
+ public String getAddress();
+
+ /**
+ * Defines a new address
+ *
+ * @param newValue
+ * the new address to set
+ *
+ */
+ public void setAddress(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/BookPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/BookPropertiesEditionPart.java
new file mode 100644
index 0000000000..42e86b8f4d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/BookPropertiesEditionPart.java
@@ -0,0 +1,131 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface BookPropertiesEditionPart {
+
+ /**
+ * Init the chapter
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initChapter(ReferencesTableSettings settings);
+
+ /**
+ * Update the chapter
+ *
+ * @param newValue
+ * the chapter to update
+ *
+ */
+ public void updateChapter();
+
+ /**
+ * Adds the given filter to the chapter edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToChapter(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the chapter edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToChapter(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the chapter table
+ *
+ */
+ public boolean isContainedInChapterTable(EObject element);
+
+ /**
+ * @return the id
+ *
+ */
+ public String getId();
+
+ /**
+ * Defines a new id
+ *
+ * @param newValue
+ * the new id to set
+ *
+ */
+ public void setId(String newValue);
+
+ /**
+ * @return the lang
+ *
+ */
+ public String getLang();
+
+ /**
+ * Defines a new lang
+ *
+ * @param newValue
+ * the new lang to set
+ *
+ */
+ public void setLang(String newValue);
+
+ /**
+ * @return the version
+ *
+ */
+ public String getVersion();
+
+ /**
+ * Defines a new version
+ *
+ * @param newValue
+ * the new version to set
+ *
+ */
+ public void setVersion(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ChapterPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ChapterPropertiesEditionPart.java
new file mode 100644
index 0000000000..f8db6cb37b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ChapterPropertiesEditionPart.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface ChapterPropertiesEditionPart {
+
+ /**
+ * Init the para
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initPara(ReferencesTableSettings settings);
+
+ /**
+ * Update the para
+ *
+ * @param newValue
+ * the para to update
+ *
+ */
+ public void updatePara();
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToPara(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToPara(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the para table
+ *
+ */
+ public boolean isContainedInParaTable(EObject element);
+
+ /**
+ * Init the sect1
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initSect1(ReferencesTableSettings settings);
+
+ /**
+ * Update the sect1
+ *
+ * @param newValue
+ * the sect1 to update
+ *
+ */
+ public void updateSect1();
+
+ /**
+ * Adds the given filter to the sect1 edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToSect1(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the sect1 edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToSect1(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the sect1 table
+ *
+ */
+ public boolean isContainedInSect1Table(EObject element);
+
+ /**
+ * @return the id
+ *
+ */
+ public String getId();
+
+ /**
+ * Defines a new id
+ *
+ * @param newValue
+ * the new id to set
+ *
+ */
+ public void setId(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/DocbookViewsRepository.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/DocbookViewsRepository.java
new file mode 100644
index 0000000000..5ae8080450
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/DocbookViewsRepository.java
@@ -0,0 +1,272 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+/**
+ *
+ *
+ */
+public class DocbookViewsRepository {
+
+ public static final int SWT_KIND = 0;
+
+ public static final int FORM_KIND = 1;
+
+ /**
+ * Book view descriptor
+ *
+ */
+ public static class Book {
+ public static class Properties {
+
+ public static String chapter = "docbook::Book::properties::chapter";
+
+ public static String id = "docbook::Book::properties::id";
+
+ public static String lang = "docbook::Book::properties::lang";
+
+ public static String version = "docbook::Book::properties::version";
+
+ }
+
+ }
+
+ /**
+ * Info view descriptor
+ *
+ */
+ public static class Info {
+ public static class Properties {
+
+ public static String author = "docbook::Info::properties::author";
+
+ public static String date = "docbook::Info::properties::date";
+
+ public static String pubdate = "docbook::Info::properties::pubdate";
+
+ }
+
+ }
+
+ /**
+ * Author view descriptor
+ *
+ */
+ public static class Author {
+ public static class Properties {
+
+ public static String email = "docbook::Author::properties::email";
+
+ public static String personname = "docbook::Author::properties::personname";
+
+ public static String address = "docbook::Author::properties::address";
+
+ }
+
+ }
+
+ /**
+ * Chapter view descriptor
+ *
+ */
+ public static class Chapter {
+ public static class Properties {
+
+ public static String para = "docbook::Chapter::properties::para";
+
+ public static String sect1 = "docbook::Chapter::properties::sect1";
+
+ public static String id = "docbook::Chapter::properties::id";
+
+ }
+
+ }
+
+ /**
+ * Title view descriptor
+ *
+ */
+ public static class Title_ {
+ public static class Properties {
+
+ public static String data = "docbook::Title::properties::data";
+
+ }
+
+ }
+
+ /**
+ * Para view descriptor
+ *
+ */
+ public static class Para {
+ public static class Properties {
+
+ public static String data = "docbook::Para::properties::data";
+
+ }
+
+ }
+
+ /**
+ * SimpleList view descriptor
+ *
+ */
+ public static class SimpleList {
+ }
+
+ /**
+ * ItemizedList view descriptor
+ *
+ */
+ public static class ItemizedList {
+ public static class Properties {
+
+ public static String mark = "docbook::ItemizedList::properties::mark";
+
+ public static String listitem = "docbook::ItemizedList::properties::listitem";
+
+ }
+
+ }
+
+ /**
+ * OrderedList view descriptor
+ *
+ */
+ public static class OrderedList {
+ public static class Properties {
+
+ public static String numeration = "docbook::OrderedList::properties::numeration";
+
+ }
+
+ }
+
+ /**
+ * Sect1 view descriptor
+ *
+ */
+ public static class Sect1 {
+ public static class Properties {
+
+ public static String para = "docbook::Sect1::properties::para";
+
+ public static String id = "docbook::Sect1::properties::id";
+
+ public static String sect2 = "docbook::Sect1::properties::sect2";
+
+ }
+
+ }
+
+ /**
+ * Sect2 view descriptor
+ *
+ */
+ public static class Sect2 {
+ public static class Properties {
+
+ public static String para = "docbook::Sect2::properties::para";
+
+ public static String id = "docbook::Sect2::properties::id";
+
+ public static String sect3 = "docbook::Sect2::properties::sect3";
+
+ }
+
+ }
+
+ /**
+ * Emphasis view descriptor
+ *
+ */
+ public static class Emphasis {
+ public static class Properties {
+
+ public static String remap = "docbook::Emphasis::properties::remap";
+
+ }
+
+ }
+
+ /**
+ * ULink view descriptor
+ *
+ */
+ public static class ULink {
+ public static class Properties {
+
+ public static String url = "docbook::ULink::properties::url";
+
+ public static String data = "docbook::ULink::properties::data";
+
+ }
+
+ }
+
+ /**
+ * Link view descriptor
+ *
+ */
+ public static class Link {
+ }
+
+ /**
+ * XRef view descriptor
+ *
+ */
+ public static class XRef {
+ public static class Properties {
+
+ public static String linkend = "docbook::XRef::properties::linkend";
+
+ }
+
+ }
+
+ /**
+ * Example view descriptor
+ *
+ */
+ public static class Example {
+ public static class Properties {
+
+ public static String para = "docbook::Example::properties::para";
+
+ }
+
+ }
+
+ /**
+ * Sect3 view descriptor
+ *
+ */
+ public static class Sect3 {
+ public static class Properties {
+
+ public static String para = "docbook::Sect3::properties::para";
+
+ public static String id = "docbook::Sect3::properties::id";
+
+ }
+
+ }
+
+ /**
+ * ListItem view descriptor
+ *
+ */
+ public static class ListItem {
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/EmphasisPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/EmphasisPropertiesEditionPart.java
new file mode 100644
index 0000000000..9d43c2d33a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/EmphasisPropertiesEditionPart.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface EmphasisPropertiesEditionPart {
+
+ /**
+ * @return the remap
+ *
+ */
+ public String getRemap();
+
+ /**
+ * Defines a new remap
+ *
+ * @param newValue
+ * the new remap to set
+ *
+ */
+ public void setRemap(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ExamplePropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ExamplePropertiesEditionPart.java
new file mode 100644
index 0000000000..9dd20afb28
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ExamplePropertiesEditionPart.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface ExamplePropertiesEditionPart {
+
+ /**
+ * Init the para
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initPara(ReferencesTableSettings settings);
+
+ /**
+ * Update the para
+ *
+ * @param newValue
+ * the para to update
+ *
+ */
+ public void updatePara();
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToPara(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToPara(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the para table
+ *
+ */
+ public boolean isContainedInParaTable(EObject element);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/InfoPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/InfoPropertiesEditionPart.java
new file mode 100644
index 0000000000..3e1b75be9b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/InfoPropertiesEditionPart.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface InfoPropertiesEditionPart {
+
+ /**
+ * Init the author
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initAuthor(ReferencesTableSettings settings);
+
+ /**
+ * Update the author
+ *
+ * @param newValue
+ * the author to update
+ *
+ */
+ public void updateAuthor();
+
+ /**
+ * Adds the given filter to the author edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToAuthor(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the author edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToAuthor(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the author table
+ *
+ */
+ public boolean isContainedInAuthorTable(EObject element);
+
+ /**
+ * @return the date
+ *
+ */
+ public String getDate();
+
+ /**
+ * Defines a new date
+ *
+ * @param newValue
+ * the new date to set
+ *
+ */
+ public void setDate(String newValue);
+
+ /**
+ * @return the pubdate
+ *
+ */
+ public String getPubdate();
+
+ /**
+ * Defines a new pubdate
+ *
+ * @param newValue
+ * the new pubdate to set
+ *
+ */
+ public void setPubdate(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ItemizedListPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ItemizedListPropertiesEditionPart.java
new file mode 100644
index 0000000000..bb3936e30c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ItemizedListPropertiesEditionPart.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface ItemizedListPropertiesEditionPart {
+
+ /**
+ * @return the mark
+ *
+ */
+ public String getMark();
+
+ /**
+ * Defines a new mark
+ *
+ * @param newValue
+ * the new mark to set
+ *
+ */
+ public void setMark(String newValue);
+
+ /**
+ * Init the listitem
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initListitem(ReferencesTableSettings settings);
+
+ /**
+ * Update the listitem
+ *
+ * @param newValue
+ * the listitem to update
+ *
+ */
+ public void updateListitem();
+
+ /**
+ * Adds the given filter to the listitem edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToListitem(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the listitem edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToListitem(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the listitem table
+ *
+ */
+ public boolean isContainedInListitemTable(EObject element);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/LinkPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/LinkPropertiesEditionPart.java
new file mode 100644
index 0000000000..d145fa2aba
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/LinkPropertiesEditionPart.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface LinkPropertiesEditionPart {
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ListItemPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ListItemPropertiesEditionPart.java
new file mode 100644
index 0000000000..ead6467b4f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ListItemPropertiesEditionPart.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface ListItemPropertiesEditionPart {
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/OrderedListPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/OrderedListPropertiesEditionPart.java
new file mode 100644
index 0000000000..7a36f71677
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/OrderedListPropertiesEditionPart.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface OrderedListPropertiesEditionPart {
+
+ /**
+ * @return the numeration
+ *
+ */
+ public String getNumeration();
+
+ /**
+ * Defines a new numeration
+ *
+ * @param newValue
+ * the new numeration to set
+ *
+ */
+ public void setNumeration(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ParaPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ParaPropertiesEditionPart.java
new file mode 100644
index 0000000000..18a7fb63f5
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ParaPropertiesEditionPart.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface ParaPropertiesEditionPart {
+
+ /**
+ * @return the data
+ *
+ */
+ public String getData();
+
+ /**
+ * Defines a new data
+ *
+ * @param newValue
+ * the new data to set
+ *
+ */
+ public void setData(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect1PropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect1PropertiesEditionPart.java
new file mode 100644
index 0000000000..2b8c9b304b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect1PropertiesEditionPart.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface Sect1PropertiesEditionPart {
+
+ /**
+ * Init the para
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initPara(ReferencesTableSettings settings);
+
+ /**
+ * Update the para
+ *
+ * @param newValue
+ * the para to update
+ *
+ */
+ public void updatePara();
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToPara(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToPara(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the para table
+ *
+ */
+ public boolean isContainedInParaTable(EObject element);
+
+ /**
+ * @return the id
+ *
+ */
+ public String getId();
+
+ /**
+ * Defines a new id
+ *
+ * @param newValue
+ * the new id to set
+ *
+ */
+ public void setId(String newValue);
+
+ /**
+ * Init the sect2
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initSect2(ReferencesTableSettings settings);
+
+ /**
+ * Update the sect2
+ *
+ * @param newValue
+ * the sect2 to update
+ *
+ */
+ public void updateSect2();
+
+ /**
+ * Adds the given filter to the sect2 edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToSect2(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the sect2 edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToSect2(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the sect2 table
+ *
+ */
+ public boolean isContainedInSect2Table(EObject element);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect2PropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect2PropertiesEditionPart.java
new file mode 100644
index 0000000000..049b1efeff
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect2PropertiesEditionPart.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface Sect2PropertiesEditionPart {
+
+ /**
+ * Init the para
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initPara(ReferencesTableSettings settings);
+
+ /**
+ * Update the para
+ *
+ * @param newValue
+ * the para to update
+ *
+ */
+ public void updatePara();
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToPara(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToPara(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the para table
+ *
+ */
+ public boolean isContainedInParaTable(EObject element);
+
+ /**
+ * @return the id
+ *
+ */
+ public String getId();
+
+ /**
+ * Defines a new id
+ *
+ * @param newValue
+ * the new id to set
+ *
+ */
+ public void setId(String newValue);
+
+ /**
+ * Init the sect3
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initSect3(ReferencesTableSettings settings);
+
+ /**
+ * Update the sect3
+ *
+ * @param newValue
+ * the sect3 to update
+ *
+ */
+ public void updateSect3();
+
+ /**
+ * Adds the given filter to the sect3 edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToSect3(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the sect3 edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToSect3(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the sect3 table
+ *
+ */
+ public boolean isContainedInSect3Table(EObject element);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect3PropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect3PropertiesEditionPart.java
new file mode 100644
index 0000000000..ca019f50b4
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Sect3PropertiesEditionPart.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface Sect3PropertiesEditionPart {
+
+ /**
+ * Init the para
+ *
+ * @param current
+ * the current value
+ * @param containgFeature
+ * the feature where to navigate if necessary
+ * @param feature
+ * the feature to manage
+ */
+ public void initPara(ReferencesTableSettings settings);
+
+ /**
+ * Update the para
+ *
+ * @param newValue
+ * the para to update
+ *
+ */
+ public void updatePara();
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addFilterToPara(ViewerFilter filter);
+
+ /**
+ * Adds the given filter to the para edition editor.
+ *
+ * @param filter
+ * a viewer filter
+ * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
+ *
+ */
+ public void addBusinessFilterToPara(ViewerFilter filter);
+
+ /**
+ * @return true if the given element is contained inside the para table
+ *
+ */
+ public boolean isContainedInParaTable(EObject element);
+
+ /**
+ * @return the id
+ *
+ */
+ public String getId();
+
+ /**
+ * Defines a new id
+ *
+ * @param newValue
+ * the new id to set
+ *
+ */
+ public void setId(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/SimpleListPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/SimpleListPropertiesEditionPart.java
new file mode 100644
index 0000000000..c97271435c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/SimpleListPropertiesEditionPart.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface SimpleListPropertiesEditionPart {
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Title_PropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Title_PropertiesEditionPart.java
new file mode 100644
index 0000000000..daf2958741
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/Title_PropertiesEditionPart.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface Title_PropertiesEditionPart {
+
+ /**
+ * @return the data
+ *
+ */
+ public String getData();
+
+ /**
+ * Defines a new data
+ *
+ * @param newValue
+ * the new data to set
+ *
+ */
+ public void setData(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ULinkPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ULinkPropertiesEditionPart.java
new file mode 100644
index 0000000000..c2abc8764d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/ULinkPropertiesEditionPart.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface ULinkPropertiesEditionPart {
+
+ /**
+ * @return the url
+ *
+ */
+ public String getUrl();
+
+ /**
+ * Defines a new url
+ *
+ * @param newValue
+ * the new url to set
+ *
+ */
+ public void setUrl(String newValue);
+
+ /**
+ * @return the data
+ *
+ */
+ public String getData();
+
+ /**
+ * Defines a new data
+ *
+ * @param newValue
+ * the new data to set
+ *
+ */
+ public void setData(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/XRefPropertiesEditionPart.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/XRefPropertiesEditionPart.java
new file mode 100644
index 0000000000..77d9d01758
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/XRefPropertiesEditionPart.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts;
+
+// Start of user code for imports
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public interface XRefPropertiesEditionPart {
+
+ /**
+ * @return the linkend
+ *
+ */
+ public String getLinkend();
+
+ /**
+ * Defines a new linkend
+ *
+ * @param newValue
+ * the new linkend to set
+ *
+ */
+ public void setLinkend(String newValue);
+
+ /**
+ * Returns the internationalized title text.
+ *
+ * @return the internationalized title text.
+ *
+ */
+ public String getTitle();
+
+ // Start of user code for additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/AuthorPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/AuthorPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..c4b61badbf
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/AuthorPropertiesEditionPartForm.java
@@ -0,0 +1,462 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class AuthorPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, AuthorPropertiesEditionPart {
+
+ protected Text email;
+
+ protected Text personname;
+
+ protected Text address;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public AuthorPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public AuthorPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence authorStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = authorStep.addStep(DocbookViewsRepository.Author.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Author.Properties.email);
+ propertiesStep.addStep(DocbookViewsRepository.Author.Properties.personname);
+ propertiesStep.addStep(DocbookViewsRepository.Author.Properties.address);
+
+ composer = new PartComposer(authorStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Author.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Author.Properties.email) {
+ return createEmailText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Author.Properties.personname) {
+ return createPersonnameText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Author.Properties.address) {
+ return createAddressText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.AuthorPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createEmailText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Author.Properties.email, DocbookMessages.AuthorPropertiesEditionPart_EmailLabel);
+ email = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ email.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData emailData = new GridData(GridData.FILL_HORIZONTAL);
+ email.setLayoutData(emailData);
+ email.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.email,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, email.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.email,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, email.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ email.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.email,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, email.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(email, DocbookViewsRepository.Author.Properties.email);
+ EditingUtils.setEEFtype(email, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Author.Properties.email, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createEmailText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createPersonnameText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Author.Properties.personname, DocbookMessages.AuthorPropertiesEditionPart_PersonnameLabel);
+ personname = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ personname.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData personnameData = new GridData(GridData.FILL_HORIZONTAL);
+ personname.setLayoutData(personnameData);
+ personname.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.personname,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, personname.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.personname,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, personname.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ personname.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.personname,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, personname.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(personname, DocbookViewsRepository.Author.Properties.personname);
+ EditingUtils.setEEFtype(personname, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Author.Properties.personname, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createPersonnameText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createAddressText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Author.Properties.address, DocbookMessages.AuthorPropertiesEditionPart_AddressLabel);
+ address = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ address.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData addressData = new GridData(GridData.FILL_HORIZONTAL);
+ address.setLayoutData(addressData);
+ address.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.address,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, address.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.address,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, address.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ address.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartForm.this, DocbookViewsRepository.Author.Properties.address,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, address.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(address, DocbookViewsRepository.Author.Properties.address);
+ EditingUtils.setEEFtype(address, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Author.Properties.address, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createAddressText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#getEmail()
+ *
+ */
+ @Override
+ public String getEmail() {
+ return email.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#setEmail(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setEmail(String newValue) {
+ if (newValue != null) {
+ email.setText(newValue);
+ } else {
+ email.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Author.Properties.email);
+ if (eefElementEditorReadOnlyState && email.isEnabled()) {
+ email.setEnabled(false);
+ email.setToolTipText(DocbookMessages.Author_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !email.isEnabled()) {
+ email.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#getPersonname()
+ *
+ */
+ @Override
+ public String getPersonname() {
+ return personname.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#setPersonname(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setPersonname(String newValue) {
+ if (newValue != null) {
+ personname.setText(newValue);
+ } else {
+ personname.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Author.Properties.personname);
+ if (eefElementEditorReadOnlyState && personname.isEnabled()) {
+ personname.setEnabled(false);
+ personname.setToolTipText(DocbookMessages.Author_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !personname.isEnabled()) {
+ personname.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#getAddress()
+ *
+ */
+ @Override
+ public String getAddress() {
+ return address.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#setAddress(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setAddress(String newValue) {
+ if (newValue != null) {
+ address.setText(newValue);
+ } else {
+ address.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Author.Properties.address);
+ if (eefElementEditorReadOnlyState && address.isEnabled()) {
+ address.setEnabled(false);
+ address.setToolTipText(DocbookMessages.Author_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !address.isEnabled()) {
+ address.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Author_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/BookPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/BookPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..2f3671daf3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/BookPropertiesEditionPartForm.java
@@ -0,0 +1,625 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class BookPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, BookPropertiesEditionPart {
+
+ protected ReferencesTable chapter;
+
+ protected List<ViewerFilter> chapterBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> chapterFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ protected Text lang;
+
+ protected Text version;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public BookPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public BookPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence bookStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = bookStep.addStep(DocbookViewsRepository.Book.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.chapter);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.id);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.lang);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.version);
+
+ composer = new PartComposer(bookStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Book.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.chapter) {
+ return createChapterTableComposition(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.id) {
+ return createIdText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.lang) {
+ return createLangText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.version) {
+ return createVersionText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.BookPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createChapterTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.chapter = new ReferencesTable(getDescription(DocbookViewsRepository.Book.Properties.chapter, DocbookMessages.BookPropertiesEditionPart_ChapterLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ chapter.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ chapter.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ chapter.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ chapter.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.chapterFilters) {
+ this.chapter.addFilter(filter);
+ }
+ this.chapter.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.chapter, DocbookViewsRepository.FORM_KIND));
+ this.chapter.createControls(parent, widgetFactory);
+ this.chapter.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData chapterData = new GridData(GridData.FILL_HORIZONTAL);
+ chapterData.horizontalSpan = 3;
+ this.chapter.setLayoutData(chapterData);
+ this.chapter.setLowerBound(0);
+ this.chapter.setUpperBound(-1);
+ chapter.setID(DocbookViewsRepository.Book.Properties.chapter);
+ chapter.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createChapterTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Book.Properties.id, DocbookMessages.BookPropertiesEditionPart_IdLabel);
+ id = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ id.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.id,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, id.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ id.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Book.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.id, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createLangText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Book.Properties.lang, DocbookMessages.BookPropertiesEditionPart_LangLabel);
+ lang = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ lang.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData langData = new GridData(GridData.FILL_HORIZONTAL);
+ lang.setLayoutData(langData);
+ lang.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.lang,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, lang.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.lang,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, lang.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ lang.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.lang,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, lang.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(lang, DocbookViewsRepository.Book.Properties.lang);
+ EditingUtils.setEEFtype(lang, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.lang, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createLangText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createVersionText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Book.Properties.version, DocbookMessages.BookPropertiesEditionPart_VersionLabel);
+ version = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ version.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData versionData = new GridData(GridData.FILL_HORIZONTAL);
+ version.setLayoutData(versionData);
+ version.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.version,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, version.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.version,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, version.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ version.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartForm.this, DocbookViewsRepository.Book.Properties.version,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, version.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(version, DocbookViewsRepository.Book.Properties.version);
+ EditingUtils.setEEFtype(version, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.version, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createVersionText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#initChapter(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initChapter(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ chapter.setContentProvider(contentProvider);
+ chapter.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.chapter);
+ if (eefElementEditorReadOnlyState && chapter.isEnabled()) {
+ chapter.setEnabled(false);
+ chapter.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !chapter.isEnabled()) {
+ chapter.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#updateChapter()
+ *
+ */
+ @Override
+ public void updateChapter() {
+ chapter.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#addFilterChapter(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToChapter(ViewerFilter filter) {
+ chapterFilters.add(filter);
+ if (this.chapter != null) {
+ this.chapter.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#addBusinessFilterChapter(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToChapter(ViewerFilter filter) {
+ chapterBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#isContainedInChapterTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInChapterTable(EObject element) {
+ return ((ReferencesTableSettings) chapter.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#getLang()
+ *
+ */
+ @Override
+ public String getLang() {
+ return lang.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#setLang(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setLang(String newValue) {
+ if (newValue != null) {
+ lang.setText(newValue);
+ } else {
+ lang.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.lang);
+ if (eefElementEditorReadOnlyState && lang.isEnabled()) {
+ lang.setEnabled(false);
+ lang.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !lang.isEnabled()) {
+ lang.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#getVersion()
+ *
+ */
+ @Override
+ public String getVersion() {
+ return version.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#setVersion(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setVersion(String newValue) {
+ if (newValue != null) {
+ version.setText(newValue);
+ } else {
+ version.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.version);
+ if (eefElementEditorReadOnlyState && version.isEnabled()) {
+ version.setEnabled(false);
+ version.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !version.isEnabled()) {
+ version.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Book_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ChapterPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ChapterPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..6010cae7fe
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ChapterPropertiesEditionPartForm.java
@@ -0,0 +1,576 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ChapterPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, ChapterPropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected ReferencesTable sect1;
+
+ protected List<ViewerFilter> sect1BusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> sect1Filters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public ChapterPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ChapterPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence chapterStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = chapterStep.addStep(DocbookViewsRepository.Chapter.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Chapter.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Chapter.Properties.sect1);
+ propertiesStep.addStep(DocbookViewsRepository.Chapter.Properties.id);
+
+ composer = new PartComposer(chapterStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Chapter.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Chapter.Properties.para) {
+ return createParaTableComposition(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Chapter.Properties.sect1) {
+ return createSect1TableComposition(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Chapter.Properties.id) {
+ return createIdText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.ChapterPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Chapter.Properties.para, DocbookMessages.ChapterPropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Chapter.Properties.para, DocbookViewsRepository.FORM_KIND));
+ this.para.createControls(parent, widgetFactory);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Chapter.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createSect1TableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.sect1 = new ReferencesTable(getDescription(DocbookViewsRepository.Chapter.Properties.sect1, DocbookMessages.ChapterPropertiesEditionPart_Sect1Label), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ sect1.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ sect1.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ sect1.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ sect1.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.sect1Filters) {
+ this.sect1.addFilter(filter);
+ }
+ this.sect1.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Chapter.Properties.sect1, DocbookViewsRepository.FORM_KIND));
+ this.sect1.createControls(parent, widgetFactory);
+ this.sect1.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData sect1Data = new GridData(GridData.FILL_HORIZONTAL);
+ sect1Data.horizontalSpan = 3;
+ this.sect1.setLayoutData(sect1Data);
+ this.sect1.setLowerBound(0);
+ this.sect1.setUpperBound(-1);
+ sect1.setID(DocbookViewsRepository.Chapter.Properties.sect1);
+ sect1.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createSect1TableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Chapter.Properties.id, DocbookMessages.ChapterPropertiesEditionPart_IdLabel);
+ id = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ id.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.id,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, id.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ id.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartForm.this, DocbookViewsRepository.Chapter.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Chapter.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Chapter.Properties.id, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Chapter.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Chapter_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#initSect1(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initSect1(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ sect1.setContentProvider(contentProvider);
+ sect1.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Chapter.Properties.sect1);
+ if (eefElementEditorReadOnlyState && sect1.isEnabled()) {
+ sect1.setEnabled(false);
+ sect1.setToolTipText(DocbookMessages.Chapter_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !sect1.isEnabled()) {
+ sect1.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#updateSect1()
+ *
+ */
+ @Override
+ public void updateSect1() {
+ sect1.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addFilterSect1(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToSect1(ViewerFilter filter) {
+ sect1Filters.add(filter);
+ if (this.sect1 != null) {
+ this.sect1.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addBusinessFilterSect1(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToSect1(ViewerFilter filter) {
+ sect1BusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#isContainedInSect1Table(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInSect1Table(EObject element) {
+ return ((ReferencesTableSettings) sect1.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Chapter.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Chapter_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Chapter_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/EmphasisPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/EmphasisPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..7c5b676b2a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/EmphasisPropertiesEditionPartForm.java
@@ -0,0 +1,260 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.EmphasisPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class EmphasisPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, EmphasisPropertiesEditionPart {
+
+ protected Text remap;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public EmphasisPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public EmphasisPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence emphasisStep = new BindingCompositionSequence(propertiesEditionComponent);
+ emphasisStep.addStep(DocbookViewsRepository.Emphasis.Properties.class).addStep(DocbookViewsRepository.Emphasis.Properties.remap);
+
+ composer = new PartComposer(emphasisStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Emphasis.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Emphasis.Properties.remap) {
+ return createRemapText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.EmphasisPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createRemapText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Emphasis.Properties.remap, DocbookMessages.EmphasisPropertiesEditionPart_RemapLabel);
+ remap = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ remap.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData remapData = new GridData(GridData.FILL_HORIZONTAL);
+ remap.setLayoutData(remapData);
+ remap.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EmphasisPropertiesEditionPartForm.this, DocbookViewsRepository.Emphasis.Properties.remap,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, remap.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EmphasisPropertiesEditionPartForm.this, DocbookViewsRepository.Emphasis.Properties.remap,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, remap.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EmphasisPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ remap.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EmphasisPropertiesEditionPartForm.this, DocbookViewsRepository.Emphasis.Properties.remap,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, remap.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(remap, DocbookViewsRepository.Emphasis.Properties.remap);
+ EditingUtils.setEEFtype(remap, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Emphasis.Properties.remap, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createRemapText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.EmphasisPropertiesEditionPart#getRemap()
+ *
+ */
+ @Override
+ public String getRemap() {
+ return remap.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.EmphasisPropertiesEditionPart#setRemap(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setRemap(String newValue) {
+ if (newValue != null) {
+ remap.setText(newValue);
+ } else {
+ remap.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Emphasis.Properties.remap);
+ if (eefElementEditorReadOnlyState && remap.isEnabled()) {
+ remap.setEnabled(false);
+ remap.setToolTipText(DocbookMessages.Emphasis_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !remap.isEnabled()) {
+ remap.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Emphasis_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ExamplePropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ExamplePropertiesEditionPartForm.java
new file mode 100644
index 0000000000..4c62d6abed
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ExamplePropertiesEditionPartForm.java
@@ -0,0 +1,315 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ExamplePropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, ExamplePropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public ExamplePropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ExamplePropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence exampleStep = new BindingCompositionSequence(propertiesEditionComponent);
+ exampleStep.addStep(DocbookViewsRepository.Example.Properties.class).addStep(DocbookViewsRepository.Example.Properties.para);
+
+ composer = new PartComposer(exampleStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Example.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Example.Properties.para) {
+ return createParaTableComposition(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.ExamplePropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Example.Properties.para, DocbookMessages.ExamplePropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartForm.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartForm.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartForm.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartForm.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Example.Properties.para, DocbookViewsRepository.FORM_KIND));
+ this.para.createControls(parent, widgetFactory);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartForm.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Example.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Example.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Example_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Example_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/InfoPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/InfoPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..909188ec27
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/InfoPropertiesEditionPartForm.java
@@ -0,0 +1,525 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class InfoPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, InfoPropertiesEditionPart {
+
+ protected ReferencesTable author;
+
+ protected List<ViewerFilter> authorBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> authorFilters = new ArrayList<ViewerFilter>();
+
+ protected Text date;
+
+ protected Text pubdate;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public InfoPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public InfoPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence infoStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = infoStep.addStep(DocbookViewsRepository.Info.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Info.Properties.author);
+ propertiesStep.addStep(DocbookViewsRepository.Info.Properties.date);
+ propertiesStep.addStep(DocbookViewsRepository.Info.Properties.pubdate);
+
+ composer = new PartComposer(infoStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Info.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Info.Properties.author) {
+ return createAuthorTableComposition(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Info.Properties.date) {
+ return createDateText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Info.Properties.pubdate) {
+ return createPubdateText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.InfoPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createAuthorTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.author = new ReferencesTable(getDescription(DocbookViewsRepository.Info.Properties.author, DocbookMessages.InfoPropertiesEditionPart_AuthorLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ author.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ author.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ author.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ author.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.authorFilters) {
+ this.author.addFilter(filter);
+ }
+ this.author.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Info.Properties.author, DocbookViewsRepository.FORM_KIND));
+ this.author.createControls(parent, widgetFactory);
+ this.author.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData authorData = new GridData(GridData.FILL_HORIZONTAL);
+ authorData.horizontalSpan = 3;
+ this.author.setLayoutData(authorData);
+ this.author.setLowerBound(0);
+ this.author.setUpperBound(-1);
+ author.setID(DocbookViewsRepository.Info.Properties.author);
+ author.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createAuthorTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createDateText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Info.Properties.date, DocbookMessages.InfoPropertiesEditionPart_DateLabel);
+ date = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ date.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData dateData = new GridData(GridData.FILL_HORIZONTAL);
+ date.setLayoutData(dateData);
+ date.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.date,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, date.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.date,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, date.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ date.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.date,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, date.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(date, DocbookViewsRepository.Info.Properties.date);
+ EditingUtils.setEEFtype(date, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Info.Properties.date, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createDateText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createPubdateText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Info.Properties.pubdate, DocbookMessages.InfoPropertiesEditionPart_PubdateLabel);
+ pubdate = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ pubdate.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData pubdateData = new GridData(GridData.FILL_HORIZONTAL);
+ pubdate.setLayoutData(pubdateData);
+ pubdate.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.pubdate,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, pubdate.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.pubdate,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, pubdate.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ pubdate.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartForm.this, DocbookViewsRepository.Info.Properties.pubdate,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, pubdate.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(pubdate, DocbookViewsRepository.Info.Properties.pubdate);
+ EditingUtils.setEEFtype(pubdate, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Info.Properties.pubdate, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createPubdateText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#initAuthor(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initAuthor(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ author.setContentProvider(contentProvider);
+ author.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Info.Properties.author);
+ if (eefElementEditorReadOnlyState && author.isEnabled()) {
+ author.setEnabled(false);
+ author.setToolTipText(DocbookMessages.Info_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !author.isEnabled()) {
+ author.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#updateAuthor()
+ *
+ */
+ @Override
+ public void updateAuthor() {
+ author.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#addFilterAuthor(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToAuthor(ViewerFilter filter) {
+ authorFilters.add(filter);
+ if (this.author != null) {
+ this.author.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#addBusinessFilterAuthor(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToAuthor(ViewerFilter filter) {
+ authorBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#isContainedInAuthorTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInAuthorTable(EObject element) {
+ return ((ReferencesTableSettings) author.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#getDate()
+ *
+ */
+ @Override
+ public String getDate() {
+ return date.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#setDate(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setDate(String newValue) {
+ if (newValue != null) {
+ date.setText(newValue);
+ } else {
+ date.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Info.Properties.date);
+ if (eefElementEditorReadOnlyState && date.isEnabled()) {
+ date.setEnabled(false);
+ date.setToolTipText(DocbookMessages.Info_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !date.isEnabled()) {
+ date.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#getPubdate()
+ *
+ */
+ @Override
+ public String getPubdate() {
+ return pubdate.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#setPubdate(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setPubdate(String newValue) {
+ if (newValue != null) {
+ pubdate.setText(newValue);
+ } else {
+ pubdate.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Info.Properties.pubdate);
+ if (eefElementEditorReadOnlyState && pubdate.isEnabled()) {
+ pubdate.setEnabled(false);
+ pubdate.setToolTipText(DocbookMessages.Info_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !pubdate.isEnabled()) {
+ pubdate.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Info_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ItemizedListPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ItemizedListPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..2d3f058909
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ItemizedListPropertiesEditionPartForm.java
@@ -0,0 +1,426 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ItemizedListPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, ItemizedListPropertiesEditionPart {
+
+ protected Text mark;
+
+ protected ReferencesTable listitem;
+
+ protected List<ViewerFilter> listitemBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> listitemFilters = new ArrayList<ViewerFilter>();
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public ItemizedListPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ItemizedListPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence itemizedListStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = itemizedListStep.addStep(DocbookViewsRepository.ItemizedList.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.ItemizedList.Properties.mark);
+ propertiesStep.addStep(DocbookViewsRepository.ItemizedList.Properties.listitem);
+
+ composer = new PartComposer(itemizedListStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.ItemizedList.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.ItemizedList.Properties.mark) {
+ return createMarkText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.ItemizedList.Properties.listitem) {
+ return createListitemTableComposition(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.ItemizedListPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createMarkText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.ItemizedList.Properties.mark, DocbookMessages.ItemizedListPropertiesEditionPart_MarkLabel);
+ mark = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ mark.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData markData = new GridData(GridData.FILL_HORIZONTAL);
+ mark.setLayoutData(markData);
+ mark.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this, DocbookViewsRepository.ItemizedList.Properties.mark,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, mark.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this, DocbookViewsRepository.ItemizedList.Properties.mark,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, mark.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ mark.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this, DocbookViewsRepository.ItemizedList.Properties.mark,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, mark.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(mark, DocbookViewsRepository.ItemizedList.Properties.mark);
+ EditingUtils.setEEFtype(mark, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ItemizedList.Properties.mark, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createMarkText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createListitemTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.listitem = new ReferencesTable(getDescription(DocbookViewsRepository.ItemizedList.Properties.listitem, DocbookMessages.ItemizedListPropertiesEditionPart_ListitemLabel),
+ new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ listitem.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ listitem.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ listitem.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ listitem.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.listitemFilters) {
+ this.listitem.addFilter(filter);
+ }
+ this.listitem.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ItemizedList.Properties.listitem, DocbookViewsRepository.FORM_KIND));
+ this.listitem.createControls(parent, widgetFactory);
+ this.listitem.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartForm.this, DocbookViewsRepository.ItemizedList.Properties.listitem,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData listitemData = new GridData(GridData.FILL_HORIZONTAL);
+ listitemData.horizontalSpan = 3;
+ this.listitem.setLayoutData(listitemData);
+ this.listitem.setLowerBound(0);
+ this.listitem.setUpperBound(-1);
+ listitem.setID(DocbookViewsRepository.ItemizedList.Properties.listitem);
+ listitem.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createListitemTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#getMark()
+ *
+ */
+ @Override
+ public String getMark() {
+ return mark.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#setMark(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setMark(String newValue) {
+ if (newValue != null) {
+ mark.setText(newValue);
+ } else {
+ mark.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ItemizedList.Properties.mark);
+ if (eefElementEditorReadOnlyState && mark.isEnabled()) {
+ mark.setEnabled(false);
+ mark.setToolTipText(DocbookMessages.ItemizedList_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !mark.isEnabled()) {
+ mark.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#initListitem(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initListitem(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ listitem.setContentProvider(contentProvider);
+ listitem.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ItemizedList.Properties.listitem);
+ if (eefElementEditorReadOnlyState && listitem.isEnabled()) {
+ listitem.setEnabled(false);
+ listitem.setToolTipText(DocbookMessages.ItemizedList_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !listitem.isEnabled()) {
+ listitem.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#updateListitem()
+ *
+ */
+ @Override
+ public void updateListitem() {
+ listitem.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#addFilterListitem(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToListitem(ViewerFilter filter) {
+ listitemFilters.add(filter);
+ if (this.listitem != null) {
+ this.listitem.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#addBusinessFilterListitem(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToListitem(ViewerFilter filter) {
+ listitemBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#isContainedInListitemTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInListitemTable(EObject element) {
+ return ((ReferencesTableSettings) listitem.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.ItemizedList_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/LinkPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/LinkPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..1fb9b89904
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/LinkPropertiesEditionPartForm.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.sirius.tests.sample.docbook.parts.LinkPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class LinkPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, LinkPropertiesEditionPart {
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public LinkPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public LinkPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence linkStep = new BindingCompositionSequence(propertiesEditionComponent);
+
+ composer = new PartComposer(linkStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Link_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ListItemPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ListItemPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..bfdd8cae93
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ListItemPropertiesEditionPartForm.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.sirius.tests.sample.docbook.parts.ListItemPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ListItemPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, ListItemPropertiesEditionPart {
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public ListItemPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ListItemPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence listItemStep = new BindingCompositionSequence(propertiesEditionComponent);
+
+ composer = new PartComposer(listItemStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.ListItem_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/OrderedListPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/OrderedListPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..26334d606f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/OrderedListPropertiesEditionPartForm.java
@@ -0,0 +1,260 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.OrderedListPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class OrderedListPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, OrderedListPropertiesEditionPart {
+
+ protected Text numeration;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public OrderedListPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public OrderedListPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence orderedListStep = new BindingCompositionSequence(propertiesEditionComponent);
+ orderedListStep.addStep(DocbookViewsRepository.OrderedList.Properties.class).addStep(DocbookViewsRepository.OrderedList.Properties.numeration);
+
+ composer = new PartComposer(orderedListStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.OrderedList.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.OrderedList.Properties.numeration) {
+ return createNumerationText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.OrderedListPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createNumerationText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.OrderedList.Properties.numeration, DocbookMessages.OrderedListPropertiesEditionPart_NumerationLabel);
+ numeration = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ numeration.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData numerationData = new GridData(GridData.FILL_HORIZONTAL);
+ numeration.setLayoutData(numerationData);
+ numeration.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OrderedListPropertiesEditionPartForm.this, DocbookViewsRepository.OrderedList.Properties.numeration,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, numeration.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OrderedListPropertiesEditionPartForm.this, DocbookViewsRepository.OrderedList.Properties.numeration,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, numeration.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OrderedListPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ numeration.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OrderedListPropertiesEditionPartForm.this,
+ DocbookViewsRepository.OrderedList.Properties.numeration, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, numeration.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(numeration, DocbookViewsRepository.OrderedList.Properties.numeration);
+ EditingUtils.setEEFtype(numeration, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.OrderedList.Properties.numeration, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createNumerationText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.OrderedListPropertiesEditionPart#getNumeration()
+ *
+ */
+ @Override
+ public String getNumeration() {
+ return numeration.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.OrderedListPropertiesEditionPart#setNumeration(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setNumeration(String newValue) {
+ if (newValue != null) {
+ numeration.setText(newValue);
+ } else {
+ numeration.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.OrderedList.Properties.numeration);
+ if (eefElementEditorReadOnlyState && numeration.isEnabled()) {
+ numeration.setEnabled(false);
+ numeration.setToolTipText(DocbookMessages.OrderedList_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !numeration.isEnabled()) {
+ numeration.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.OrderedList_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ParaPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ParaPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..befd03435e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ParaPropertiesEditionPartForm.java
@@ -0,0 +1,260 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ParaPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ParaPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, ParaPropertiesEditionPart {
+
+ protected Text data;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public ParaPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ParaPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence paraStep = new BindingCompositionSequence(propertiesEditionComponent);
+ paraStep.addStep(DocbookViewsRepository.Para.Properties.class).addStep(DocbookViewsRepository.Para.Properties.data);
+
+ composer = new PartComposer(paraStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Para.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Para.Properties.data) {
+ return createDataText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.ParaPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createDataText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Para.Properties.data, DocbookMessages.ParaPropertiesEditionPart_DataLabel);
+ data = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ data.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData dataData = new GridData(GridData.FILL_HORIZONTAL);
+ data.setLayoutData(dataData);
+ data.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ParaPropertiesEditionPartForm.this, DocbookViewsRepository.Para.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ParaPropertiesEditionPartForm.this, DocbookViewsRepository.Para.Properties.data,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, data.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ParaPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ data.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ParaPropertiesEditionPartForm.this, DocbookViewsRepository.Para.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(data, DocbookViewsRepository.Para.Properties.data);
+ EditingUtils.setEEFtype(data, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Para.Properties.data, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createDataText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ParaPropertiesEditionPart#getData()
+ *
+ */
+ @Override
+ public String getData() {
+ return data.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ParaPropertiesEditionPart#setData(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setData(String newValue) {
+ if (newValue != null) {
+ data.setText(newValue);
+ } else {
+ data.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Para.Properties.data);
+ if (eefElementEditorReadOnlyState && data.isEnabled()) {
+ data.setEnabled(false);
+ data.setToolTipText(DocbookMessages.Para_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !data.isEnabled()) {
+ data.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Para_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect1PropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect1PropertiesEditionPartForm.java
new file mode 100644
index 0000000000..c7ac0ee663
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect1PropertiesEditionPartForm.java
@@ -0,0 +1,576 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect1PropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, Sect1PropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ protected ReferencesTable sect2;
+
+ protected List<ViewerFilter> sect2BusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> sect2Filters = new ArrayList<ViewerFilter>();
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public Sect1PropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Sect1PropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence sect1Step = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = sect1Step.addStep(DocbookViewsRepository.Sect1.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Sect1.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Sect1.Properties.id);
+ propertiesStep.addStep(DocbookViewsRepository.Sect1.Properties.sect2);
+
+ composer = new PartComposer(sect1Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Sect1.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect1.Properties.para) {
+ return createParaTableComposition(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect1.Properties.id) {
+ return createIdText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect1.Properties.sect2) {
+ return createSect2TableComposition(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.Sect1PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Sect1.Properties.para, DocbookMessages.Sect1PropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect1.Properties.para, DocbookViewsRepository.FORM_KIND));
+ this.para.createControls(parent, widgetFactory);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Sect1.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Sect1.Properties.id, DocbookMessages.Sect1PropertiesEditionPart_IdLabel);
+ id = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ id.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.id,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, id.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ id.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Sect1.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect1.Properties.id, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createSect2TableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.sect2 = new ReferencesTable(getDescription(DocbookViewsRepository.Sect1.Properties.sect2, DocbookMessages.Sect1PropertiesEditionPart_Sect2Label), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ sect2.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ sect2.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ sect2.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ sect2.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.sect2Filters) {
+ this.sect2.addFilter(filter);
+ }
+ this.sect2.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect1.Properties.sect2, DocbookViewsRepository.FORM_KIND));
+ this.sect2.createControls(parent, widgetFactory);
+ this.sect2.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartForm.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData sect2Data = new GridData(GridData.FILL_HORIZONTAL);
+ sect2Data.horizontalSpan = 3;
+ this.sect2.setLayoutData(sect2Data);
+ this.sect2.setLowerBound(0);
+ this.sect2.setUpperBound(-1);
+ sect2.setID(DocbookViewsRepository.Sect1.Properties.sect2);
+ sect2.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createSect2TableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect1.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Sect1_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect1.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Sect1_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#initSect2(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initSect2(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ sect2.setContentProvider(contentProvider);
+ sect2.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect1.Properties.sect2);
+ if (eefElementEditorReadOnlyState && sect2.isEnabled()) {
+ sect2.setEnabled(false);
+ sect2.setToolTipText(DocbookMessages.Sect1_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !sect2.isEnabled()) {
+ sect2.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#updateSect2()
+ *
+ */
+ @Override
+ public void updateSect2() {
+ sect2.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addFilterSect2(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToSect2(ViewerFilter filter) {
+ sect2Filters.add(filter);
+ if (this.sect2 != null) {
+ this.sect2.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addBusinessFilterSect2(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToSect2(ViewerFilter filter) {
+ sect2BusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#isContainedInSect2Table(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInSect2Table(EObject element) {
+ return ((ReferencesTableSettings) sect2.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Sect1_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect2PropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect2PropertiesEditionPartForm.java
new file mode 100644
index 0000000000..2278879e73
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect2PropertiesEditionPartForm.java
@@ -0,0 +1,576 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect2PropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, Sect2PropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ protected ReferencesTable sect3;
+
+ protected List<ViewerFilter> sect3BusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> sect3Filters = new ArrayList<ViewerFilter>();
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public Sect2PropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Sect2PropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence sect2Step = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = sect2Step.addStep(DocbookViewsRepository.Sect2.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Sect2.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Sect2.Properties.id);
+ propertiesStep.addStep(DocbookViewsRepository.Sect2.Properties.sect3);
+
+ composer = new PartComposer(sect2Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Sect2.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect2.Properties.para) {
+ return createParaTableComposition(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect2.Properties.id) {
+ return createIdText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect2.Properties.sect3) {
+ return createSect3TableComposition(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.Sect2PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Sect2.Properties.para, DocbookMessages.Sect2PropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect2.Properties.para, DocbookViewsRepository.FORM_KIND));
+ this.para.createControls(parent, widgetFactory);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Sect2.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Sect2.Properties.id, DocbookMessages.Sect2PropertiesEditionPart_IdLabel);
+ id = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ id.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.id,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, id.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ id.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Sect2.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect2.Properties.id, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createSect3TableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.sect3 = new ReferencesTable(getDescription(DocbookViewsRepository.Sect2.Properties.sect3, DocbookMessages.Sect2PropertiesEditionPart_Sect3Label), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ sect3.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ sect3.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ sect3.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ sect3.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.sect3Filters) {
+ this.sect3.addFilter(filter);
+ }
+ this.sect3.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect2.Properties.sect3, DocbookViewsRepository.FORM_KIND));
+ this.sect3.createControls(parent, widgetFactory);
+ this.sect3.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartForm.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData sect3Data = new GridData(GridData.FILL_HORIZONTAL);
+ sect3Data.horizontalSpan = 3;
+ this.sect3.setLayoutData(sect3Data);
+ this.sect3.setLowerBound(0);
+ this.sect3.setUpperBound(-1);
+ sect3.setID(DocbookViewsRepository.Sect2.Properties.sect3);
+ sect3.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createSect3TableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect2.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Sect2_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect2.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Sect2_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#initSect3(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initSect3(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ sect3.setContentProvider(contentProvider);
+ sect3.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect2.Properties.sect3);
+ if (eefElementEditorReadOnlyState && sect3.isEnabled()) {
+ sect3.setEnabled(false);
+ sect3.setToolTipText(DocbookMessages.Sect2_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !sect3.isEnabled()) {
+ sect3.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#updateSect3()
+ *
+ */
+ @Override
+ public void updateSect3() {
+ sect3.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addFilterSect3(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToSect3(ViewerFilter filter) {
+ sect3Filters.add(filter);
+ if (this.sect3 != null) {
+ this.sect3.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addBusinessFilterSect3(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToSect3(ViewerFilter filter) {
+ sect3BusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#isContainedInSect3Table(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInSect3Table(EObject element) {
+ return ((ReferencesTableSettings) sect3.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Sect2_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect3PropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect3PropertiesEditionPartForm.java
new file mode 100644
index 0000000000..c1f62322e8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Sect3PropertiesEditionPartForm.java
@@ -0,0 +1,425 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect3PropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, Sect3PropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public Sect3PropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Sect3PropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence sect3Step = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = sect3Step.addStep(DocbookViewsRepository.Sect3.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Sect3.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Sect3.Properties.id);
+
+ composer = new PartComposer(sect3Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Sect3.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect3.Properties.para) {
+ return createParaTableComposition(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Sect3.Properties.id) {
+ return createIdText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.Sect3PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaTableComposition(FormToolkit widgetFactory, Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Sect3.Properties.para, DocbookMessages.Sect3PropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect3.Properties.para, DocbookViewsRepository.FORM_KIND));
+ this.para.createControls(parent, widgetFactory);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Sect3.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Sect3.Properties.id, DocbookMessages.Sect3PropertiesEditionPart_IdLabel);
+ id = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ id.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.id,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, id.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ id.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartForm.this, DocbookViewsRepository.Sect3.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Sect3.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect3.Properties.id, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect3.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Sect3_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect3.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Sect3_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Sect3_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/SimpleListPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/SimpleListPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..17266b80cf
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/SimpleListPropertiesEditionPartForm.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.sirius.tests.sample.docbook.parts.SimpleListPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class SimpleListPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, SimpleListPropertiesEditionPart {
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public SimpleListPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public SimpleListPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence simpleListStep = new BindingCompositionSequence(propertiesEditionComponent);
+
+ composer = new PartComposer(simpleListStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.SimpleList_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Title_PropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Title_PropertiesEditionPartForm.java
new file mode 100644
index 0000000000..172acd0d55
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/Title_PropertiesEditionPartForm.java
@@ -0,0 +1,260 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Title_PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Title_PropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, Title_PropertiesEditionPart {
+
+ protected Text data;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public Title_PropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Title_PropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence title_Step = new BindingCompositionSequence(propertiesEditionComponent);
+ title_Step.addStep(DocbookViewsRepository.Title_.Properties.class).addStep(DocbookViewsRepository.Title_.Properties.data);
+
+ composer = new PartComposer(title_Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Title_.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.Title_.Properties.data) {
+ return createDataText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.Title_PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createDataText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Title_.Properties.data, DocbookMessages.Title_PropertiesEditionPart_DataLabel);
+ data = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ data.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData dataData = new GridData(GridData.FILL_HORIZONTAL);
+ data.setLayoutData(dataData);
+ data.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Title_PropertiesEditionPartForm.this, DocbookViewsRepository.Title_.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Title_PropertiesEditionPartForm.this, DocbookViewsRepository.Title_.Properties.data,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, data.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Title_PropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ data.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Title_PropertiesEditionPartForm.this, DocbookViewsRepository.Title_.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(data, DocbookViewsRepository.Title_.Properties.data);
+ EditingUtils.setEEFtype(data, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Title_.Properties.data, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createDataText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Title_PropertiesEditionPart#getData()
+ *
+ */
+ @Override
+ public String getData() {
+ return data.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Title_PropertiesEditionPart#setData(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setData(String newValue) {
+ if (newValue != null) {
+ data.setText(newValue);
+ } else {
+ data.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Title_.Properties.data);
+ if (eefElementEditorReadOnlyState && data.isEnabled()) {
+ data.setEnabled(false);
+ data.setToolTipText(DocbookMessages.Title__ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !data.isEnabled()) {
+ data.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Title__Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ULinkPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ULinkPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..397b75ef9e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/ULinkPropertiesEditionPartForm.java
@@ -0,0 +1,362 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ULinkPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, ULinkPropertiesEditionPart {
+
+ protected Text url;
+
+ protected Text data;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public ULinkPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ULinkPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence uLinkStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = uLinkStep.addStep(DocbookViewsRepository.ULink.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.ULink.Properties.url);
+ propertiesStep.addStep(DocbookViewsRepository.ULink.Properties.data);
+
+ composer = new PartComposer(uLinkStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.ULink.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.ULink.Properties.url) {
+ return createUrlText(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.ULink.Properties.data) {
+ return createDataText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.ULinkPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createUrlText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.ULink.Properties.url, DocbookMessages.ULinkPropertiesEditionPart_UrlLabel);
+ url = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ url.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData urlData = new GridData(GridData.FILL_HORIZONTAL);
+ url.setLayoutData(urlData);
+ url.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, DocbookViewsRepository.ULink.Properties.url,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, url.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, DocbookViewsRepository.ULink.Properties.url,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, url.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ url.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, DocbookViewsRepository.ULink.Properties.url,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, url.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(url, DocbookViewsRepository.ULink.Properties.url);
+ EditingUtils.setEEFtype(url, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ULink.Properties.url, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createUrlText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createDataText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.ULink.Properties.data, DocbookMessages.ULinkPropertiesEditionPart_DataLabel);
+ data = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ data.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData dataData = new GridData(GridData.FILL_HORIZONTAL);
+ data.setLayoutData(dataData);
+ data.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, DocbookViewsRepository.ULink.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, DocbookViewsRepository.ULink.Properties.data,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, data.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ data.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartForm.this, DocbookViewsRepository.ULink.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(data, DocbookViewsRepository.ULink.Properties.data);
+ EditingUtils.setEEFtype(data, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ULink.Properties.data, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createDataText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#getUrl()
+ *
+ */
+ @Override
+ public String getUrl() {
+ return url.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#setUrl(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setUrl(String newValue) {
+ if (newValue != null) {
+ url.setText(newValue);
+ } else {
+ url.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ULink.Properties.url);
+ if (eefElementEditorReadOnlyState && url.isEnabled()) {
+ url.setEnabled(false);
+ url.setToolTipText(DocbookMessages.ULink_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !url.isEnabled()) {
+ url.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#getData()
+ *
+ */
+ @Override
+ public String getData() {
+ return data.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#setData(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setData(String newValue) {
+ if (newValue != null) {
+ data.setText(newValue);
+ } else {
+ data.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ULink.Properties.data);
+ if (eefElementEditorReadOnlyState && data.isEnabled()) {
+ data.setEnabled(false);
+ data.setToolTipText(DocbookMessages.ULink_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !data.isEnabled()) {
+ data.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.ULink_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/XRefPropertiesEditionPartForm.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/XRefPropertiesEditionPartForm.java
new file mode 100644
index 0000000000..40d5e5a96c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/forms/XRefPropertiesEditionPartForm.java
@@ -0,0 +1,260 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.forms;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.XRefPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class XRefPropertiesEditionPartForm extends SectionPropertiesEditingPart implements IFormPropertiesEditionPart, XRefPropertiesEditionPart {
+
+ protected Text linkend;
+
+ /**
+ * For {@link ISection} use only.
+ */
+ public XRefPropertiesEditionPartForm() {
+ super();
+ }
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public XRefPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.forms.widgets.FormToolkit)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
+ ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
+ Form form = scrolledForm.getForm();
+ view = form.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(widgetFactory, view);
+ return scrolledForm;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
+ * createControls(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(final FormToolkit widgetFactory, Composite view) {
+ CompositionSequence xRefStep = new BindingCompositionSequence(propertiesEditionComponent);
+ xRefStep.addStep(DocbookViewsRepository.XRef.Properties.class).addStep(DocbookViewsRepository.XRef.Properties.linkend);
+
+ composer = new PartComposer(xRefStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.XRef.Properties.class) {
+ return createPropertiesGroup(widgetFactory, parent);
+ }
+ if (key == DocbookViewsRepository.XRef.Properties.linkend) {
+ return createLinkendText(widgetFactory, parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
+ Section propertiesSection = widgetFactory.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ propertiesSection.setText(DocbookMessages.XRefPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesSectionData.horizontalSpan = 3;
+ propertiesSection.setLayoutData(propertiesSectionData);
+ Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ propertiesSection.setClient(propertiesGroup);
+ return propertiesGroup;
+ }
+
+ protected Composite createLinkendText(FormToolkit widgetFactory, Composite parent) {
+ createDescription(parent, DocbookViewsRepository.XRef.Properties.linkend, DocbookMessages.XRefPropertiesEditionPart_LinkendLabel);
+ linkend = widgetFactory.createText(parent, ""); //$NON-NLS-1$
+ linkend.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
+ widgetFactory.paintBordersFor(parent);
+ GridData linkendData = new GridData(GridData.FILL_HORIZONTAL);
+ linkend.setLayoutData(linkendData);
+ linkend.addFocusListener(new FocusAdapter() {
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(XRefPropertiesEditionPartForm.this, DocbookViewsRepository.XRef.Properties.linkend,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, linkend.getText()));
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(XRefPropertiesEditionPartForm.this, DocbookViewsRepository.XRef.Properties.linkend,
+ PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, linkend.getText()));
+ }
+ }
+
+ /**
+ * @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(XRefPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED,
+ PropertiesEditionEvent.FOCUS_GAINED, null, null));
+ }
+ }
+ });
+ linkend.addKeyListener(new KeyAdapter() {
+ /**
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(XRefPropertiesEditionPartForm.this, DocbookViewsRepository.XRef.Properties.linkend,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, linkend.getText()));
+ }
+ }
+ }
+ });
+ EditingUtils.setID(linkend, DocbookViewsRepository.XRef.Properties.linkend);
+ EditingUtils.setEEFtype(linkend, "eef::Text"); //$NON-NLS-1$
+ FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.XRef.Properties.linkend, DocbookViewsRepository.FORM_KIND), null);
+ // Start of user code for createLinkendText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.XRefPropertiesEditionPart#getLinkend()
+ *
+ */
+ @Override
+ public String getLinkend() {
+ return linkend.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.XRefPropertiesEditionPart#setLinkend(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setLinkend(String newValue) {
+ if (newValue != null) {
+ linkend.setText(newValue);
+ } else {
+ linkend.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.XRef.Properties.linkend);
+ if (eefElementEditorReadOnlyState && linkend.isEnabled()) {
+ linkend.setEnabled(false);
+ linkend.setToolTipText(DocbookMessages.XRef_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !linkend.isEnabled()) {
+ linkend.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.XRef_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/AuthorPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/AuthorPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..2a54ac4a66
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/AuthorPropertiesEditionPartImpl.java
@@ -0,0 +1,423 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class AuthorPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, AuthorPropertiesEditionPart {
+
+ protected Text email;
+
+ protected Text personname;
+
+ protected Text address;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public AuthorPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence authorStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = authorStep.addStep(DocbookViewsRepository.Author.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Author.Properties.email);
+ propertiesStep.addStep(DocbookViewsRepository.Author.Properties.personname);
+ propertiesStep.addStep(DocbookViewsRepository.Author.Properties.address);
+
+ composer = new PartComposer(authorStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Author.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Author.Properties.email) {
+ return createEmailText(parent);
+ }
+ if (key == DocbookViewsRepository.Author.Properties.personname) {
+ return createPersonnameText(parent);
+ }
+ if (key == DocbookViewsRepository.Author.Properties.address) {
+ return createAddressText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.AuthorPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createEmailText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Author.Properties.email, DocbookMessages.AuthorPropertiesEditionPart_EmailLabel);
+ email = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData emailData = new GridData(GridData.FILL_HORIZONTAL);
+ email.setLayoutData(emailData);
+ email.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartImpl.this, DocbookViewsRepository.Author.Properties.email,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, email.getText()));
+ }
+ }
+
+ });
+ email.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartImpl.this, DocbookViewsRepository.Author.Properties.email,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, email.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(email, DocbookViewsRepository.Author.Properties.email);
+ EditingUtils.setEEFtype(email, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Author.Properties.email, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createEmailText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createPersonnameText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Author.Properties.personname, DocbookMessages.AuthorPropertiesEditionPart_PersonnameLabel);
+ personname = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData personnameData = new GridData(GridData.FILL_HORIZONTAL);
+ personname.setLayoutData(personnameData);
+ personname.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartImpl.this, DocbookViewsRepository.Author.Properties.personname,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, personname.getText()));
+ }
+ }
+
+ });
+ personname.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartImpl.this, DocbookViewsRepository.Author.Properties.personname,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, personname.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(personname, DocbookViewsRepository.Author.Properties.personname);
+ EditingUtils.setEEFtype(personname, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Author.Properties.personname, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createPersonnameText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createAddressText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Author.Properties.address, DocbookMessages.AuthorPropertiesEditionPart_AddressLabel);
+ address = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData addressData = new GridData(GridData.FILL_HORIZONTAL);
+ address.setLayoutData(addressData);
+ address.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartImpl.this, DocbookViewsRepository.Author.Properties.address,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, address.getText()));
+ }
+ }
+
+ });
+ address.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AuthorPropertiesEditionPartImpl.this, DocbookViewsRepository.Author.Properties.address,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, address.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(address, DocbookViewsRepository.Author.Properties.address);
+ EditingUtils.setEEFtype(address, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Author.Properties.address, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createAddressText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#getEmail()
+ *
+ */
+ @Override
+ public String getEmail() {
+ return email.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#setEmail(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setEmail(String newValue) {
+ if (newValue != null) {
+ email.setText(newValue);
+ } else {
+ email.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Author.Properties.email);
+ if (eefElementEditorReadOnlyState && email.isEnabled()) {
+ email.setEnabled(false);
+ email.setToolTipText(DocbookMessages.Author_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !email.isEnabled()) {
+ email.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#getPersonname()
+ *
+ */
+ @Override
+ public String getPersonname() {
+ return personname.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#setPersonname(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setPersonname(String newValue) {
+ if (newValue != null) {
+ personname.setText(newValue);
+ } else {
+ personname.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Author.Properties.personname);
+ if (eefElementEditorReadOnlyState && personname.isEnabled()) {
+ personname.setEnabled(false);
+ personname.setToolTipText(DocbookMessages.Author_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !personname.isEnabled()) {
+ personname.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#getAddress()
+ *
+ */
+ @Override
+ public String getAddress() {
+ return address.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.AuthorPropertiesEditionPart#setAddress(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setAddress(String newValue) {
+ if (newValue != null) {
+ address.setText(newValue);
+ } else {
+ address.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Author.Properties.address);
+ if (eefElementEditorReadOnlyState && address.isEnabled()) {
+ address.setEnabled(false);
+ address.setToolTipText(DocbookMessages.Author_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !address.isEnabled()) {
+ address.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Author_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/BookPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/BookPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..f9e24e246b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/BookPropertiesEditionPartImpl.java
@@ -0,0 +1,586 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class BookPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, BookPropertiesEditionPart {
+
+ protected ReferencesTable chapter;
+
+ protected List<ViewerFilter> chapterBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> chapterFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ protected Text lang;
+
+ protected Text version;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public BookPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence bookStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = bookStep.addStep(DocbookViewsRepository.Book.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.chapter);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.id);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.lang);
+ propertiesStep.addStep(DocbookViewsRepository.Book.Properties.version);
+
+ composer = new PartComposer(bookStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Book.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.chapter) {
+ return createChapterAdvancedTableComposition(parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.id) {
+ return createIdText(parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.lang) {
+ return createLangText(parent);
+ }
+ if (key == DocbookViewsRepository.Book.Properties.version) {
+ return createVersionText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.BookPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createChapterAdvancedTableComposition(Composite parent) {
+ this.chapter = new ReferencesTable(getDescription(DocbookViewsRepository.Book.Properties.chapter, DocbookMessages.BookPropertiesEditionPart_ChapterLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ chapter.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ chapter.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ chapter.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ chapter.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.chapterFilters) {
+ this.chapter.addFilter(filter);
+ }
+ this.chapter.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.chapter, DocbookViewsRepository.SWT_KIND));
+ this.chapter.createControls(parent);
+ this.chapter.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.chapter,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData chapterData = new GridData(GridData.FILL_HORIZONTAL);
+ chapterData.horizontalSpan = 3;
+ this.chapter.setLayoutData(chapterData);
+ this.chapter.setLowerBound(0);
+ this.chapter.setUpperBound(-1);
+ chapter.setID(DocbookViewsRepository.Book.Properties.chapter);
+ chapter.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createChapterAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Book.Properties.id, DocbookMessages.BookPropertiesEditionPart_IdLabel);
+ id = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+
+ });
+ id.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Book.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.id, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createLangText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Book.Properties.lang, DocbookMessages.BookPropertiesEditionPart_LangLabel);
+ lang = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData langData = new GridData(GridData.FILL_HORIZONTAL);
+ lang.setLayoutData(langData);
+ lang.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.lang,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, lang.getText()));
+ }
+ }
+
+ });
+ lang.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.lang,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, lang.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(lang, DocbookViewsRepository.Book.Properties.lang);
+ EditingUtils.setEEFtype(lang, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.lang, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createLangText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createVersionText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Book.Properties.version, DocbookMessages.BookPropertiesEditionPart_VersionLabel);
+ version = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData versionData = new GridData(GridData.FILL_HORIZONTAL);
+ version.setLayoutData(versionData);
+ version.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.version,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, version.getText()));
+ }
+ }
+
+ });
+ version.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BookPropertiesEditionPartImpl.this, DocbookViewsRepository.Book.Properties.version,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, version.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(version, DocbookViewsRepository.Book.Properties.version);
+ EditingUtils.setEEFtype(version, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Book.Properties.version, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createVersionText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#initChapter(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initChapter(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ chapter.setContentProvider(contentProvider);
+ chapter.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.chapter);
+ if (eefElementEditorReadOnlyState && chapter.isEnabled()) {
+ chapter.setEnabled(false);
+ chapter.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !chapter.isEnabled()) {
+ chapter.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#updateChapter()
+ *
+ */
+ @Override
+ public void updateChapter() {
+ chapter.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#addFilterChapter(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToChapter(ViewerFilter filter) {
+ chapterFilters.add(filter);
+ if (this.chapter != null) {
+ this.chapter.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#addBusinessFilterChapter(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToChapter(ViewerFilter filter) {
+ chapterBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#isContainedInChapterTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInChapterTable(EObject element) {
+ return ((ReferencesTableSettings) chapter.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#getLang()
+ *
+ */
+ @Override
+ public String getLang() {
+ return lang.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#setLang(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setLang(String newValue) {
+ if (newValue != null) {
+ lang.setText(newValue);
+ } else {
+ lang.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.lang);
+ if (eefElementEditorReadOnlyState && lang.isEnabled()) {
+ lang.setEnabled(false);
+ lang.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !lang.isEnabled()) {
+ lang.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#getVersion()
+ *
+ */
+ @Override
+ public String getVersion() {
+ return version.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.BookPropertiesEditionPart#setVersion(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setVersion(String newValue) {
+ if (newValue != null) {
+ version.setText(newValue);
+ } else {
+ version.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Book.Properties.version);
+ if (eefElementEditorReadOnlyState && version.isEnabled()) {
+ version.setEnabled(false);
+ version.setToolTipText(DocbookMessages.Book_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !version.isEnabled()) {
+ version.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Book_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ChapterPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ChapterPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..fece8299e9
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ChapterPropertiesEditionPartImpl.java
@@ -0,0 +1,551 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ChapterPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, ChapterPropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected ReferencesTable sect1;
+
+ protected List<ViewerFilter> sect1BusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> sect1Filters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ChapterPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence chapterStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = chapterStep.addStep(DocbookViewsRepository.Chapter.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Chapter.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Chapter.Properties.sect1);
+ propertiesStep.addStep(DocbookViewsRepository.Chapter.Properties.id);
+
+ composer = new PartComposer(chapterStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Chapter.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Chapter.Properties.para) {
+ return createParaAdvancedTableComposition(parent);
+ }
+ if (key == DocbookViewsRepository.Chapter.Properties.sect1) {
+ return createSect1AdvancedTableComposition(parent);
+ }
+ if (key == DocbookViewsRepository.Chapter.Properties.id) {
+ return createIdText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.ChapterPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaAdvancedTableComposition(Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Chapter.Properties.para, DocbookMessages.ChapterPropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Chapter.Properties.para, DocbookViewsRepository.SWT_KIND));
+ this.para.createControls(parent);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Chapter.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createSect1AdvancedTableComposition(Composite parent) {
+ this.sect1 = new ReferencesTable(getDescription(DocbookViewsRepository.Chapter.Properties.sect1, DocbookMessages.ChapterPropertiesEditionPart_Sect1Label), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ sect1.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ sect1.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ sect1.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ sect1.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.sect1Filters) {
+ this.sect1.addFilter(filter);
+ }
+ this.sect1.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Chapter.Properties.sect1, DocbookViewsRepository.SWT_KIND));
+ this.sect1.createControls(parent);
+ this.sect1.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.sect1,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData sect1Data = new GridData(GridData.FILL_HORIZONTAL);
+ sect1Data.horizontalSpan = 3;
+ this.sect1.setLayoutData(sect1Data);
+ this.sect1.setLowerBound(0);
+ this.sect1.setUpperBound(-1);
+ sect1.setID(DocbookViewsRepository.Chapter.Properties.sect1);
+ sect1.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createSect1AdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Chapter.Properties.id, DocbookMessages.ChapterPropertiesEditionPart_IdLabel);
+ id = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+
+ });
+ id.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChapterPropertiesEditionPartImpl.this, DocbookViewsRepository.Chapter.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Chapter.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Chapter.Properties.id, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Chapter.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Chapter_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#initSect1(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initSect1(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ sect1.setContentProvider(contentProvider);
+ sect1.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Chapter.Properties.sect1);
+ if (eefElementEditorReadOnlyState && sect1.isEnabled()) {
+ sect1.setEnabled(false);
+ sect1.setToolTipText(DocbookMessages.Chapter_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !sect1.isEnabled()) {
+ sect1.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#updateSect1()
+ *
+ */
+ @Override
+ public void updateSect1() {
+ sect1.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addFilterSect1(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToSect1(ViewerFilter filter) {
+ sect1Filters.add(filter);
+ if (this.sect1 != null) {
+ this.sect1.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#addBusinessFilterSect1(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToSect1(ViewerFilter filter) {
+ sect1BusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#isContainedInSect1Table(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInSect1Table(EObject element) {
+ return ((ReferencesTableSettings) sect1.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ChapterPropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Chapter.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Chapter_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Chapter_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/EmphasisPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/EmphasisPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..55e3e19569
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/EmphasisPropertiesEditionPartImpl.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.EmphasisPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class EmphasisPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, EmphasisPropertiesEditionPart {
+
+ protected Text remap;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public EmphasisPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence emphasisStep = new BindingCompositionSequence(propertiesEditionComponent);
+ emphasisStep.addStep(DocbookViewsRepository.Emphasis.Properties.class).addStep(DocbookViewsRepository.Emphasis.Properties.remap);
+
+ composer = new PartComposer(emphasisStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Emphasis.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Emphasis.Properties.remap) {
+ return createRemapText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.EmphasisPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createRemapText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Emphasis.Properties.remap, DocbookMessages.EmphasisPropertiesEditionPart_RemapLabel);
+ remap = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData remapData = new GridData(GridData.FILL_HORIZONTAL);
+ remap.setLayoutData(remapData);
+ remap.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EmphasisPropertiesEditionPartImpl.this, DocbookViewsRepository.Emphasis.Properties.remap,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, remap.getText()));
+ }
+ }
+
+ });
+ remap.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EmphasisPropertiesEditionPartImpl.this, DocbookViewsRepository.Emphasis.Properties.remap,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, remap.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(remap, DocbookViewsRepository.Emphasis.Properties.remap);
+ EditingUtils.setEEFtype(remap, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Emphasis.Properties.remap, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createRemapText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.EmphasisPropertiesEditionPart#getRemap()
+ *
+ */
+ @Override
+ public String getRemap() {
+ return remap.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.EmphasisPropertiesEditionPart#setRemap(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setRemap(String newValue) {
+ if (newValue != null) {
+ remap.setText(newValue);
+ } else {
+ remap.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Emphasis.Properties.remap);
+ if (eefElementEditorReadOnlyState && remap.isEnabled()) {
+ remap.setEnabled(false);
+ remap.setToolTipText(DocbookMessages.Emphasis_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !remap.isEnabled()) {
+ remap.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Emphasis_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ExamplePropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ExamplePropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..6039a4c189
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ExamplePropertiesEditionPartImpl.java
@@ -0,0 +1,298 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ExamplePropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, ExamplePropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ExamplePropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence exampleStep = new BindingCompositionSequence(propertiesEditionComponent);
+ exampleStep.addStep(DocbookViewsRepository.Example.Properties.class).addStep(DocbookViewsRepository.Example.Properties.para);
+
+ composer = new PartComposer(exampleStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Example.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Example.Properties.para) {
+ return createParaAdvancedTableComposition(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.ExamplePropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaAdvancedTableComposition(Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Example.Properties.para, DocbookMessages.ExamplePropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartImpl.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartImpl.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartImpl.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartImpl.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Example.Properties.para, DocbookViewsRepository.SWT_KIND));
+ this.para.createControls(parent);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExamplePropertiesEditionPartImpl.this, DocbookViewsRepository.Example.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Example.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Example.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Example_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ExamplePropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Example_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/InfoPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/InfoPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..e5b07a7409
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/InfoPropertiesEditionPartImpl.java
@@ -0,0 +1,493 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class InfoPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, InfoPropertiesEditionPart {
+
+ protected ReferencesTable author;
+
+ protected List<ViewerFilter> authorBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> authorFilters = new ArrayList<ViewerFilter>();
+
+ protected Text date;
+
+ protected Text pubdate;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public InfoPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence infoStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = infoStep.addStep(DocbookViewsRepository.Info.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Info.Properties.author);
+ propertiesStep.addStep(DocbookViewsRepository.Info.Properties.date);
+ propertiesStep.addStep(DocbookViewsRepository.Info.Properties.pubdate);
+
+ composer = new PartComposer(infoStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Info.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Info.Properties.author) {
+ return createAuthorAdvancedTableComposition(parent);
+ }
+ if (key == DocbookViewsRepository.Info.Properties.date) {
+ return createDateText(parent);
+ }
+ if (key == DocbookViewsRepository.Info.Properties.pubdate) {
+ return createPubdateText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.InfoPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createAuthorAdvancedTableComposition(Composite parent) {
+ this.author = new ReferencesTable(getDescription(DocbookViewsRepository.Info.Properties.author, DocbookMessages.InfoPropertiesEditionPart_AuthorLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ author.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ author.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ author.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ author.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.authorFilters) {
+ this.author.addFilter(filter);
+ }
+ this.author.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Info.Properties.author, DocbookViewsRepository.SWT_KIND));
+ this.author.createControls(parent);
+ this.author.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.author,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData authorData = new GridData(GridData.FILL_HORIZONTAL);
+ authorData.horizontalSpan = 3;
+ this.author.setLayoutData(authorData);
+ this.author.setLowerBound(0);
+ this.author.setUpperBound(-1);
+ author.setID(DocbookViewsRepository.Info.Properties.author);
+ author.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createAuthorAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createDateText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Info.Properties.date, DocbookMessages.InfoPropertiesEditionPart_DateLabel);
+ date = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData dateData = new GridData(GridData.FILL_HORIZONTAL);
+ date.setLayoutData(dateData);
+ date.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.date,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, date.getText()));
+ }
+ }
+
+ });
+ date.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.date,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, date.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(date, DocbookViewsRepository.Info.Properties.date);
+ EditingUtils.setEEFtype(date, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Info.Properties.date, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createDateText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createPubdateText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Info.Properties.pubdate, DocbookMessages.InfoPropertiesEditionPart_PubdateLabel);
+ pubdate = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData pubdateData = new GridData(GridData.FILL_HORIZONTAL);
+ pubdate.setLayoutData(pubdateData);
+ pubdate.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.pubdate,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, pubdate.getText()));
+ }
+ }
+
+ });
+ pubdate.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InfoPropertiesEditionPartImpl.this, DocbookViewsRepository.Info.Properties.pubdate,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, pubdate.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(pubdate, DocbookViewsRepository.Info.Properties.pubdate);
+ EditingUtils.setEEFtype(pubdate, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Info.Properties.pubdate, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createPubdateText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#initAuthor(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initAuthor(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ author.setContentProvider(contentProvider);
+ author.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Info.Properties.author);
+ if (eefElementEditorReadOnlyState && author.isEnabled()) {
+ author.setEnabled(false);
+ author.setToolTipText(DocbookMessages.Info_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !author.isEnabled()) {
+ author.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#updateAuthor()
+ *
+ */
+ @Override
+ public void updateAuthor() {
+ author.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#addFilterAuthor(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToAuthor(ViewerFilter filter) {
+ authorFilters.add(filter);
+ if (this.author != null) {
+ this.author.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#addBusinessFilterAuthor(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToAuthor(ViewerFilter filter) {
+ authorBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#isContainedInAuthorTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInAuthorTable(EObject element) {
+ return ((ReferencesTableSettings) author.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#getDate()
+ *
+ */
+ @Override
+ public String getDate() {
+ return date.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#setDate(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setDate(String newValue) {
+ if (newValue != null) {
+ date.setText(newValue);
+ } else {
+ date.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Info.Properties.date);
+ if (eefElementEditorReadOnlyState && date.isEnabled()) {
+ date.setEnabled(false);
+ date.setToolTipText(DocbookMessages.Info_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !date.isEnabled()) {
+ date.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#getPubdate()
+ *
+ */
+ @Override
+ public String getPubdate() {
+ return pubdate.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.InfoPropertiesEditionPart#setPubdate(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setPubdate(String newValue) {
+ if (newValue != null) {
+ pubdate.setText(newValue);
+ } else {
+ pubdate.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Info.Properties.pubdate);
+ if (eefElementEditorReadOnlyState && pubdate.isEnabled()) {
+ pubdate.setEnabled(false);
+ pubdate.setToolTipText(DocbookMessages.Info_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !pubdate.isEnabled()) {
+ pubdate.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Info_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ItemizedListPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ItemizedListPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..824728cdaf
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ItemizedListPropertiesEditionPartImpl.java
@@ -0,0 +1,401 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ItemizedListPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, ItemizedListPropertiesEditionPart {
+
+ protected Text mark;
+
+ protected ReferencesTable listitem;
+
+ protected List<ViewerFilter> listitemBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> listitemFilters = new ArrayList<ViewerFilter>();
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ItemizedListPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence itemizedListStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = itemizedListStep.addStep(DocbookViewsRepository.ItemizedList.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.ItemizedList.Properties.mark);
+ propertiesStep.addStep(DocbookViewsRepository.ItemizedList.Properties.listitem);
+
+ composer = new PartComposer(itemizedListStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.ItemizedList.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.ItemizedList.Properties.mark) {
+ return createMarkText(parent);
+ }
+ if (key == DocbookViewsRepository.ItemizedList.Properties.listitem) {
+ return createListitemAdvancedTableComposition(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.ItemizedListPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createMarkText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.ItemizedList.Properties.mark, DocbookMessages.ItemizedListPropertiesEditionPart_MarkLabel);
+ mark = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData markData = new GridData(GridData.FILL_HORIZONTAL);
+ mark.setLayoutData(markData);
+ mark.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartImpl.this, DocbookViewsRepository.ItemizedList.Properties.mark,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, mark.getText()));
+ }
+ }
+
+ });
+ mark.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartImpl.this, DocbookViewsRepository.ItemizedList.Properties.mark,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, mark.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(mark, DocbookViewsRepository.ItemizedList.Properties.mark);
+ EditingUtils.setEEFtype(mark, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ItemizedList.Properties.mark, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createMarkText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createListitemAdvancedTableComposition(Composite parent) {
+ this.listitem = new ReferencesTable(getDescription(DocbookViewsRepository.ItemizedList.Properties.listitem, DocbookMessages.ItemizedListPropertiesEditionPart_ListitemLabel),
+ new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartImpl.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ listitem.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartImpl.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ listitem.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartImpl.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ listitem.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartImpl.this,
+ DocbookViewsRepository.ItemizedList.Properties.listitem, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ listitem.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.listitemFilters) {
+ this.listitem.addFilter(filter);
+ }
+ this.listitem.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ItemizedList.Properties.listitem, DocbookViewsRepository.SWT_KIND));
+ this.listitem.createControls(parent);
+ this.listitem.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ItemizedListPropertiesEditionPartImpl.this, DocbookViewsRepository.ItemizedList.Properties.listitem,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData listitemData = new GridData(GridData.FILL_HORIZONTAL);
+ listitemData.horizontalSpan = 3;
+ this.listitem.setLayoutData(listitemData);
+ this.listitem.setLowerBound(0);
+ this.listitem.setUpperBound(-1);
+ listitem.setID(DocbookViewsRepository.ItemizedList.Properties.listitem);
+ listitem.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createListitemAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#getMark()
+ *
+ */
+ @Override
+ public String getMark() {
+ return mark.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#setMark(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setMark(String newValue) {
+ if (newValue != null) {
+ mark.setText(newValue);
+ } else {
+ mark.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ItemizedList.Properties.mark);
+ if (eefElementEditorReadOnlyState && mark.isEnabled()) {
+ mark.setEnabled(false);
+ mark.setToolTipText(DocbookMessages.ItemizedList_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !mark.isEnabled()) {
+ mark.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#initListitem(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initListitem(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ listitem.setContentProvider(contentProvider);
+ listitem.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ItemizedList.Properties.listitem);
+ if (eefElementEditorReadOnlyState && listitem.isEnabled()) {
+ listitem.setEnabled(false);
+ listitem.setToolTipText(DocbookMessages.ItemizedList_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !listitem.isEnabled()) {
+ listitem.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#updateListitem()
+ *
+ */
+ @Override
+ public void updateListitem() {
+ listitem.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#addFilterListitem(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToListitem(ViewerFilter filter) {
+ listitemFilters.add(filter);
+ if (this.listitem != null) {
+ this.listitem.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#addBusinessFilterListitem(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToListitem(ViewerFilter filter) {
+ listitemBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ItemizedListPropertiesEditionPart#isContainedInListitemTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInListitemTable(EObject element) {
+ return ((ReferencesTableSettings) listitem.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.ItemizedList_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/LinkPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/LinkPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..cc430f20a2
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/LinkPropertiesEditionPartImpl.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.sirius.tests.sample.docbook.parts.LinkPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class LinkPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, LinkPropertiesEditionPart {
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public LinkPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence linkStep = new BindingCompositionSequence(propertiesEditionComponent);
+
+ composer = new PartComposer(linkStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Link_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ListItemPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ListItemPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..a43a276de5
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ListItemPropertiesEditionPartImpl.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.sirius.tests.sample.docbook.parts.ListItemPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ListItemPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, ListItemPropertiesEditionPart {
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ListItemPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence listItemStep = new BindingCompositionSequence(propertiesEditionComponent);
+
+ composer = new PartComposer(listItemStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.ListItem_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/OrderedListPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/OrderedListPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..d66b37e9ca
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/OrderedListPropertiesEditionPartImpl.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.OrderedListPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class OrderedListPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, OrderedListPropertiesEditionPart {
+
+ protected Text numeration;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public OrderedListPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence orderedListStep = new BindingCompositionSequence(propertiesEditionComponent);
+ orderedListStep.addStep(DocbookViewsRepository.OrderedList.Properties.class).addStep(DocbookViewsRepository.OrderedList.Properties.numeration);
+
+ composer = new PartComposer(orderedListStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.OrderedList.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.OrderedList.Properties.numeration) {
+ return createNumerationText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.OrderedListPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createNumerationText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.OrderedList.Properties.numeration, DocbookMessages.OrderedListPropertiesEditionPart_NumerationLabel);
+ numeration = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData numerationData = new GridData(GridData.FILL_HORIZONTAL);
+ numeration.setLayoutData(numerationData);
+ numeration.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OrderedListPropertiesEditionPartImpl.this, DocbookViewsRepository.OrderedList.Properties.numeration,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, numeration.getText()));
+ }
+ }
+
+ });
+ numeration.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OrderedListPropertiesEditionPartImpl.this,
+ DocbookViewsRepository.OrderedList.Properties.numeration, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, numeration.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(numeration, DocbookViewsRepository.OrderedList.Properties.numeration);
+ EditingUtils.setEEFtype(numeration, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.OrderedList.Properties.numeration, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createNumerationText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.OrderedListPropertiesEditionPart#getNumeration()
+ *
+ */
+ @Override
+ public String getNumeration() {
+ return numeration.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.OrderedListPropertiesEditionPart#setNumeration(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setNumeration(String newValue) {
+ if (newValue != null) {
+ numeration.setText(newValue);
+ } else {
+ numeration.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.OrderedList.Properties.numeration);
+ if (eefElementEditorReadOnlyState && numeration.isEnabled()) {
+ numeration.setEnabled(false);
+ numeration.setToolTipText(DocbookMessages.OrderedList_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !numeration.isEnabled()) {
+ numeration.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.OrderedList_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ParaPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ParaPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..6f6f355e0d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ParaPropertiesEditionPartImpl.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ParaPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ParaPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, ParaPropertiesEditionPart {
+
+ protected Text data;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ParaPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence paraStep = new BindingCompositionSequence(propertiesEditionComponent);
+ paraStep.addStep(DocbookViewsRepository.Para.Properties.class).addStep(DocbookViewsRepository.Para.Properties.data);
+
+ composer = new PartComposer(paraStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Para.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Para.Properties.data) {
+ return createDataText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.ParaPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createDataText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Para.Properties.data, DocbookMessages.ParaPropertiesEditionPart_DataLabel);
+ data = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData dataData = new GridData(GridData.FILL_HORIZONTAL);
+ data.setLayoutData(dataData);
+ data.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ParaPropertiesEditionPartImpl.this, DocbookViewsRepository.Para.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+
+ });
+ data.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ParaPropertiesEditionPartImpl.this, DocbookViewsRepository.Para.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(data, DocbookViewsRepository.Para.Properties.data);
+ EditingUtils.setEEFtype(data, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Para.Properties.data, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createDataText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ParaPropertiesEditionPart#getData()
+ *
+ */
+ @Override
+ public String getData() {
+ return data.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ParaPropertiesEditionPart#setData(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setData(String newValue) {
+ if (newValue != null) {
+ data.setText(newValue);
+ } else {
+ data.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Para.Properties.data);
+ if (eefElementEditorReadOnlyState && data.isEnabled()) {
+ data.setEnabled(false);
+ data.setToolTipText(DocbookMessages.Para_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !data.isEnabled()) {
+ data.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Para_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect1PropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect1PropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..348eddf509
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect1PropertiesEditionPartImpl.java
@@ -0,0 +1,551 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect1PropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, Sect1PropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ protected ReferencesTable sect2;
+
+ protected List<ViewerFilter> sect2BusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> sect2Filters = new ArrayList<ViewerFilter>();
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Sect1PropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence sect1Step = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = sect1Step.addStep(DocbookViewsRepository.Sect1.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Sect1.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Sect1.Properties.id);
+ propertiesStep.addStep(DocbookViewsRepository.Sect1.Properties.sect2);
+
+ composer = new PartComposer(sect1Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Sect1.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Sect1.Properties.para) {
+ return createParaAdvancedTableComposition(parent);
+ }
+ if (key == DocbookViewsRepository.Sect1.Properties.id) {
+ return createIdText(parent);
+ }
+ if (key == DocbookViewsRepository.Sect1.Properties.sect2) {
+ return createSect2AdvancedTableComposition(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.Sect1PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaAdvancedTableComposition(Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Sect1.Properties.para, DocbookMessages.Sect1PropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect1.Properties.para, DocbookViewsRepository.SWT_KIND));
+ this.para.createControls(parent);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Sect1.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Sect1.Properties.id, DocbookMessages.Sect1PropertiesEditionPart_IdLabel);
+ id = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+
+ });
+ id.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Sect1.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect1.Properties.id, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createSect2AdvancedTableComposition(Composite parent) {
+ this.sect2 = new ReferencesTable(getDescription(DocbookViewsRepository.Sect1.Properties.sect2, DocbookMessages.Sect1PropertiesEditionPart_Sect2Label), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ sect2.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ sect2.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ sect2.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ sect2.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.sect2Filters) {
+ this.sect2.addFilter(filter);
+ }
+ this.sect2.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect1.Properties.sect2, DocbookViewsRepository.SWT_KIND));
+ this.sect2.createControls(parent);
+ this.sect2.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect1PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect1.Properties.sect2,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData sect2Data = new GridData(GridData.FILL_HORIZONTAL);
+ sect2Data.horizontalSpan = 3;
+ this.sect2.setLayoutData(sect2Data);
+ this.sect2.setLowerBound(0);
+ this.sect2.setUpperBound(-1);
+ sect2.setID(DocbookViewsRepository.Sect1.Properties.sect2);
+ sect2.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createSect2AdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect1.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Sect1_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect1.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Sect1_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#initSect2(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initSect2(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ sect2.setContentProvider(contentProvider);
+ sect2.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect1.Properties.sect2);
+ if (eefElementEditorReadOnlyState && sect2.isEnabled()) {
+ sect2.setEnabled(false);
+ sect2.setToolTipText(DocbookMessages.Sect1_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !sect2.isEnabled()) {
+ sect2.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#updateSect2()
+ *
+ */
+ @Override
+ public void updateSect2() {
+ sect2.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addFilterSect2(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToSect2(ViewerFilter filter) {
+ sect2Filters.add(filter);
+ if (this.sect2 != null) {
+ this.sect2.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#addBusinessFilterSect2(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToSect2(ViewerFilter filter) {
+ sect2BusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect1PropertiesEditionPart#isContainedInSect2Table(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInSect2Table(EObject element) {
+ return ((ReferencesTableSettings) sect2.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Sect1_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect2PropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect2PropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..7839438695
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect2PropertiesEditionPartImpl.java
@@ -0,0 +1,551 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect2PropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, Sect2PropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ protected ReferencesTable sect3;
+
+ protected List<ViewerFilter> sect3BusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> sect3Filters = new ArrayList<ViewerFilter>();
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Sect2PropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence sect2Step = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = sect2Step.addStep(DocbookViewsRepository.Sect2.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Sect2.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Sect2.Properties.id);
+ propertiesStep.addStep(DocbookViewsRepository.Sect2.Properties.sect3);
+
+ composer = new PartComposer(sect2Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Sect2.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Sect2.Properties.para) {
+ return createParaAdvancedTableComposition(parent);
+ }
+ if (key == DocbookViewsRepository.Sect2.Properties.id) {
+ return createIdText(parent);
+ }
+ if (key == DocbookViewsRepository.Sect2.Properties.sect3) {
+ return createSect3AdvancedTableComposition(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.Sect2PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaAdvancedTableComposition(Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Sect2.Properties.para, DocbookMessages.Sect2PropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect2.Properties.para, DocbookViewsRepository.SWT_KIND));
+ this.para.createControls(parent);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Sect2.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Sect2.Properties.id, DocbookMessages.Sect2PropertiesEditionPart_IdLabel);
+ id = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+
+ });
+ id.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Sect2.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect2.Properties.id, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createSect3AdvancedTableComposition(Composite parent) {
+ this.sect3 = new ReferencesTable(getDescription(DocbookViewsRepository.Sect2.Properties.sect3, DocbookMessages.Sect2PropertiesEditionPart_Sect3Label), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ sect3.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ sect3.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ sect3.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ sect3.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.sect3Filters) {
+ this.sect3.addFilter(filter);
+ }
+ this.sect3.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect2.Properties.sect3, DocbookViewsRepository.SWT_KIND));
+ this.sect3.createControls(parent);
+ this.sect3.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect2PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect2.Properties.sect3,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData sect3Data = new GridData(GridData.FILL_HORIZONTAL);
+ sect3Data.horizontalSpan = 3;
+ this.sect3.setLayoutData(sect3Data);
+ this.sect3.setLowerBound(0);
+ this.sect3.setUpperBound(-1);
+ sect3.setID(DocbookViewsRepository.Sect2.Properties.sect3);
+ sect3.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createSect3AdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect2.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Sect2_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect2.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Sect2_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#initSect3(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initSect3(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ sect3.setContentProvider(contentProvider);
+ sect3.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect2.Properties.sect3);
+ if (eefElementEditorReadOnlyState && sect3.isEnabled()) {
+ sect3.setEnabled(false);
+ sect3.setToolTipText(DocbookMessages.Sect2_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !sect3.isEnabled()) {
+ sect3.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#updateSect3()
+ *
+ */
+ @Override
+ public void updateSect3() {
+ sect3.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addFilterSect3(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToSect3(ViewerFilter filter) {
+ sect3Filters.add(filter);
+ if (this.sect3 != null) {
+ this.sect3.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#addBusinessFilterSect3(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToSect3(ViewerFilter filter) {
+ sect3BusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect2PropertiesEditionPart#isContainedInSect3Table(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInSect3Table(EObject element) {
+ return ((ReferencesTableSettings) sect3.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Sect2_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect3PropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect3PropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..d1bfed779f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Sect3PropertiesEditionPartImpl.java
@@ -0,0 +1,400 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
+import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Sect3PropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, Sect3PropertiesEditionPart {
+
+ protected ReferencesTable para;
+
+ protected List<ViewerFilter> paraBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> paraFilters = new ArrayList<ViewerFilter>();
+
+ protected Text id;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Sect3PropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence sect3Step = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = sect3Step.addStep(DocbookViewsRepository.Sect3.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.Sect3.Properties.para);
+ propertiesStep.addStep(DocbookViewsRepository.Sect3.Properties.id);
+
+ composer = new PartComposer(sect3Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Sect3.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Sect3.Properties.para) {
+ return createParaAdvancedTableComposition(parent);
+ }
+ if (key == DocbookViewsRepository.Sect3.Properties.id) {
+ return createIdText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.Sect3PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ /**
+ * @param container
+ *
+ */
+ protected Composite createParaAdvancedTableComposition(Composite parent) {
+ this.para = new ReferencesTable(getDescription(DocbookViewsRepository.Sect3.Properties.para, DocbookMessages.Sect3PropertiesEditionPart_ParaLabel), new ReferencesTableListener() {
+ @Override
+ public void handleAdd() {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
+ para.refresh();
+ }
+
+ @Override
+ public void handleEdit(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void handleMove(EObject element, int oldIndex, int newIndex) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
+ para.refresh();
+ }
+
+ @Override
+ public void handleRemove(EObject element) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
+ para.refresh();
+ }
+
+ @Override
+ public void navigateTo(EObject element) {
+ }
+ });
+ for (ViewerFilter filter : this.paraFilters) {
+ this.para.addFilter(filter);
+ }
+ this.para.setHelpText(propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect3.Properties.para, DocbookViewsRepository.SWT_KIND));
+ this.para.createControls(parent);
+ this.para.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (e.item != null && e.item.getData() instanceof EObject) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect3.Properties.para,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
+ }
+ }
+
+ });
+ GridData paraData = new GridData(GridData.FILL_HORIZONTAL);
+ paraData.horizontalSpan = 3;
+ this.para.setLayoutData(paraData);
+ this.para.setLowerBound(0);
+ this.para.setUpperBound(-1);
+ para.setID(DocbookViewsRepository.Sect3.Properties.para);
+ para.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$
+ // Start of user code for createParaAdvancedTableComposition
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createIdText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Sect3.Properties.id, DocbookMessages.Sect3PropertiesEditionPart_IdLabel);
+ id = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData idData = new GridData(GridData.FILL_HORIZONTAL);
+ id.setLayoutData(idData);
+ id.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect3.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+
+ });
+ id.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Sect3PropertiesEditionPartImpl.this, DocbookViewsRepository.Sect3.Properties.id,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(id, DocbookViewsRepository.Sect3.Properties.id);
+ EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Sect3.Properties.id, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createIdText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#initPara(EObject
+ * current, EReference containingFeature, EReference feature)
+ */
+ @Override
+ public void initPara(ReferencesTableSettings settings) {
+ if (current.eResource() != null && current.eResource().getResourceSet() != null) {
+ this.resourceSet = current.eResource().getResourceSet();
+ }
+ ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
+ para.setContentProvider(contentProvider);
+ para.setInput(settings);
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect3.Properties.para);
+ if (eefElementEditorReadOnlyState && para.isEnabled()) {
+ para.setEnabled(false);
+ para.setToolTipText(DocbookMessages.Sect3_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !para.isEnabled()) {
+ para.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#updatePara()
+ *
+ */
+ @Override
+ public void updatePara() {
+ para.refresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#addFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addFilterToPara(ViewerFilter filter) {
+ paraFilters.add(filter);
+ if (this.para != null) {
+ this.para.addFilter(filter);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#addBusinessFilterPara(ViewerFilter
+ * filter)
+ *
+ */
+ @Override
+ public void addBusinessFilterToPara(ViewerFilter filter) {
+ paraBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#isContainedInParaTable(EObject
+ * element)
+ *
+ */
+ @Override
+ public boolean isContainedInParaTable(EObject element) {
+ return ((ReferencesTableSettings) para.getInput()).contains(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#getId()
+ *
+ */
+ @Override
+ public String getId() {
+ return id.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Sect3PropertiesEditionPart#setId(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setId(String newValue) {
+ if (newValue != null) {
+ id.setText(newValue);
+ } else {
+ id.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Sect3.Properties.id);
+ if (eefElementEditorReadOnlyState && id.isEnabled()) {
+ id.setEnabled(false);
+ id.setToolTipText(DocbookMessages.Sect3_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
+ id.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Sect3_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/SimpleListPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/SimpleListPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..4e5e213d1b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/SimpleListPropertiesEditionPartImpl.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.sirius.tests.sample.docbook.parts.SimpleListPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class SimpleListPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, SimpleListPropertiesEditionPart {
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public SimpleListPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence simpleListStep = new BindingCompositionSequence(propertiesEditionComponent);
+
+ composer = new PartComposer(simpleListStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.SimpleList_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Title_PropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Title_PropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..712d99d82b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/Title_PropertiesEditionPartImpl.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.Title_PropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class Title_PropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, Title_PropertiesEditionPart {
+
+ protected Text data;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public Title_PropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence title_Step = new BindingCompositionSequence(propertiesEditionComponent);
+ title_Step.addStep(DocbookViewsRepository.Title_.Properties.class).addStep(DocbookViewsRepository.Title_.Properties.data);
+
+ composer = new PartComposer(title_Step) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.Title_.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.Title_.Properties.data) {
+ return createDataText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.Title_PropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createDataText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.Title_.Properties.data, DocbookMessages.Title_PropertiesEditionPart_DataLabel);
+ data = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData dataData = new GridData(GridData.FILL_HORIZONTAL);
+ data.setLayoutData(dataData);
+ data.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Title_PropertiesEditionPartImpl.this, DocbookViewsRepository.Title_.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+
+ });
+ data.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Title_PropertiesEditionPartImpl.this, DocbookViewsRepository.Title_.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(data, DocbookViewsRepository.Title_.Properties.data);
+ EditingUtils.setEEFtype(data, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.Title_.Properties.data, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createDataText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Title_PropertiesEditionPart#getData()
+ *
+ */
+ @Override
+ public String getData() {
+ return data.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.Title_PropertiesEditionPart#setData(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setData(String newValue) {
+ if (newValue != null) {
+ data.setText(newValue);
+ } else {
+ data.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.Title_.Properties.data);
+ if (eefElementEditorReadOnlyState && data.isEnabled()) {
+ data.setEnabled(false);
+ data.setToolTipText(DocbookMessages.Title__ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !data.isEnabled()) {
+ data.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.Title__Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ULinkPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ULinkPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..fa5d0ceeda
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/ULinkPropertiesEditionPartImpl.java
@@ -0,0 +1,330 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class ULinkPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, ULinkPropertiesEditionPart {
+
+ protected Text url;
+
+ protected Text data;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public ULinkPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence uLinkStep = new BindingCompositionSequence(propertiesEditionComponent);
+ CompositionStep propertiesStep = uLinkStep.addStep(DocbookViewsRepository.ULink.Properties.class);
+ propertiesStep.addStep(DocbookViewsRepository.ULink.Properties.url);
+ propertiesStep.addStep(DocbookViewsRepository.ULink.Properties.data);
+
+ composer = new PartComposer(uLinkStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.ULink.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.ULink.Properties.url) {
+ return createUrlText(parent);
+ }
+ if (key == DocbookViewsRepository.ULink.Properties.data) {
+ return createDataText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.ULinkPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createUrlText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.ULink.Properties.url, DocbookMessages.ULinkPropertiesEditionPart_UrlLabel);
+ url = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData urlData = new GridData(GridData.FILL_HORIZONTAL);
+ url.setLayoutData(urlData);
+ url.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartImpl.this, DocbookViewsRepository.ULink.Properties.url,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, url.getText()));
+ }
+ }
+
+ });
+ url.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartImpl.this, DocbookViewsRepository.ULink.Properties.url,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, url.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(url, DocbookViewsRepository.ULink.Properties.url);
+ EditingUtils.setEEFtype(url, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ULink.Properties.url, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createUrlText
+
+ // End of user code
+ return parent;
+ }
+
+ protected Composite createDataText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.ULink.Properties.data, DocbookMessages.ULinkPropertiesEditionPart_DataLabel);
+ data = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData dataData = new GridData(GridData.FILL_HORIZONTAL);
+ data.setLayoutData(dataData);
+ data.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartImpl.this, DocbookViewsRepository.ULink.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+
+ });
+ data.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ULinkPropertiesEditionPartImpl.this, DocbookViewsRepository.ULink.Properties.data,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, data.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(data, DocbookViewsRepository.ULink.Properties.data);
+ EditingUtils.setEEFtype(data, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.ULink.Properties.data, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createDataText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#getUrl()
+ *
+ */
+ @Override
+ public String getUrl() {
+ return url.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#setUrl(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setUrl(String newValue) {
+ if (newValue != null) {
+ url.setText(newValue);
+ } else {
+ url.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ULink.Properties.url);
+ if (eefElementEditorReadOnlyState && url.isEnabled()) {
+ url.setEnabled(false);
+ url.setToolTipText(DocbookMessages.ULink_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !url.isEnabled()) {
+ url.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#getData()
+ *
+ */
+ @Override
+ public String getData() {
+ return data.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.ULinkPropertiesEditionPart#setData(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setData(String newValue) {
+ if (newValue != null) {
+ data.setText(newValue);
+ } else {
+ data.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.ULink.Properties.data);
+ if (eefElementEditorReadOnlyState && data.isEnabled()) {
+ data.setEnabled(false);
+ data.setToolTipText(DocbookMessages.ULink_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !data.isEnabled()) {
+ data.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.ULink_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/XRefPropertiesEditionPartImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/XRefPropertiesEditionPartImpl.java
new file mode 100644
index 0000000000..1794adc547
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/parts/impl/XRefPropertiesEditionPartImpl.java
@@ -0,0 +1,235 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.parts.impl;
+
+// Start of user code for imports
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
+import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.XRefPropertiesEditionPart;
+import org.eclipse.sirius.tests.sample.docbook.providers.DocbookMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+// End of user code
+
+/**
+ *
+ *
+ */
+public class XRefPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, XRefPropertiesEditionPart {
+
+ protected Text linkend;
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ *
+ */
+ public XRefPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createFigure(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
+ * createControls(org.eclipse.swt.widgets.Composite)
+ *
+ */
+ @Override
+ public void createControls(Composite view) {
+ CompositionSequence xRefStep = new BindingCompositionSequence(propertiesEditionComponent);
+ xRefStep.addStep(DocbookViewsRepository.XRef.Properties.class).addStep(DocbookViewsRepository.XRef.Properties.linkend);
+
+ composer = new PartComposer(xRefStep) {
+
+ @Override
+ public Composite addToPart(Composite parent, Object key) {
+ if (key == DocbookViewsRepository.XRef.Properties.class) {
+ return createPropertiesGroup(parent);
+ }
+ if (key == DocbookViewsRepository.XRef.Properties.linkend) {
+ return createLinkendText(parent);
+ }
+ return parent;
+ }
+ };
+ composer.compose(view);
+ }
+
+ /**
+ *
+ */
+ protected Composite createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(DocbookMessages.XRefPropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ return propertiesGroup;
+ }
+
+ protected Composite createLinkendText(Composite parent) {
+ createDescription(parent, DocbookViewsRepository.XRef.Properties.linkend, DocbookMessages.XRefPropertiesEditionPart_LinkendLabel);
+ linkend = SWTUtils.createScrollableText(parent, SWT.BORDER);
+ GridData linkendData = new GridData(GridData.FILL_HORIZONTAL);
+ linkend.setLayoutData(linkendData);
+ linkend.addFocusListener(new FocusAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void focusLost(FocusEvent e) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(XRefPropertiesEditionPartImpl.this, DocbookViewsRepository.XRef.Properties.linkend,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, linkend.getText()));
+ }
+ }
+
+ });
+ linkend.addKeyListener(new KeyAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void keyPressed(KeyEvent e) {
+ if (e.character == SWT.CR) {
+ if (propertiesEditionComponent != null) {
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(XRefPropertiesEditionPartImpl.this, DocbookViewsRepository.XRef.Properties.linkend,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, linkend.getText()));
+ }
+ }
+ }
+
+ });
+ EditingUtils.setID(linkend, DocbookViewsRepository.XRef.Properties.linkend);
+ EditingUtils.setEEFtype(linkend, "eef::Text"); //$NON-NLS-1$
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DocbookViewsRepository.XRef.Properties.linkend, DocbookViewsRepository.SWT_KIND), null);
+ // Start of user code for createLinkendText
+
+ // End of user code
+ return parent;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
+ *
+ */
+ @Override
+ public void firePropertiesChanged(IPropertiesEditionEvent event) {
+ // Start of user code for tab synchronization
+
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.XRefPropertiesEditionPart#getLinkend()
+ *
+ */
+ @Override
+ public String getLinkend() {
+ return linkend.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.parts.XRefPropertiesEditionPart#setLinkend(String
+ * newValue)
+ *
+ */
+ @Override
+ public void setLinkend(String newValue) {
+ if (newValue != null) {
+ linkend.setText(newValue);
+ } else {
+ linkend.setText(""); //$NON-NLS-1$
+ }
+ boolean eefElementEditorReadOnlyState = isReadOnly(DocbookViewsRepository.XRef.Properties.linkend);
+ if (eefElementEditorReadOnlyState && linkend.isEnabled()) {
+ linkend.setEnabled(false);
+ linkend.setToolTipText(DocbookMessages.XRef_ReadOnly);
+ } else if (!eefElementEditorReadOnlyState && !linkend.isEnabled()) {
+ linkend.setEnabled(true);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
+ *
+ */
+ @Override
+ public String getTitle() {
+ return DocbookMessages.XRef_Part_Title;
+ }
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AbstractSectItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AbstractSectItemProvider.java
new file mode 100644
index 0000000000..eddd5cb23b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AbstractSectItemProvider.java
@@ -0,0 +1,160 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.AbstractSect;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.AbstractSect} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AbstractSectItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AbstractSectItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to
+ * deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in
+ * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocbookPackage.Literals.ABSTRACT_SECT__TITLE);
+ childrenFeatures.add(DocbookPackage.Literals.ABSTRACT_SECT__PARA);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper
+ // feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_AbstractSect_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(AbstractSect.class)) {
+ case DocbookPackage.ABSTRACT_SECT__TITLE:
+ case DocbookPackage.ABSTRACT_SECT__PARA:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.ABSTRACT_SECT__TITLE, DocbookFactory.eINSTANCE.createTitle()));
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.ABSTRACT_SECT__PARA, DocbookFactory.eINSTANCE.createPara()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AuthorItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AuthorItemProvider.java
new file mode 100644
index 0000000000..d7316c3a55
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/AuthorItemProvider.java
@@ -0,0 +1,172 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.Author;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Author} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AuthorItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AuthorItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addEmailPropertyDescriptor(object);
+ addPersonnamePropertyDescriptor(object);
+ addAddressPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Email feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addEmailPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Author_email_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Author_email_feature", "_UI_Author_type"), DocbookPackage.Literals.AUTHOR__EMAIL, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Personname feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPersonnamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_Author_personname_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Author_personname_feature", "_UI_Author_type"),
+ DocbookPackage.Literals.AUTHOR__PERSONNAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Address feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addAddressPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Author_address_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Author_address_feature", "_UI_Author_type"), DocbookPackage.Literals.AUTHOR__ADDRESS, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns Author.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Author"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Author) object).getPersonname();
+ return label == null || label.length() == 0 ? getString("_UI_Author_type") : getString("_UI_Author_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Author.class)) {
+ case DocbookPackage.AUTHOR__EMAIL:
+ case DocbookPackage.AUTHOR__PERSONNAME:
+ case DocbookPackage.AUTHOR__ADDRESS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/BookItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/BookItemProvider.java
new file mode 100644
index 0000000000..f4fad50ab3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/BookItemProvider.java
@@ -0,0 +1,216 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.Book;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Book} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class BookItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BookItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIdPropertyDescriptor(object);
+ addLangPropertyDescriptor(object);
+ addVersionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Book_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_id_feature", "_UI_Book_type"), DocbookPackage.Literals.BOOK__ID, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Lang feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addLangPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Book_lang_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_lang_feature", "_UI_Book_type"), DocbookPackage.Literals.BOOK__LANG, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Version feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addVersionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Book_version_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Book_version_feature", "_UI_Book_type"), DocbookPackage.Literals.BOOK__VERSION, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to
+ * deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in
+ * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocbookPackage.Literals.BOOK__BOOKINFO);
+ childrenFeatures.add(DocbookPackage.Literals.BOOK__CHAPTER);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper
+ // feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Book.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Book"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Book) object).getId();
+ return label == null || label.length() == 0 ? getString("_UI_Book_type") : getString("_UI_Book_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Book.class)) {
+ case DocbookPackage.BOOK__ID:
+ case DocbookPackage.BOOK__LANG:
+ case DocbookPackage.BOOK__VERSION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DocbookPackage.BOOK__BOOKINFO:
+ case DocbookPackage.BOOK__CHAPTER:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.BOOK__BOOKINFO, DocbookFactory.eINSTANCE.createInfo()));
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.BOOK__CHAPTER, DocbookFactory.eINSTANCE.createChapter()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ChapterItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ChapterItemProvider.java
new file mode 100644
index 0000000000..7b7f943341
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ChapterItemProvider.java
@@ -0,0 +1,192 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.Chapter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Chapter} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ChapterItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ChapterItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIdPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Chapter_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Chapter_id_feature", "_UI_Chapter_type"), DocbookPackage.Literals.CHAPTER__ID, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to
+ * deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in
+ * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocbookPackage.Literals.CHAPTER__TITLE);
+ childrenFeatures.add(DocbookPackage.Literals.CHAPTER__PARA);
+ childrenFeatures.add(DocbookPackage.Literals.CHAPTER__SECT1);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper
+ // feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Chapter.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Chapter"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Chapter) object).getId();
+ return label == null || label.length() == 0 ? getString("_UI_Chapter_type") : getString("_UI_Chapter_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Chapter.class)) {
+ case DocbookPackage.CHAPTER__ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DocbookPackage.CHAPTER__TITLE:
+ case DocbookPackage.CHAPTER__PARA:
+ case DocbookPackage.CHAPTER__SECT1:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.CHAPTER__TITLE, DocbookFactory.eINSTANCE.createTitle()));
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.CHAPTER__PARA, DocbookFactory.eINSTANCE.createPara()));
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.CHAPTER__SECT1, DocbookFactory.eINSTANCE.createSect1()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookEditPlugin.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookEditPlugin.java
new file mode 100644
index 0000000000..4f11c48a65
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookEditPlugin.java
@@ -0,0 +1,93 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Docbook edit plugin. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class DocbookEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public static final DocbookEditPlugin INSTANCE = new DocbookEditPlugin();
+
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DocbookEditPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return DocbookEditPlugin.plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return DocbookEditPlugin.plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ DocbookEditPlugin.plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookItemProviderAdapterFactory.java
new file mode 100644
index 0000000000..34dd8742b8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/DocbookItemProviderAdapterFactory.java
@@ -0,0 +1,694 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support
+ * Viewers. The adapters generated by this factory convert EMF adapter
+ * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The
+ * adapters also support Eclipse property sheets. Note that most of the adapters
+ * are shared among multiple instances. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class DocbookItemProviderAdapterFactory extends DocbookAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this
+ * adapter factory. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement
+ * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by
+ * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public DocbookItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Book} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BookItemProvider bookItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Book}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createBookAdapter() {
+ if (bookItemProvider == null) {
+ bookItemProvider = new BookItemProvider(this);
+ }
+
+ return bookItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Info} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected InfoItemProvider infoItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Info}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createInfoAdapter() {
+ if (infoItemProvider == null) {
+ infoItemProvider = new InfoItemProvider(this);
+ }
+
+ return infoItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Author} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AuthorItemProvider authorItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Author}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createAuthorAdapter() {
+ if (authorItemProvider == null) {
+ authorItemProvider = new AuthorItemProvider(this);
+ }
+
+ return authorItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Chapter} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ChapterItemProvider chapterItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Chapter}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createChapterAdapter() {
+ if (chapterItemProvider == null) {
+ chapterItemProvider = new ChapterItemProvider(this);
+ }
+
+ return chapterItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Title} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TitleItemProvider titleItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Title}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createTitleAdapter() {
+ if (titleItemProvider == null) {
+ titleItemProvider = new TitleItemProvider(this);
+ }
+
+ return titleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Para} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ParaItemProvider paraItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Para}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createParaAdapter() {
+ if (paraItemProvider == null) {
+ paraItemProvider = new ParaItemProvider(this);
+ }
+
+ return paraItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.SimpleList} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SimpleListItemProvider simpleListItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.SimpleList}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSimpleListAdapter() {
+ if (simpleListItemProvider == null) {
+ simpleListItemProvider = new SimpleListItemProvider(this);
+ }
+
+ return simpleListItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.ItemizedList} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ItemizedListItemProvider itemizedListItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.ItemizedList}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createItemizedListAdapter() {
+ if (itemizedListItemProvider == null) {
+ itemizedListItemProvider = new ItemizedListItemProvider(this);
+ }
+
+ return itemizedListItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.OrderedList} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OrderedListItemProvider orderedListItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.OrderedList}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createOrderedListAdapter() {
+ if (orderedListItemProvider == null) {
+ orderedListItemProvider = new OrderedListItemProvider(this);
+ }
+
+ return orderedListItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect1} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Sect1ItemProvider sect1ItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect1}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSect1Adapter() {
+ if (sect1ItemProvider == null) {
+ sect1ItemProvider = new Sect1ItemProvider(this);
+ }
+
+ return sect1ItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect2} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Sect2ItemProvider sect2ItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect2}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSect2Adapter() {
+ if (sect2ItemProvider == null) {
+ sect2ItemProvider = new Sect2ItemProvider(this);
+ }
+
+ return sect2ItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Emphasis} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EmphasisItemProvider emphasisItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Emphasis}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createEmphasisAdapter() {
+ if (emphasisItemProvider == null) {
+ emphasisItemProvider = new EmphasisItemProvider(this);
+ }
+
+ return emphasisItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.ULink} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ULinkItemProvider uLinkItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.ULink}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createULinkAdapter() {
+ if (uLinkItemProvider == null) {
+ uLinkItemProvider = new ULinkItemProvider(this);
+ }
+
+ return uLinkItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Link} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected LinkItemProvider linkItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Link}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createLinkAdapter() {
+ if (linkItemProvider == null) {
+ linkItemProvider = new LinkItemProvider(this);
+ }
+
+ return linkItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.XRef} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected XRefItemProvider xRefItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.XRef}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createXRefAdapter() {
+ if (xRefItemProvider == null) {
+ xRefItemProvider = new XRefItemProvider(this);
+ }
+
+ return xRefItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Example} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ExampleItemProvider exampleItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Example}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createExampleAdapter() {
+ if (exampleItemProvider == null) {
+ exampleItemProvider = new ExampleItemProvider(this);
+ }
+
+ return exampleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect3} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Sect3ItemProvider sect3ItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect3}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSect3Adapter() {
+ if (sect3ItemProvider == null) {
+ sect3ItemProvider = new Sect3ItemProvider(this);
+ }
+
+ return sect3ItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.tests.sample.docbook.ListItem} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ListItemItemProvider listItemItemProvider;
+
+ /**
+ * This creates an adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.ListItem}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createListItemAdapter() {
+ if (listItemItemProvider == null) {
+ listItemItemProvider = new ListItemItemProvider(this);
+ }
+
+ return listItemItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the
+ * adapter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to
+ * {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (bookItemProvider != null) {
+ bookItemProvider.dispose();
+ }
+ if (infoItemProvider != null) {
+ infoItemProvider.dispose();
+ }
+ if (authorItemProvider != null) {
+ authorItemProvider.dispose();
+ }
+ if (chapterItemProvider != null) {
+ chapterItemProvider.dispose();
+ }
+ if (titleItemProvider != null) {
+ titleItemProvider.dispose();
+ }
+ if (paraItemProvider != null) {
+ paraItemProvider.dispose();
+ }
+ if (simpleListItemProvider != null) {
+ simpleListItemProvider.dispose();
+ }
+ if (itemizedListItemProvider != null) {
+ itemizedListItemProvider.dispose();
+ }
+ if (orderedListItemProvider != null) {
+ orderedListItemProvider.dispose();
+ }
+ if (sect1ItemProvider != null) {
+ sect1ItemProvider.dispose();
+ }
+ if (sect2ItemProvider != null) {
+ sect2ItemProvider.dispose();
+ }
+ if (emphasisItemProvider != null) {
+ emphasisItemProvider.dispose();
+ }
+ if (uLinkItemProvider != null) {
+ uLinkItemProvider.dispose();
+ }
+ if (linkItemProvider != null) {
+ linkItemProvider.dispose();
+ }
+ if (xRefItemProvider != null) {
+ xRefItemProvider.dispose();
+ }
+ if (exampleItemProvider != null) {
+ exampleItemProvider.dispose();
+ }
+ if (sect3ItemProvider != null) {
+ sect3ItemProvider.dispose();
+ }
+ if (listItemItemProvider != null) {
+ listItemItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/EmphasisItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/EmphasisItemProvider.java
new file mode 100644
index 0000000000..c075f986d7
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/EmphasisItemProvider.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Emphasis;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Emphasis} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class EmphasisItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EmphasisItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addRemapPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Remap feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addRemapPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Emphasis_remap_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Emphasis_remap_feature", "_UI_Emphasis_type"), DocbookPackage.Literals.EMPHASIS__REMAP, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns Emphasis.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Emphasis"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Emphasis) object).getRemap();
+ return label == null || label.length() == 0 ? getString("_UI_Emphasis_type") : getString("_UI_Emphasis_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Emphasis.class)) {
+ case DocbookPackage.EMPHASIS__REMAP:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ExampleItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ExampleItemProvider.java
new file mode 100644
index 0000000000..d6c0317a97
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ExampleItemProvider.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Example} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ExampleItemProvider extends AbstractSectItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ExampleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns Example.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Example"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Example_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/InfoItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/InfoItemProvider.java
new file mode 100644
index 0000000000..3366c39083
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/InfoItemProvider.java
@@ -0,0 +1,198 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Info;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Info} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class InfoItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InfoItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDatePropertyDescriptor(object);
+ addPubdatePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Date feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDatePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Info_date_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Info_date_feature", "_UI_Info_type"), DocbookPackage.Literals.INFO__DATE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Pubdate feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPubdatePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Info_pubdate_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Info_pubdate_feature", "_UI_Info_type"), DocbookPackage.Literals.INFO__PUBDATE, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to
+ * deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in
+ * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocbookPackage.Literals.INFO__AUTHOR);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper
+ // feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Info.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Info"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Info) object).getDate();
+ return label == null || label.length() == 0 ? getString("_UI_Info_type") : getString("_UI_Info_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Info.class)) {
+ case DocbookPackage.INFO__DATE:
+ case DocbookPackage.INFO__PUBDATE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DocbookPackage.INFO__AUTHOR:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.INFO__AUTHOR, DocbookFactory.eINSTANCE.createAuthor()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ItemizedListItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ItemizedListItemProvider.java
new file mode 100644
index 0000000000..beccfc1c21
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ItemizedListItemProvider.java
@@ -0,0 +1,186 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.ItemizedList;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.ItemizedList} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ItemizedListItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ItemizedListItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addMarkPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Mark feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addMarkPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_ItemizedList_mark_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ItemizedList_mark_feature", "_UI_ItemizedList_type"),
+ DocbookPackage.Literals.ITEMIZED_LIST__MARK, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to
+ * deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in
+ * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocbookPackage.Literals.ITEMIZED_LIST__LISTITEM);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper
+ // feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ItemizedList.gif. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ItemizedList"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ItemizedList) object).getMark();
+ return label == null || label.length() == 0 ? getString("_UI_ItemizedList_type") : getString("_UI_ItemizedList_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ItemizedList.class)) {
+ case DocbookPackage.ITEMIZED_LIST__MARK:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DocbookPackage.ITEMIZED_LIST__LISTITEM:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.ITEMIZED_LIST__LISTITEM, DocbookFactory.eINSTANCE.createListItem()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/LinkItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/LinkItemProvider.java
new file mode 100644
index 0000000000..c824378606
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/LinkItemProvider.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Link} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class LinkItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public LinkItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns Link.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Link"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Link_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ListItemItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ListItemItemProvider.java
new file mode 100644
index 0000000000..f080c14652
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ListItemItemProvider.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.ListItem} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ListItemItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ListItemItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns ListItem.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ListItem"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ListItem_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/OrderedListItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/OrderedListItemProvider.java
new file mode 100644
index 0000000000..422db8b837
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/OrderedListItemProvider.java
@@ -0,0 +1,146 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.OrderedList;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.OrderedList} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class OrderedListItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OrderedListItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNumerationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Numeration feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addNumerationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),
+ getString("_UI_OrderedList_numeration_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OrderedList_numeration_feature", "_UI_OrderedList_type"),
+ DocbookPackage.Literals.ORDERED_LIST__NUMERATION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns OrderedList.gif. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/OrderedList"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((OrderedList) object).getNumeration();
+ return label == null || label.length() == 0 ? getString("_UI_OrderedList_type") : getString("_UI_OrderedList_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(OrderedList.class)) {
+ case DocbookPackage.ORDERED_LIST__NUMERATION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ParaItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ParaItemProvider.java
new file mode 100644
index 0000000000..84e2bdadbf
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ParaItemProvider.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Para} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ParaItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ParaItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDataPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Data feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDataPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Para_data_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Para_data_feature", "_UI_Para_type"), DocbookPackage.Literals.PARA__DATA, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns Para.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Para"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Para) object).getData();
+ return label == null || label.length() == 0 ? getString("_UI_Para_type") : getString("_UI_Para_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Para.class)) {
+ case DocbookPackage.PARA__DATA:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect1ItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect1ItemProvider.java
new file mode 100644
index 0000000000..799734b649
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect1ItemProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Sect1;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect1} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class Sect1ItemProvider extends AbstractSectItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Sect1ItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIdPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Sect1_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Sect1_id_feature", "_UI_Sect1_type"), DocbookPackage.Literals.SECT1__ID, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to
+ * deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in
+ * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocbookPackage.Literals.SECT1__SECT2);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper
+ // feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Sect1.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Sect1"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Sect1) object).getId();
+ return label == null || label.length() == 0 ? getString("_UI_Sect1_type") : getString("_UI_Sect1_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Sect1.class)) {
+ case DocbookPackage.SECT1__ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DocbookPackage.SECT1__SECT2:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.SECT1__SECT2, DocbookFactory.eINSTANCE.createSect2()));
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect2ItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect2ItemProvider.java
new file mode 100644
index 0000000000..6f180297c4
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect2ItemProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Sect2;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect2} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class Sect2ItemProvider extends AbstractSectItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Sect2ItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIdPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Sect2_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Sect2_id_feature", "_UI_Sect2_type"), DocbookPackage.Literals.SECT2__ID, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to
+ * deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand},
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in
+ * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocbookPackage.Literals.SECT2__SECT3);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper
+ // feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Sect2.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Sect2"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Sect2) object).getId();
+ return label == null || label.length() == 0 ? getString("_UI_Sect2_type") : getString("_UI_Sect2_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Sect2.class)) {
+ case DocbookPackage.SECT2__ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DocbookPackage.SECT2__SECT3:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocbookPackage.Literals.SECT2__SECT3, DocbookFactory.eINSTANCE.createSect3()));
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect3ItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect3ItemProvider.java
new file mode 100644
index 0000000000..2fef4428b3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/Sect3ItemProvider.java
@@ -0,0 +1,126 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Sect3;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Sect3} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class Sect3ItemProvider extends AbstractSectItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Sect3ItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIdPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Sect3_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Sect3_id_feature", "_UI_Sect3_type"), DocbookPackage.Literals.SECT3__ID, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns Sect3.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Sect3"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Sect3) object).getId();
+ return label == null || label.length() == 0 ? getString("_UI_Sect3_type") : getString("_UI_Sect3_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Sect3.class)) {
+ case DocbookPackage.SECT3__ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/SimpleListItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/SimpleListItemProvider.java
new file mode 100644
index 0000000000..e129f19a63
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/SimpleListItemProvider.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.SimpleList} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class SimpleListItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SimpleListItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns SimpleList.gif. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/SimpleList"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_SimpleList_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/TitleItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/TitleItemProvider.java
new file mode 100644
index 0000000000..3bebb72bd2
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/TitleItemProvider.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Title;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.Title} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TitleItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TitleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDataPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Data feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDataPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Title_data_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Title_data_feature", "_UI_Title_type"), DocbookPackage.Literals.TITLE__DATA, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns Title.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Title"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Title) object).getData();
+ return label == null || label.length() == 0 ? getString("_UI_Title_type") : getString("_UI_Title_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Title.class)) {
+ case DocbookPackage.TITLE__DATA:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ULinkItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ULinkItemProvider.java
new file mode 100644
index 0000000000..8c62181376
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/ULinkItemProvider.java
@@ -0,0 +1,158 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.ULink;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.ULink} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ULinkItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ULinkItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addUrlPropertyDescriptor(object);
+ addDataPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Url feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addUrlPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ULink_url_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ULink_url_feature", "_UI_ULink_type"), DocbookPackage.Literals.ULINK__URL, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Data feature. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDataPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ULink_data_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ULink_data_feature", "_UI_ULink_type"), DocbookPackage.Literals.ULINK__DATA, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns ULink.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ULink"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ULink) object).getUrl();
+ return label == null || label.length() == 0 ? getString("_UI_ULink_type") : getString("_UI_ULink_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ULink.class)) {
+ case DocbookPackage.ULINK__URL:
+ case DocbookPackage.ULINK__DATA:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/XRefItemProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/XRefItemProvider.java
new file mode 100644
index 0000000000..dea5252b8b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/provider/XRefItemProvider.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.XRef;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.sirius.tests.sample.docbook.XRef} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class XRefItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public XRefItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addLinkendPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Linkend feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addLinkendPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_XRef_linkend_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_XRef_linkend_feature", "_UI_XRef_type"), DocbookPackage.Literals.XREF__LINKEND, true, false, false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns XRef.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/XRef"));
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((XRef) object).getLinkend();
+ return label == null || label.length() == 0 ? getString("_UI_XRef_type") : getString("_UI_XRef_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(XRef.class)) {
+ case DocbookPackage.XREF__LINKEND:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children that can be created under this object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return DocbookEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/AuthorPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/AuthorPropertiesEditionProvider.java
new file mode 100644
index 0000000000..0cdf4b4c7d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/AuthorPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.Author;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.components.AuthorPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class AuthorPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public AuthorPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public AuthorPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Author) && (DocbookPackage.Literals.AUTHOR == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Author) && (AuthorPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Author) && (refinement == AuthorPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Author) && ((AuthorPropertiesEditionComponent.BASE_PART.equals(part) && refinement == AuthorPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Author) {
+ return new AuthorPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Author) {
+ if (AuthorPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new AuthorPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Author) {
+ if (AuthorPropertiesEditionComponent.BASE_PART.equals(part) && refinement == AuthorPropertiesEditionComponent.class) {
+ return new AuthorPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.AUTHOR == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/BookPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/BookPropertiesEditionProvider.java
new file mode 100644
index 0000000000..bc5448608a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/BookPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.Book;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.components.BookPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class BookPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public BookPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public BookPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Book) && (DocbookPackage.Literals.BOOK == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Book) && (BookPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Book) && (refinement == BookPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Book) && ((BookPropertiesEditionComponent.BASE_PART.equals(part) && refinement == BookPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Book) {
+ return new BookPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Book) {
+ if (BookPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new BookPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Book) {
+ if (BookPropertiesEditionComponent.BASE_PART.equals(part) && refinement == BookPropertiesEditionComponent.class) {
+ return new BookPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.BOOK == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ChapterPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ChapterPropertiesEditionProvider.java
new file mode 100644
index 0000000000..408eca9c76
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ChapterPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.Chapter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.components.ChapterPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class ChapterPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public ChapterPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public ChapterPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Chapter) && (DocbookPackage.Literals.CHAPTER == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Chapter) && (ChapterPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Chapter) && (refinement == ChapterPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Chapter) && ((ChapterPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ChapterPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Chapter) {
+ return new ChapterPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Chapter) {
+ if (ChapterPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new ChapterPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Chapter) {
+ if (ChapterPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ChapterPropertiesEditionComponent.class) {
+ return new ChapterPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.CHAPTER == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookEEFAdapterFactory.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookEEFAdapterFactory.java
new file mode 100644
index 0000000000..0177f87ab8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookEEFAdapterFactory.java
@@ -0,0 +1,188 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory;
+
+/**
+ *
+ *
+ */
+public class DocbookEEFAdapterFactory extends DocbookAdapterFactory {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createBookAdapter()
+ *
+ */
+ @Override
+ public Adapter createBookAdapter() {
+ return new BookPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createInfoAdapter()
+ *
+ */
+ @Override
+ public Adapter createInfoAdapter() {
+ return new InfoPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createAuthorAdapter()
+ *
+ */
+ @Override
+ public Adapter createAuthorAdapter() {
+ return new AuthorPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createChapterAdapter()
+ *
+ */
+ @Override
+ public Adapter createChapterAdapter() {
+ return new ChapterPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createTitleAdapter()
+ *
+ */
+ @Override
+ public Adapter createTitleAdapter() {
+ return new Title_PropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createParaAdapter()
+ *
+ */
+ @Override
+ public Adapter createParaAdapter() {
+ return new ParaPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createItemizedListAdapter()
+ *
+ */
+ @Override
+ public Adapter createItemizedListAdapter() {
+ return new ItemizedListPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createOrderedListAdapter()
+ *
+ */
+ @Override
+ public Adapter createOrderedListAdapter() {
+ return new OrderedListPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createSect1Adapter()
+ *
+ */
+ @Override
+ public Adapter createSect1Adapter() {
+ return new Sect1PropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createSect2Adapter()
+ *
+ */
+ @Override
+ public Adapter createSect2Adapter() {
+ return new Sect2PropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createEmphasisAdapter()
+ *
+ */
+ @Override
+ public Adapter createEmphasisAdapter() {
+ return new EmphasisPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createULinkAdapter()
+ *
+ */
+ @Override
+ public Adapter createULinkAdapter() {
+ return new ULinkPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createXRefAdapter()
+ *
+ */
+ @Override
+ public Adapter createXRefAdapter() {
+ return new XRefPropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createExampleAdapter()
+ *
+ */
+ @Override
+ public Adapter createExampleAdapter() {
+ return new ExamplePropertiesEditionProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.sirius.tests.sample.docbook.util.DocbookAdapterFactory#createSect3Adapter()
+ *
+ */
+ @Override
+ public Adapter createSect3Adapter() {
+ return new Sect3PropertiesEditionProvider();
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookMessages.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookMessages.java
new file mode 100644
index 0000000000..226c1ade3f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookMessages.java
@@ -0,0 +1,232 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ *
+ */
+public class DocbookMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.sirius.tests.sample.docbook.providers.docbookMessages"; //$NON-NLS-1$
+
+ public static String BookPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String InfoPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String AuthorPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String ChapterPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String Title_PropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String ParaPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String ItemizedListPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String OrderedListPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String Sect1PropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String Sect2PropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String EmphasisPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String ULinkPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String XRefPropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String ExamplePropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String Sect3PropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String Book_ReadOnly;
+
+ public static String Book_Part_Title;
+
+ public static String Info_ReadOnly;
+
+ public static String Info_Part_Title;
+
+ public static String Author_ReadOnly;
+
+ public static String Author_Part_Title;
+
+ public static String Chapter_ReadOnly;
+
+ public static String Chapter_Part_Title;
+
+ public static String Title__ReadOnly;
+
+ public static String Title__Part_Title;
+
+ public static String Para_ReadOnly;
+
+ public static String Para_Part_Title;
+
+ public static String SimpleList_ReadOnly;
+
+ public static String SimpleList_Part_Title;
+
+ public static String ItemizedList_ReadOnly;
+
+ public static String ItemizedList_Part_Title;
+
+ public static String OrderedList_ReadOnly;
+
+ public static String OrderedList_Part_Title;
+
+ public static String Sect1_ReadOnly;
+
+ public static String Sect1_Part_Title;
+
+ public static String Sect2_ReadOnly;
+
+ public static String Sect2_Part_Title;
+
+ public static String Emphasis_ReadOnly;
+
+ public static String Emphasis_Part_Title;
+
+ public static String ULink_ReadOnly;
+
+ public static String ULink_Part_Title;
+
+ public static String Link_ReadOnly;
+
+ public static String Link_Part_Title;
+
+ public static String XRef_ReadOnly;
+
+ public static String XRef_Part_Title;
+
+ public static String Example_ReadOnly;
+
+ public static String Example_Part_Title;
+
+ public static String Sect3_ReadOnly;
+
+ public static String Sect3_Part_Title;
+
+ public static String ListItem_ReadOnly;
+
+ public static String ListItem_Part_Title;
+
+ public static String BookPropertiesEditionPart_ChapterLabel;
+
+ public static String BookPropertiesEditionPart_IdLabel;
+
+ public static String BookPropertiesEditionPart_LangLabel;
+
+ public static String BookPropertiesEditionPart_VersionLabel;
+
+ public static String InfoPropertiesEditionPart_AuthorLabel;
+
+ public static String InfoPropertiesEditionPart_DateLabel;
+
+ public static String InfoPropertiesEditionPart_PubdateLabel;
+
+ public static String AuthorPropertiesEditionPart_EmailLabel;
+
+ public static String AuthorPropertiesEditionPart_PersonnameLabel;
+
+ public static String AuthorPropertiesEditionPart_AddressLabel;
+
+ public static String ChapterPropertiesEditionPart_ParaLabel;
+
+ public static String ChapterPropertiesEditionPart_Sect1Label;
+
+ public static String ChapterPropertiesEditionPart_IdLabel;
+
+ public static String Title_PropertiesEditionPart_DataLabel;
+
+ public static String ParaPropertiesEditionPart_DataLabel;
+
+ public static String ItemizedListPropertiesEditionPart_MarkLabel;
+
+ public static String ItemizedListPropertiesEditionPart_ListitemLabel;
+
+ public static String OrderedListPropertiesEditionPart_NumerationLabel;
+
+ public static String Sect1PropertiesEditionPart_ParaLabel;
+
+ public static String Sect1PropertiesEditionPart_IdLabel;
+
+ public static String Sect1PropertiesEditionPart_Sect2Label;
+
+ public static String Sect2PropertiesEditionPart_ParaLabel;
+
+ public static String Sect2PropertiesEditionPart_IdLabel;
+
+ public static String Sect2PropertiesEditionPart_Sect3Label;
+
+ public static String EmphasisPropertiesEditionPart_RemapLabel;
+
+ public static String ULinkPropertiesEditionPart_UrlLabel;
+
+ public static String ULinkPropertiesEditionPart_DataLabel;
+
+ public static String XRefPropertiesEditionPart_LinkendLabel;
+
+ public static String ExamplePropertiesEditionPart_ParaLabel;
+
+ public static String Sect3PropertiesEditionPart_ParaLabel;
+
+ public static String Sect3PropertiesEditionPart_IdLabel;
+
+ public static String PropertiesEditionPart_DocumentationLabel;
+
+ public static String PropertiesEditionPart_IntegerValueMessage;
+
+ public static String PropertiesEditionPart_FloatValueMessage;
+
+ public static String PropertiesEditionPart_ShortValueMessage;
+
+ public static String PropertiesEditionPart_LongValueMessage;
+
+ public static String PropertiesEditionPart_ByteValueMessage;
+
+ public static String PropertiesEditionPart_BigIntegerValueMessage;
+
+ public static String PropertiesEditionPart_BigDecimalValueMessage;
+
+ public static String PropertiesEditionPart_DoubleValueMessage;
+
+ public static String PropertiesEditionPart_PropertiesGroupLabel;
+
+ public static String PropertiesEditionPart_RequiredFeatureMessage;
+
+ public static String PropertiesEditionPart_AddTableViewerLabel;
+
+ public static String PropertiesEditionPart_EditTableViewerLabel;
+
+ public static String PropertiesEditionPart_RemoveTableViewerLabel;
+
+ public static String PropertiesEditionPart_AddListViewerLabel;
+
+ public static String PropertiesEditionPart_RemoveListViewerLabel;
+
+ // Start of user code for additionnal NLS Constants
+
+ // End of user code
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(DocbookMessages.BUNDLE_NAME, DocbookMessages.class);
+ }
+
+ private DocbookMessages() {
+ // protect instanciation
+ }
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookPropertiesEditionPartProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookPropertiesEditionPartProvider.java
new file mode 100644
index 0000000000..ef6f31b506
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/DocbookPropertiesEditionPartProvider.java
@@ -0,0 +1,199 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
+import org.eclipse.sirius.tests.sample.docbook.parts.DocbookViewsRepository;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.AuthorPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.BookPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.ChapterPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.EmphasisPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.ExamplePropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.InfoPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.ItemizedListPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.OrderedListPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.ParaPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect1PropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect2PropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.Sect3PropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.Title_PropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.ULinkPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.forms.XRefPropertiesEditionPartForm;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.AuthorPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.BookPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.ChapterPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.EmphasisPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.ExamplePropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.InfoPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.ItemizedListPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.OrderedListPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.ParaPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.Sect1PropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.Sect2PropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.Sect3PropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.Title_PropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.ULinkPropertiesEditionPartImpl;
+import org.eclipse.sirius.tests.sample.docbook.parts.impl.XRefPropertiesEditionPartImpl;
+
+/**
+ *
+ *
+ */
+public class DocbookPropertiesEditionPartProvider implements IPropertiesEditionPartProvider {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#provides(java.lang.Object)
+ *
+ */
+ @Override
+ public boolean provides(Object key) {
+ return key == DocbookViewsRepository.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#getPropertiesEditionPart(java.lang.Object,
+ * int,
+ * org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent)
+ *
+ */
+ @Override
+ public IPropertiesEditionPart getPropertiesEditionPart(Object key, int kind, IPropertiesEditionComponent component) {
+ if (key == DocbookViewsRepository.Book.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new BookPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new BookPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Info.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new InfoPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new InfoPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Author.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new AuthorPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new AuthorPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Chapter.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new ChapterPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new ChapterPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Title_.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new Title_PropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new Title_PropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Para.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new ParaPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new ParaPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.ItemizedList.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new ItemizedListPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new ItemizedListPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.OrderedList.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new OrderedListPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new OrderedListPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Sect1.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new Sect1PropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new Sect1PropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Sect2.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new Sect2PropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new Sect2PropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Emphasis.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new EmphasisPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new EmphasisPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.ULink.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new ULinkPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new ULinkPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.XRef.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new XRefPropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new XRefPropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Example.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new ExamplePropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new ExamplePropertiesEditionPartForm(component);
+ }
+ }
+ if (key == DocbookViewsRepository.Sect3.class) {
+ if (kind == DocbookViewsRepository.SWT_KIND) {
+ return new Sect3PropertiesEditionPartImpl(component);
+ }
+ if (kind == DocbookViewsRepository.FORM_KIND) {
+ return new Sect3PropertiesEditionPartForm(component);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/EmphasisPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/EmphasisPropertiesEditionProvider.java
new file mode 100644
index 0000000000..f81d84019b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/EmphasisPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Emphasis;
+import org.eclipse.sirius.tests.sample.docbook.components.EmphasisPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class EmphasisPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public EmphasisPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public EmphasisPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Emphasis) && (DocbookPackage.Literals.EMPHASIS == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Emphasis) && (EmphasisPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Emphasis) && (refinement == EmphasisPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Emphasis) && ((EmphasisPropertiesEditionComponent.BASE_PART.equals(part) && refinement == EmphasisPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Emphasis) {
+ return new EmphasisPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Emphasis) {
+ if (EmphasisPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new EmphasisPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Emphasis) {
+ if (EmphasisPropertiesEditionComponent.BASE_PART.equals(part) && refinement == EmphasisPropertiesEditionComponent.class) {
+ return new EmphasisPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.EMPHASIS == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ExamplePropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ExamplePropertiesEditionProvider.java
new file mode 100644
index 0000000000..8305cdca3a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ExamplePropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Example;
+import org.eclipse.sirius.tests.sample.docbook.components.ExamplePropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class ExamplePropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public ExamplePropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public ExamplePropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Example) && (DocbookPackage.Literals.EXAMPLE == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Example) && (ExamplePropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Example) && (refinement == ExamplePropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Example) && ((ExamplePropertiesEditionComponent.BASE_PART.equals(part) && refinement == ExamplePropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Example) {
+ return new ExamplePropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Example) {
+ if (ExamplePropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new ExamplePropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Example) {
+ if (ExamplePropertiesEditionComponent.BASE_PART.equals(part) && refinement == ExamplePropertiesEditionComponent.class) {
+ return new ExamplePropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.EXAMPLE == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/InfoPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/InfoPropertiesEditionProvider.java
new file mode 100644
index 0000000000..81f6ee0517
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/InfoPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Info;
+import org.eclipse.sirius.tests.sample.docbook.components.InfoPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class InfoPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public InfoPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public InfoPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Info) && (DocbookPackage.Literals.INFO == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Info) && (InfoPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Info) && (refinement == InfoPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Info) && ((InfoPropertiesEditionComponent.BASE_PART.equals(part) && refinement == InfoPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Info) {
+ return new InfoPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Info) {
+ if (InfoPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new InfoPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Info) {
+ if (InfoPropertiesEditionComponent.BASE_PART.equals(part) && refinement == InfoPropertiesEditionComponent.class) {
+ return new InfoPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.INFO == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ItemizedListPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ItemizedListPropertiesEditionProvider.java
new file mode 100644
index 0000000000..1552efcfba
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ItemizedListPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.ItemizedList;
+import org.eclipse.sirius.tests.sample.docbook.components.ItemizedListPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class ItemizedListPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public ItemizedListPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public ItemizedListPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof ItemizedList) && (DocbookPackage.Literals.ITEMIZED_LIST == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof ItemizedList) && (ItemizedListPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof ItemizedList) && (refinement == ItemizedListPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof ItemizedList) && ((ItemizedListPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ItemizedListPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof ItemizedList) {
+ return new ItemizedListPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof ItemizedList) {
+ if (ItemizedListPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new ItemizedListPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof ItemizedList) {
+ if (ItemizedListPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ItemizedListPropertiesEditionComponent.class) {
+ return new ItemizedListPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.ITEMIZED_LIST == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/OrderedListPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/OrderedListPropertiesEditionProvider.java
new file mode 100644
index 0000000000..8eeaf740ff
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/OrderedListPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.OrderedList;
+import org.eclipse.sirius.tests.sample.docbook.components.OrderedListPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class OrderedListPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public OrderedListPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public OrderedListPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof OrderedList) && (DocbookPackage.Literals.ORDERED_LIST == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof OrderedList) && (OrderedListPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof OrderedList) && (refinement == OrderedListPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof OrderedList) && ((OrderedListPropertiesEditionComponent.BASE_PART.equals(part) && refinement == OrderedListPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof OrderedList) {
+ return new OrderedListPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof OrderedList) {
+ if (OrderedListPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new OrderedListPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof OrderedList) {
+ if (OrderedListPropertiesEditionComponent.BASE_PART.equals(part) && refinement == OrderedListPropertiesEditionComponent.class) {
+ return new OrderedListPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.ORDERED_LIST == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ParaPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ParaPropertiesEditionProvider.java
new file mode 100644
index 0000000000..7e1766b1b0
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ParaPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Para;
+import org.eclipse.sirius.tests.sample.docbook.components.ParaPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class ParaPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public ParaPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public ParaPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Para) && (DocbookPackage.Literals.PARA == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Para) && (ParaPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Para) && (refinement == ParaPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Para) && ((ParaPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ParaPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Para) {
+ return new ParaPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Para) {
+ if (ParaPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new ParaPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Para) {
+ if (ParaPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ParaPropertiesEditionComponent.class) {
+ return new ParaPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.PARA == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect1PropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect1PropertiesEditionProvider.java
new file mode 100644
index 0000000000..2d73dcd71c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect1PropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Sect1;
+import org.eclipse.sirius.tests.sample.docbook.components.Sect1PropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class Sect1PropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public Sect1PropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public Sect1PropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Sect1) && (DocbookPackage.Literals.SECT1 == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Sect1) && (Sect1PropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Sect1) && (refinement == Sect1PropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Sect1) && ((Sect1PropertiesEditionComponent.BASE_PART.equals(part) && refinement == Sect1PropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Sect1) {
+ return new Sect1PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Sect1) {
+ if (Sect1PropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new Sect1PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Sect1) {
+ if (Sect1PropertiesEditionComponent.BASE_PART.equals(part) && refinement == Sect1PropertiesEditionComponent.class) {
+ return new Sect1PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.SECT1 == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect2PropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect2PropertiesEditionProvider.java
new file mode 100644
index 0000000000..c4315456cf
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect2PropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Sect2;
+import org.eclipse.sirius.tests.sample.docbook.components.Sect2PropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class Sect2PropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public Sect2PropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public Sect2PropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Sect2) && (DocbookPackage.Literals.SECT2 == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Sect2) && (Sect2PropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Sect2) && (refinement == Sect2PropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Sect2) && ((Sect2PropertiesEditionComponent.BASE_PART.equals(part) && refinement == Sect2PropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Sect2) {
+ return new Sect2PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Sect2) {
+ if (Sect2PropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new Sect2PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Sect2) {
+ if (Sect2PropertiesEditionComponent.BASE_PART.equals(part) && refinement == Sect2PropertiesEditionComponent.class) {
+ return new Sect2PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.SECT2 == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect3PropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect3PropertiesEditionProvider.java
new file mode 100644
index 0000000000..f37707b069
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Sect3PropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Sect3;
+import org.eclipse.sirius.tests.sample.docbook.components.Sect3PropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class Sect3PropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public Sect3PropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public Sect3PropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Sect3) && (DocbookPackage.Literals.SECT3 == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Sect3) && (Sect3PropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Sect3) && (refinement == Sect3PropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Sect3) && ((Sect3PropertiesEditionComponent.BASE_PART.equals(part) && refinement == Sect3PropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Sect3) {
+ return new Sect3PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Sect3) {
+ if (Sect3PropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new Sect3PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Sect3) {
+ if (Sect3PropertiesEditionComponent.BASE_PART.equals(part) && refinement == Sect3PropertiesEditionComponent.class) {
+ return new Sect3PropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.SECT3 == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Title_PropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Title_PropertiesEditionProvider.java
new file mode 100644
index 0000000000..515f4658b8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/Title_PropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.Title;
+import org.eclipse.sirius.tests.sample.docbook.components.TitlePropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class Title_PropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public Title_PropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public Title_PropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof Title) && (DocbookPackage.Literals.TITLE == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof Title) && (TitlePropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Title) && (refinement == TitlePropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof Title) && ((TitlePropertiesEditionComponent.BASE_PART.equals(part) && refinement == TitlePropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof Title) {
+ return new TitlePropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof Title) {
+ if (TitlePropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new TitlePropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof Title) {
+ if (TitlePropertiesEditionComponent.BASE_PART.equals(part) && refinement == TitlePropertiesEditionComponent.class) {
+ return new TitlePropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.TITLE == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ULinkPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ULinkPropertiesEditionProvider.java
new file mode 100644
index 0000000000..d638cb1a88
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/ULinkPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.ULink;
+import org.eclipse.sirius.tests.sample.docbook.components.ULinkPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class ULinkPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public ULinkPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public ULinkPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof ULink) && (DocbookPackage.Literals.ULINK == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof ULink) && (ULinkPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof ULink) && (refinement == ULinkPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof ULink) && ((ULinkPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ULinkPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof ULink) {
+ return new ULinkPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof ULink) {
+ if (ULinkPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new ULinkPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof ULink) {
+ if (ULinkPropertiesEditionComponent.BASE_PART.equals(part) && refinement == ULinkPropertiesEditionComponent.class) {
+ return new ULinkPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.ULINK == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/XRefPropertiesEditionProvider.java b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/XRefPropertiesEditionProvider.java
new file mode 100644
index 0000000000..ebc03c175e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/XRefPropertiesEditionProvider.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
+import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
+import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
+import org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.XRef;
+import org.eclipse.sirius.tests.sample.docbook.components.XRefPropertiesEditionComponent;
+
+/**
+ *
+ *
+ */
+public class XRefPropertiesEditionProvider extends PropertiesEditingProviderImpl {
+
+ /**
+ * Constructor without provider for super types.
+ */
+ public XRefPropertiesEditionProvider() {
+ super();
+ }
+
+ /**
+ * Constructor with providers for super types.
+ *
+ * @param superProviders
+ * providers to use for super types.
+ */
+ public XRefPropertiesEditionProvider(List<PropertiesEditingProvider> superProviders) {
+ super(superProviders);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext) {
+ return (editingContext.getEObject() instanceof XRef) && (DocbookPackage.Literals.XREF == editingContext.getEObject().eClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public boolean provides(PropertiesEditingContext editingContext, String part) {
+ return (editingContext.getEObject() instanceof XRef) && (XRefPropertiesEditionComponent.BASE_PART.equals(part));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof XRef) && (refinement == XRefPropertiesEditionComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.Class)
+ *
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
+ return (editingContext.getEObject() instanceof XRef) && ((XRefPropertiesEditionComponent.BASE_PART.equals(part) && refinement == XRefPropertiesEditionComponent.class));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
+ if (editingContext.getEObject() instanceof XRef) {
+ return new XRefPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String)
+ *
+ */
+ @Override
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
+ if (editingContext.getEObject() instanceof XRef) {
+ if (XRefPropertiesEditionComponent.BASE_PART.equals(part)) {
+ return new XRefPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext,
+ * java.lang.String, java.lang.String, java.lang.Class)
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
+ if (editingContext.getEObject() instanceof XRef) {
+ if (XRefPropertiesEditionComponent.BASE_PART.equals(part) && refinement == XRefPropertiesEditionComponent.class) {
+ return new XRefPropertiesEditionComponent(editingContext, editingContext.getEObject(), mode);
+ }
+ }
+ return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
+ }
+
+ /**
+ * Provides the filter used by the plugin.xml to assign part forms.
+ */
+ public static class EditionFilter implements IFilter {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ EObject eObj = EEFUtils.resolveSemanticObject(toTest);
+ return eObj != null && DocbookPackage.Literals.XREF == eObj.eClass();
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages.properties b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages.properties
new file mode 100644
index 0000000000..a48858a0bd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages.properties
@@ -0,0 +1,115 @@
+##
+# Copyright (c) 2015 Obeo
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+ #
+
+# Start of user code for titles customization
+
+# End of user code
+
+# default values ...
+BookPropertiesEditionPart_PropertiesGroupLabel=Properties
+InfoPropertiesEditionPart_PropertiesGroupLabel=Properties
+AuthorPropertiesEditionPart_PropertiesGroupLabel=Properties
+ChapterPropertiesEditionPart_PropertiesGroupLabel=Properties
+Title_PropertiesEditionPart_PropertiesGroupLabel=Properties
+ParaPropertiesEditionPart_PropertiesGroupLabel=Properties
+ItemizedListPropertiesEditionPart_PropertiesGroupLabel=Properties
+OrderedListPropertiesEditionPart_PropertiesGroupLabel=Properties
+Sect1PropertiesEditionPart_PropertiesGroupLabel=Properties
+Sect2PropertiesEditionPart_PropertiesGroupLabel=Properties
+EmphasisPropertiesEditionPart_PropertiesGroupLabel=Properties
+ULinkPropertiesEditionPart_PropertiesGroupLabel=Properties
+XRefPropertiesEditionPart_PropertiesGroupLabel=Properties
+ExamplePropertiesEditionPart_PropertiesGroupLabel=Properties
+Sect3PropertiesEditionPart_PropertiesGroupLabel=Properties
+Book_ReadOnly=This property is read only
+Book_Part_Title=Base
+Info_ReadOnly=This property is read only
+Info_Part_Title=Base
+Author_ReadOnly=This property is read only
+Author_Part_Title=Base
+Chapter_ReadOnly=This property is read only
+Chapter_Part_Title=Base
+Title__ReadOnly=This property is read only
+Title__Part_Title=Base
+Para_ReadOnly=This property is read only
+Para_Part_Title=Base
+SimpleList_ReadOnly=This property is read only
+SimpleList_Part_Title=Base
+ItemizedList_ReadOnly=This property is read only
+ItemizedList_Part_Title=Base
+OrderedList_ReadOnly=This property is read only
+OrderedList_Part_Title=Base
+Sect1_ReadOnly=This property is read only
+Sect1_Part_Title=Base
+Sect2_ReadOnly=This property is read only
+Sect2_Part_Title=Base
+Emphasis_ReadOnly=This property is read only
+Emphasis_Part_Title=Base
+ULink_ReadOnly=This property is read only
+ULink_Part_Title=Base
+Link_ReadOnly=This property is read only
+Link_Part_Title=Base
+XRef_ReadOnly=This property is read only
+XRef_Part_Title=Base
+Example_ReadOnly=This property is read only
+Example_Part_Title=Base
+Sect3_ReadOnly=This property is read only
+Sect3_Part_Title=Base
+ListItem_ReadOnly=This property is read only
+ListItem_Part_Title=Base
+BookPropertiesEditionPart_ChapterLabel=Chapter :
+BookPropertiesEditionPart_IdLabel=Id :
+BookPropertiesEditionPart_LangLabel=Lang :
+BookPropertiesEditionPart_VersionLabel=Version :
+InfoPropertiesEditionPart_AuthorLabel=Author :
+InfoPropertiesEditionPart_DateLabel=Date :
+InfoPropertiesEditionPart_PubdateLabel=Pubdate :
+AuthorPropertiesEditionPart_EmailLabel=Email :
+AuthorPropertiesEditionPart_PersonnameLabel=Personname :
+AuthorPropertiesEditionPart_AddressLabel=Address :
+ChapterPropertiesEditionPart_ParaLabel=Para :
+ChapterPropertiesEditionPart_Sect1Label=Sect1 :
+ChapterPropertiesEditionPart_IdLabel=Id :
+Title_PropertiesEditionPart_DataLabel=Data :
+ParaPropertiesEditionPart_DataLabel=Data :
+ItemizedListPropertiesEditionPart_MarkLabel=Mark :
+ItemizedListPropertiesEditionPart_ListitemLabel=Listitem :
+OrderedListPropertiesEditionPart_NumerationLabel=Numeration :
+Sect1PropertiesEditionPart_ParaLabel=Para :
+Sect1PropertiesEditionPart_IdLabel=Id :
+Sect1PropertiesEditionPart_Sect2Label=Sect2 :
+Sect2PropertiesEditionPart_ParaLabel=Para :
+Sect2PropertiesEditionPart_IdLabel=Id :
+Sect2PropertiesEditionPart_Sect3Label=Sect3 :
+EmphasisPropertiesEditionPart_RemapLabel=Remap :
+ULinkPropertiesEditionPart_UrlLabel=Url :
+ULinkPropertiesEditionPart_DataLabel=Data :
+XRefPropertiesEditionPart_LinkendLabel=Linkend :
+ExamplePropertiesEditionPart_ParaLabel=Para :
+Sect3PropertiesEditionPart_ParaLabel=Para :
+Sect3PropertiesEditionPart_IdLabel=Id :
+PropertiesEditionPart_PropertiesGroupLabel=Properties
+PropertiesEditionPart_EditTableViewerLabel=Edit
+PropertiesEditionPart_DocumentationLabel=Documentation
+PropertiesEditionPart_RequiredFeatureMessage=The property {0} of the object shall be filled
+PropertiesEditionPart_RemoveTableViewerLabel=Delete
+PropertiesEditionPart_RemoveListViewerLabel=Delete
+PropertiesEditionPart_IntegerValueMessage=The property {0} shall be an integer
+PropertiesEditionPart_FloatValueMessage=The property {0} shall be a float
+PropertiesEditionPart_ShortValueMessage=The property {0} shall be a short
+PropertiesEditionPart_DoubleValueMessage=The property {0} shall be a double
+PropertiesEditionPart_ByteValueMessage=The property {0} shall be a byte
+PropertiesEditionPart_LongValueMessage=The property {0} shall be a long
+PropertiesEditionPart_BigIntegerValueMessage=The property {0} shall be a BigInteger
+PropertiesEditionPart_BigDecimalValueMessage=The property {0} shall be a BigDecimal
+PropertiesEditionPart_AddTableViewerLabel=Add
+PropertiesEditionPart_AddListViewerLabel=Add
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages_fr.properties b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages_fr.properties
new file mode 100644
index 0000000000..d0bd5741c5
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.edit/src-gen/org/eclipse/sirius/tests/sample/docbook/providers/docbookMessages_fr.properties
@@ -0,0 +1,115 @@
+##
+# Copyright (c) 2015 Obeo
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+ #
+
+# Start of user code for titles customization
+
+# End of user code
+
+# default values ...
+BookPropertiesEditionPart_PropertiesGroupLabel=Properties
+InfoPropertiesEditionPart_PropertiesGroupLabel=Properties
+AuthorPropertiesEditionPart_PropertiesGroupLabel=Properties
+ChapterPropertiesEditionPart_PropertiesGroupLabel=Properties
+Title_PropertiesEditionPart_PropertiesGroupLabel=Properties
+ParaPropertiesEditionPart_PropertiesGroupLabel=Properties
+ItemizedListPropertiesEditionPart_PropertiesGroupLabel=Properties
+OrderedListPropertiesEditionPart_PropertiesGroupLabel=Properties
+Sect1PropertiesEditionPart_PropertiesGroupLabel=Properties
+Sect2PropertiesEditionPart_PropertiesGroupLabel=Properties
+EmphasisPropertiesEditionPart_PropertiesGroupLabel=Properties
+ULinkPropertiesEditionPart_PropertiesGroupLabel=Properties
+XRefPropertiesEditionPart_PropertiesGroupLabel=Properties
+ExamplePropertiesEditionPart_PropertiesGroupLabel=Properties
+Sect3PropertiesEditionPart_PropertiesGroupLabel=Properties
+Book_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Book_Part_Title=Base
+Info_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Info_Part_Title=Base
+Author_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Author_Part_Title=Base
+Chapter_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Chapter_Part_Title=Base
+Title__ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Title__Part_Title=Base
+Para_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Para_Part_Title=Base
+SimpleList_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+SimpleList_Part_Title=Base
+ItemizedList_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+ItemizedList_Part_Title=Base
+OrderedList_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+OrderedList_Part_Title=Base
+Sect1_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Sect1_Part_Title=Base
+Sect2_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Sect2_Part_Title=Base
+Emphasis_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Emphasis_Part_Title=Base
+ULink_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+ULink_Part_Title=Base
+Link_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Link_Part_Title=Base
+XRef_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+XRef_Part_Title=Base
+Example_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Example_Part_Title=Base
+Sect3_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+Sect3_Part_Title=Base
+ListItem_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
+ListItem_Part_Title=Base
+BookPropertiesEditionPart_ChapterLabel=Chapter :
+BookPropertiesEditionPart_IdLabel=Id :
+BookPropertiesEditionPart_LangLabel=Lang :
+BookPropertiesEditionPart_VersionLabel=Version :
+InfoPropertiesEditionPart_AuthorLabel=Author :
+InfoPropertiesEditionPart_DateLabel=Date :
+InfoPropertiesEditionPart_PubdateLabel=Pubdate :
+AuthorPropertiesEditionPart_EmailLabel=Email :
+AuthorPropertiesEditionPart_PersonnameLabel=Personname :
+AuthorPropertiesEditionPart_AddressLabel=Address :
+ChapterPropertiesEditionPart_ParaLabel=Para :
+ChapterPropertiesEditionPart_Sect1Label=Sect1 :
+ChapterPropertiesEditionPart_IdLabel=Id :
+Title_PropertiesEditionPart_DataLabel=Data :
+ParaPropertiesEditionPart_DataLabel=Data :
+ItemizedListPropertiesEditionPart_MarkLabel=Mark :
+ItemizedListPropertiesEditionPart_ListitemLabel=Listitem :
+OrderedListPropertiesEditionPart_NumerationLabel=Numeration :
+Sect1PropertiesEditionPart_ParaLabel=Para :
+Sect1PropertiesEditionPart_IdLabel=Id :
+Sect1PropertiesEditionPart_Sect2Label=Sect2 :
+Sect2PropertiesEditionPart_ParaLabel=Para :
+Sect2PropertiesEditionPart_IdLabel=Id :
+Sect2PropertiesEditionPart_Sect3Label=Sect3 :
+EmphasisPropertiesEditionPart_RemapLabel=Remap :
+ULinkPropertiesEditionPart_UrlLabel=Url :
+ULinkPropertiesEditionPart_DataLabel=Data :
+XRefPropertiesEditionPart_LinkendLabel=Linkend :
+ExamplePropertiesEditionPart_ParaLabel=Para :
+Sect3PropertiesEditionPart_ParaLabel=Para :
+Sect3PropertiesEditionPart_IdLabel=Id :
+PropertiesEditionPart_PropertiesGroupLabel=Propri\u00E9t\u00E9s
+PropertiesEditionPart_EditTableViewerLabel=Editer
+PropertiesEditionPart_DocumentationLabel=Documentation
+PropertiesEditionPart_RequiredFeatureMessage=La propri\u00E9t\u00E9 {0} de l\u0027objet doit \u00EAtre renseign\u00E9e
+PropertiesEditionPart_RemoveTableViewerLabel=Supprimer
+PropertiesEditionPart_RemoveListViewerLabel=Supprimer
+PropertiesEditionPart_IntegerValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un entier
+PropertiesEditionPart_FloatValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un flottant
+PropertiesEditionPart_ShortValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un short
+PropertiesEditionPart_DoubleValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un double
+PropertiesEditionPart_ByteValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un byte
+PropertiesEditionPart_LongValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un long
+PropertiesEditionPart_BigIntegerValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un BigInteger
+PropertiesEditionPart_BigDecimalValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un BigDecimal
+PropertiesEditionPart_AddTableViewerLabel=Ajouter
+PropertiesEditionPart_AddListViewerLabel=Ajouter
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.checkstyle b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.checkstyle
new file mode 100644
index 0000000000..3c756ff819
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.checkstyle
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <local-check-config name="Sirius Checks" location="/org.eclipse.sirius.settings/CheckstyleConfiguration.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="false"/>
+ </local-check-config>
+ <fileset name="all" enabled="true" check-config-name="Sirius Checks" local="true">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src-gen"/>
+ </filter>
+</fileset-config>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.classpath b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.classpath
new file mode 100644
index 0000000000..e4dad7e73e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.project b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.project
new file mode 100644
index 0000000000..f815aaf7a8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.sirius.tests.sample.docbook.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..41b0cb3a1c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.sirius.tests.sample.docbook.editor;singleton:=true
+Bundle-Version: 3.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.sirius.tests.sample.docbook.presentation.DocbookEditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.sirius.tests.sample.docbook.presentation
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.sirius.tests.sample.docbook.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/build.properties b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/build.properties
new file mode 100644
index 0000000000..d7992a7e6b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/build.properties
@@ -0,0 +1,18 @@
+# Copyright (c) 2015 Obeo
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/obj16/DocbookModelFile.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/obj16/DocbookModelFile.gif
new file mode 100644
index 0000000000..c4edfc0c55
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/obj16/DocbookModelFile.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/wizban/NewDocbook.gif b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/wizban/NewDocbook.gif
new file mode 100644
index 0000000000..0ed73ab4fd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/icons/full/wizban/NewDocbook.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.properties b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.properties
new file mode 100644
index 0000000000..8a2515ca2b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.properties
@@ -0,0 +1,61 @@
+# Copyright (c) 2015 Obeo
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+
+pluginName = Docbook Editor
+providerName = Eclipse Modeling Project
+
+_UI_DocbookEditor_menu = &Docbook Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_DocbookModelWizard_label = Docbook Model
+_UI_DocbookModelWizard_description = Create a new Docbook model
+
+_UI_DocbookEditor_label = Docbook Model Editor
+
+_UI_DocbookEditorFilenameDefaultBase = My
+_UI_DocbookEditorFilenameExtensions = docbook
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.xml b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.xml
new file mode 100644
index 0000000000..c7e2e6c9e0
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/plugin.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2015 Obeo
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Obeo - initial API and implementation
+
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <!-- @generated docbook -->
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="org.eclipse.sirius.tests.sample.docbook.presentation.DocbookModelWizardID"
+ name="%_UI_DocbookModelWizard_label"
+ class="org.eclipse.sirius.tests.sample.docbook.presentation.DocbookModelWizard"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/DocbookModelFile.gif">
+ <description>%_UI_DocbookModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <!-- @generated docbook -->
+ <editor
+ id="org.eclipse.sirius.tests.sample.docbook.presentation.DocbookEditorID"
+ name="%_UI_DocbookEditor_label"
+ icon="icons/full/obj16/DocbookModelFile.gif"
+ extensions="docbook"
+ class="org.eclipse.sirius.tests.sample.docbook.presentation.DocbookEditor"
+ contributorClass="org.eclipse.sirius.tests.sample.docbook.presentation.DocbookActionBarContributor">
+ </editor>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/pom.xml b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/pom.xml
new file mode 100644
index 0000000000..9949960ac0
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/pom.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Obeo
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Obeo - Initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.sirius</groupId>
+ <artifactId>sirius-tests-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../../packaging/org.eclipse.sirius.tests.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.sirius.tests.sample.docbook.editor</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <version>3.0.0-SNAPSHOT</version>
+
+</project>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookActionBarContributor.java b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookActionBarContributor.java
new file mode 100644
index 0000000000..621110da0f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookActionBarContributor.java
@@ -0,0 +1,433 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the Docbook model editor. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DocbookActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener {
+ /**
+ * This keeps track of the active editor. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected IAction showPropertiesViewAction = new Action(DocbookEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet");
+ } catch (PartInitException exception) {
+ DocbookEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IAction refreshViewerAction = new Action(DocbookEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider) activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one
+ * {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to
+ * each descriptor generated for the current selection by the item provider.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be
+ * added for CreateChild actions. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one
+ * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding
+ * to each descriptor generated for the current selection by the item
+ * provider. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be
+ * added for CreateSibling actions. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public DocbookActionBarContributor() {
+ super(EditingDomainActionBarContributor.ADDITIONS_LAST_STYLE);
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add(new Separator("docbook-settings"));
+ toolBarManager.add(new Separator("docbook-additions"));
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor
+ * additions, as well as the sub-menus for object creation items. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager) {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookEditor_menu"), "org.eclipse.sirius.tests.sample.docbookMenuID");
+ menuManager.insertAfter("additions", submenuManager);
+ submenuManager.add(new Separator("settings"));
+ submenuManager.add(new Separator("actions"));
+ submenuManager.add(new Separator("additions"));
+ submenuManager.add(new Separator("additions-end"));
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(DocbookEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ submenuManager.insertBefore("additions", createChildMenuManager);
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(DocbookEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ submenuManager.insertBefore("additions", createSiblingMenuManager);
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener(new IMenuListener() {
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers
+ * with it as a selection provider. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ } else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements
+ * {@link org.eclipse.jface.viewers.ISelectionChangedListener}, handling
+ * {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for
+ * the children and siblings that can be added to the selected object and
+ * updating the menus accordingly. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
+ Object object = ((IStructuredSelection) selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction}
+ * for each object in <code>descriptors</code>, and returns the collection
+ * of these actions. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a
+ * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each
+ * object in <code>descriptors</code>, and returns the collection of these
+ * actions. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with
+ * {@link org.eclipse.jface.action.ActionContributionItem}s based on the
+ * {@link org.eclipse.jface.action.IAction}s contained in the
+ * <code>actions</code> collection, by inserting them before the specified
+ * contribution item <code>contributionID</code>. If
+ * <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ } else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all
+ * {@link org.eclipse.jface.action.ActionContributionItem}s based on the
+ * {@link org.eclipse.jface.action.IAction}s contained in the
+ * <code>actions</code> collection. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (IContributionItem item : items) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = item;
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem) contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem) contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(DocbookEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+
+ submenuManager = new MenuManager(DocbookEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions"));
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction);
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction);
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted
+ * objects. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return true;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditor.java b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditor.java
new file mode 100644
index 0000000000..10e497ff35
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditor.java
@@ -0,0 +1,1761 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.presentation;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.sirius.tests.sample.docbook.provider.DocbookItemProviderAdapterFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * This is an example of a Docbook model editor. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class DocbookEditor extends MultiPageEditorPart implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker, ITabbedPropertySheetPageContributor {
+
+ /**
+ * @generated NOT
+ */
+ public static final String PROPERTIES_CONTRIBUTOR = "org.eclipse.sirius.tests.sample.docbook.properties";
+
+ /**
+ * This keeps track of the editing domain that is used to track all changes
+ * to the model. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge... <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected List<TabbedPropertySheetPage> propertySheetPages = new ArrayList<TabbedPropertySheetPage>();
+
+ /**
+ * This is the viewer that shadows the selection in the content outline. The
+ * parent relation must be correctly defined for this to work. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and
+ * show parents as a tree. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works. A list viewer doesn't support icons.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works. A table can be used as a list with
+ * icons. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of
+ * the viewers in the pages or the content outline viewer. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the
+ * {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are
+ * listening to this editor. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers
+ * presented in Eclipse's Problems View. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * This listens for when the outline becomes active <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IPartListener partListener = new IPartListener() {
+ @Override
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline) p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(DocbookEditor.this);
+
+ setCurrentViewer(contentOutlineViewer);
+ }
+ } else if (p instanceof PropertySheet) {
+ if (propertySheetPages.contains(((PropertySheet) p).getCurrentPage())) {
+ getActionBarContributor().setActiveEditor(DocbookEditor.this);
+ handleActivate();
+ }
+ } else if (p == DocbookEditor.this) {
+ handleActivate();
+ }
+ }
+
+ @Override
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ @Override
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ @Override
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+
+ @Override
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been changed since last activation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been saved. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Collection<Resource> savedResources = new ArrayList<Resource>();
+
+ /**
+ * Map to store the diagnostic associated with a resource. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+
+ /**
+ * Controls whether the problem indication should be updated. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded
+ * loaded. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EContentAdapter problemIndicationAdapter = new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ Resource resource = (Resource) notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, diagnostic);
+ } else {
+ resourceToDiagnosticMap.remove(resource);
+ }
+
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ } else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ resourceToDiagnosticMap.remove(target);
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+ };
+
+ /**
+ * This listens for workspace changes. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() {
+ @Override
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = editingDomain.getResourceSet();
+
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ @Override
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getResource().getType() == IResource.FILE) {
+ if (delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if (resource != null) {
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ removedResources.add(resource);
+ } else if (!savedResources.remove(resource)) {
+ changedResources.add(resource);
+ }
+ }
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ public Collection<Resource> getChangedResources() {
+ return changedResources;
+ }
+
+ public Collection<Resource> getRemovedResources() {
+ return removedResources;
+ }
+ }
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getPage().closeEditor(DocbookEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == DocbookEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ } catch (CoreException exception) {
+ DocbookEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void handleActivate() {
+ // Recompute the read only state.
+ //
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(DocbookEditor.this, false);
+ } else {
+ removedResources.clear();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ } else if (!changedResources.isEmpty()) {
+ changedResources.removeAll(savedResources);
+ handleChangedResources();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resources on activation. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void handleChangedResources() {
+ if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (isDirty()) {
+ changedResources.addAll(editingDomain.getResourceSet().getResources());
+ }
+ editingDomain.getCommandStack().flush();
+
+ updateProblemIndication = false;
+ for (Resource resource : changedResources) {
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ } catch (IOException exception) {
+ if (!resourceToDiagnosticMap.containsKey(resource)) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ }
+ }
+ }
+
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the
+ * specified diagnostic. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void updateProblemIndication() {
+ if (updateProblemIndication) {
+ BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, "org.eclipse.sirius.tests.sample.docbook.editor", 0, null, new Object[] { editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart) getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ }
+ } else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ } catch (PartInitException exception) {
+ DocbookEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
+ markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ markerHelper.createMarkers(diagnostic);
+ } catch (CoreException exception) {
+ DocbookEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return MessageDialog.openQuestion(getSite().getShell(), DocbookEditor.getString("_UI_FileConflict_label"), DocbookEditor.getString("_WARN_FileConflict"));
+ }
+
+ /**
+ * This creates a model editor. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public DocbookEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void initializeEditingDomain() {
+ // Create an adapter factory that yields item providers.
+ //
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new DocbookItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are
+ // executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to
+ // be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener(new CommandStackListener() {
+ @Override
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ for (Iterator<TabbedPropertySheetPage> i = propertySheetPages.iterator(); i.hasNext();) {
+ TabbedPropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed()) {
+ i.remove();
+ } else {
+ propertySheetPage.refresh();
+ }
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ /**
+ * This is here for the listener to be able to call it. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setSelectionToViewer(Collection<?> collection) {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ // Try to select the items in the current content viewer of
+ // the editor.
+ //
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the
+ * {@link IEditingDomainProvider} interface. This is important for
+ * implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object[] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object[] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or
+ * the outline view, if it has focus, is the current one. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener = new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the
+ // section.
+ //
+ @Override
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's
+ // selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider}
+ * interface. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Viewer getViewer() {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well
+ * registering the menu for extension. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp");
+ contextMenu.add(new Separator("additions"));
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu = contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's
+ * resource set based on the editor's input. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public void createModel() {
+ URI resourceURI = EditUIUtil.getURI(getEditorInput());
+ Exception exception = null;
+ Resource resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ } catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the
+ * resource and the specified exception (if any). <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
+ if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic = new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.sirius.tests.sample.docbook.editor", 0, DocbookEditor.getString("_UI_CreateModelError_message",
+ resource.getURI()), new Object[] { exception == null ? (Object) resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ } else if (exception != null) {
+ return new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.sirius.tests.sample.docbook.editor", 0, DocbookEditor.getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object[] { exception });
+ } else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void createPages() {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Only creates the other pages if there is something that can be edited
+ //
+ if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), DocbookEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ selectionViewer = (TreeViewer) viewerPane.getViewer();
+ selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+
+ selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ selectionViewer.setInput(editingDomain.getResourceSet());
+ selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, DocbookEditor.getString("_UI_SelectionPage_label"));
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), DocbookEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ parentViewer = (TreeViewer) viewerPane.getViewer();
+ parentViewer.setAutoExpandLevel(30);
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+ parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, DocbookEditor.getString("_UI_ParentPage_label"));
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), DocbookEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ listViewer = (ListViewer) viewerPane.getViewer();
+ listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, DocbookEditor.getString("_UI_ListPage_label"));
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), DocbookEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ treeViewer = (TreeViewer) viewerPane.getViewer();
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, DocbookEditor.getString("_UI_TreePage_label"));
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), DocbookEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ tableViewer = (TableViewer) viewerPane.getViewer();
+
+ Table table = tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(DocbookEditor.getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(DocbookEditor.getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+
+ tableViewer.setColumnProperties(new String[] { "a", "b" });
+ tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, DocbookEditor.getString("_UI_TablePage_label"));
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), DocbookEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ treeViewerWithColumns = (TreeViewer) viewerPane.getViewer();
+
+ Tree tree = treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(DocbookEditor.getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(DocbookEditor.getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ treeViewerWithColumns.setColumnProperties(new String[] { "a", "b" });
+ treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, DocbookEditor.getString("_UI_TreeWithColumnsPage_label"));
+ }
+
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ setActivePage(0);
+ }
+ });
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ //
+ getContainer().addControlListener(new ControlAdapter() {
+ boolean guard = false;
+
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (!guard) {
+ guard = true;
+ hideTabs();
+ guard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part, this hides the
+ * single tab at the bottom. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, "");
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder) getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part, this shows
+ * the tabs at the bottom. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void showTabs() {
+ if (getPageCount() > 1) {
+ setPageText(0, DocbookEditor.getString("_UI_SelectionPage_label"));
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ } else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ } else if (key.equals(IGotoMarker.class)) {
+ return this;
+ } else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ contentOutlineViewer.setInput(editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(contentOutlineViewer);
+
+ if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ TabbedPropertySheetPage propertySheetPage = new TabbedPropertySheetPage(DocbookEditor.this);
+ propertySheetPages.add(propertySheetPage);
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other
+ * views. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection) selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the
+ // same selection as this selection.
+ //
+ if (currentViewerPane.getViewer() == selectionViewer) {
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ } else {
+ // Set the input to the widget.
+ //
+ if (currentViewerPane.getViewer().getInput() != selectedElement) {
+ currentViewerPane.getViewer().setInput(selectedElement);
+ currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command
+ * stack. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return ((BasicCommandStack) editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model
+ * file. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Save only resources that have actually changed.
+ //
+ final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+
+ // Do the work within an operation because this is a long running
+ // activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if (resource.getTimeStamp() != timeStamp) {
+ savedResources.add(resource);
+ }
+ } catch (Exception exception) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ first = false;
+ }
+ }
+ }
+ };
+
+ updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ } catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ DocbookEditorPlugin.INSTANCE.log(exception);
+ }
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the
+ * specified resource. The implementation uses the URI converter from the
+ * editor's resource set to try to open an input stream. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource) {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ } catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput) {
+ (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void gotoMarker(IMarker marker) {
+ List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ if (!targetObjects.isEmpty()) {
+ setSelectionToViewer(targetObjects);
+ }
+ }
+
+ /**
+ * This is called during startup. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setFocus() {
+ if (currentViewerPane != null) {
+ currentViewerPane.setFocus();
+ } else {
+ getControl(getActivePage()).setFocus();
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to
+ * return this editor's overall selection. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ISelection getSelection() {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to
+ * set this editor's overall selection. Calling this result will notify the
+ * listeners. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setSelection(ISelection selection) {
+ editorSelection = selection;
+
+ for (ISelectionChangedListener listener : selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection) selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(DocbookEditor.getString("_UI_NoObjectSelected"));
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(DocbookEditor.getString("_UI_SingleObjectSelected", text));
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(DocbookEditor.getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
+ break;
+ }
+ }
+ } else {
+ statusLineManager.setMessage("");
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static String getString(String key) {
+ return DocbookEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return DocbookEditorPlugin.INSTANCE.getString(key, new Object[] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help
+ * fill the context menus with contributions from the Edit menu. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener) getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor) getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ updateProblemIndication = false;
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+
+ getSite().getPage().removePartListener(partListener);
+
+ adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ for (TabbedPropertySheetPage propertySheetPage : propertySheetPages) {
+ propertySheetPage.dispose();
+ }
+
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean showOutlineView() {
+ return true;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor
+ * #getContributorId()
+ * @generated NOT
+ */
+ @Override
+ public String getContributorId() {
+ return DocbookEditor.PROPERTIES_CONTRIBUTOR;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditorPlugin.java b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditorPlugin.java
new file mode 100644
index 0000000000..2584e44487
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookEditorPlugin.java
@@ -0,0 +1,94 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.presentation;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Docbook editor plugin. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class DocbookEditorPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public static final DocbookEditorPlugin INSTANCE = new DocbookEditorPlugin();
+
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DocbookEditorPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return DocbookEditorPlugin.plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return DocbookEditorPlugin.plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ DocbookEditorPlugin.plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookModelWizard.java b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookModelWizard.java
new file mode 100644
index 0000000000..d0682968b3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook.editor/src-gen/org/eclipse/sirius/tests/sample/docbook/presentation/DocbookModelWizard.java
@@ -0,0 +1,596 @@
+/**
+ * Copyright (c) 2015 Obeo
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.tests.sample.docbook.presentation;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.CommonPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.sirius.tests.sample.docbook.DocbookFactory;
+import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
+import org.eclipse.sirius.tests.sample.docbook.provider.DocbookEditPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+/**
+ * This is a simple wizard for creating a new model file. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DocbookModelWizard extends Wizard implements INewWizard {
+ /**
+ * The supported extensions for created files. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookEditorFilenameExtensions").split("\\s*,\\s*")));
+
+ /**
+ * A formatted list of supported file extensions, suitable for display. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS = DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
+
+ /**
+ * This caches an instance of the model package. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DocbookPackage docbookPackage = DocbookPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DocbookFactory docbookFactory = docbookPackage.getDocbookFactory();
+
+ /**
+ * This is the file creation page. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected DocbookModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected DocbookModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default
+ * container. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * This just records the information. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(DocbookEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(DocbookEditorPlugin.INSTANCE.getImage("full/wizban/NewDocbook")));
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<String> getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ for (EClassifier eClassifier : docbookPackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass) eClassifier;
+ if (!eClass.isAbstract()) {
+ initialObjectNames.add(eClass.getName());
+ }
+ }
+ }
+ Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = (EClass) docbookPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = docbookFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ } catch (Exception exception) {
+ DocbookEditorPlugin.INSTANCE.log(exception);
+ } finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ ((ISetSelectionTarget) activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor(new FileEditorInput(modelFile), workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ } catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), DocbookEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
+ return false;
+ }
+
+ return true;
+ } catch (Exception exception) {
+ DocbookEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public class DocbookModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DocbookModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !DocbookModelWizard.FILE_EXTENSIONS.contains(extension)) {
+ String key = DocbookModelWizard.FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
+ setErrorMessage(DocbookEditorPlugin.INSTANCE.getString(key, new Object[] { DocbookModelWizard.FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public class DocbookModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated <!-- begin-user-doc --> <!-- end-user-doc -->
+ */
+ protected List<String> encodings;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DocbookModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(DocbookEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(DocbookEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (String encoding : getEncodings()) {
+ encodingField.add(encoding);
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ModifyListener validator = new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ } else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getEncoding() {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return DocbookEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
+ } catch (MissingResourceException mre) {
+ DocbookEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<String> getEncodings() {
+ if (encodings == null) {
+ encodings = new ArrayList<String>();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(DocbookEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens();) {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new DocbookModelWizardNewFileCreationPage("Whatever", selection);
+ newFileCreationPage.setTitle(DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookModelWizard_label"));
+ newFileCreationPage.setDescription(DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookModelWizard_description"));
+ newFileCreationPage.setFileName(DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookEditorFilenameDefaultBase") + "." + DocbookModelWizard.FILE_EXTENSIONS.get(0));
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory
+ // for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource) selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookEditorFilenameDefaultBase");
+ String defaultModelFilenameExtension = DocbookModelWizard.FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
+ for (int i = 1; ((IContainer) selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new DocbookModelWizardInitialObjectCreationPage("Whatever2");
+ initialObjectCreationPage.setTitle(DocbookEditorPlugin.INSTANCE.getString("_UI_DocbookModelWizard_label"));
+ initialObjectCreationPage.setDescription(DocbookEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/model/docbook.genmodel b/plugins/org.eclipse.sirius.tests.sample.docbook/model/docbook.genmodel
index 8f2e9747d8..1c21f99667 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/model/docbook.genmodel
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/model/docbook.genmodel
@@ -1,157 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013, 2014 THALES GLOBAL SERVICES.&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Obeo - initial API and implementation&#xA;" modelDirectory="/org.eclipse.sirius.tests.sample.docbook/src" modelPluginID="org.eclipse.sirius.tests.sample.docbook" modelName="Docbook" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false">
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013, 2014 THALES GLOBAL SERVICES.&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Obeo - initial API and implementation&#xA;"
+ modelDirectory="/org.eclipse.sirius.tests.sample.docbook/src" editDirectory="/org.eclipse.sirius.tests.sample.docbook.edit/src-gen"
+ editorDirectory="/org.eclipse.sirius.tests.sample.docbook.editor/src-gen" modelPluginID="org.eclipse.sirius.tests.sample.docbook"
+ modelName="Docbook" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" runtimeVersion="2.8">
<foreignModel>docbook.ecore</foreignModel>
- <genPackages prefix="Docbook" basePackage="org.eclipse.sirius.tests.sample" resource="XML" disposableProviderFactory="true">
- <ecorePackage href="docbook.ecore#/"/>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Book"/>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Book/bookinfo"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Book/chapter"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Book/id"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Book/lang"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Book/version"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Info"/>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Info/author"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Info/date"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Info/pubdate"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Author"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Author/email"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Author/personname"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Author/address"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Chapter"/>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Chapter/title"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Chapter/para"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Chapter/sect1"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Chapter/id"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Title"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Title/data"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Para"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Para/data"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//SimpleList"/>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//ItemizedList"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//ItemizedList/mark"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//ItemizedList/listitem"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//OrderedList"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//OrderedList/numeration"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Sect1"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Sect1/id"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Sect1/sect2"/>
- </genFeatures>
- </genClasses>
- <genClasses image="false">
- <ecoreClass href="docbook.ecore#//AbstractSect"/>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//AbstractSect/title"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//AbstractSect/para"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Sect2"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Sect2/id"/>
- </genFeatures>
- <genFeatures property="None" children="true" createChild="true">
- <ecoreFeature xsi:type="ecore:EReference" href="docbook.ecore#//Sect2/sect3"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Emphasis"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Emphasis/remap"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//ULink"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//ULink/url"/>
- </genFeatures>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//ULink/data"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Link"/>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//XRef"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//XRef/linkend"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Example"/>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//Sect3"/>
- <genFeatures createChild="false">
- <ecoreFeature xsi:type="ecore:EAttribute" href="docbook.ecore#//Sect3/id"/>
- </genFeatures>
- </genClasses>
- <genClasses>
- <ecoreClass href="docbook.ecore#//ListItem"/>
- </genClasses>
+ <genPackages prefix="Docbook" basePackage="org.eclipse.sirius.tests.sample" resource="XML"
+ disposableProviderFactory="true" ecorePackage="docbook.ecore#/">
+ <genClasses ecoreClass="docbook.ecore#//Book">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Book/bookinfo"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Book/chapter"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Book/id"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Book/lang"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Book/version"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Info">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Info/author"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Info/date"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Info/pubdate"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Author">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Author/email"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Author/personname"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Author/address"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Chapter">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Chapter/title"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Chapter/para"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Chapter/sect1"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Chapter/id"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Title">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Title/data"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Para">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Para/data"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//SimpleList"/>
+ <genClasses ecoreClass="docbook.ecore#//ItemizedList">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//ItemizedList/mark"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//ItemizedList/listitem"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//OrderedList">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//OrderedList/numeration"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Sect1">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Sect1/id"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Sect1/sect2"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="docbook.ecore#//AbstractSect">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//AbstractSect/title"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//AbstractSect/para"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Sect2">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Sect2/id"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference docbook.ecore#//Sect2/sect3"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Emphasis">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Emphasis/remap"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//ULink">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//ULink/url"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//ULink/data"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Link"/>
+ <genClasses ecoreClass="docbook.ecore#//XRef">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//XRef/linkend"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//Example"/>
+ <genClasses ecoreClass="docbook.ecore#//Sect3">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute docbook.ecore#//Sect3/id"/>
+ </genClasses>
+ <genClasses ecoreClass="docbook.ecore#//ListItem"/>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/AbstractSect.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/AbstractSect.java
index 48935878d7..d078d24ccc 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/AbstractSect.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/AbstractSect.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Abstract Sect</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -26,7 +26,7 @@ import org.eclipse.emf.ecore.EObject;
* Para</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getAbstractSect()
* @model abstract="true"
* @generated
@@ -40,7 +40,7 @@ public interface AbstractSect extends EObject {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Title</em>' containment reference.
* @see #setTitle(Title)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getAbstractSect_Title()
@@ -54,7 +54,7 @@ public interface AbstractSect extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.AbstractSect#getTitle
* <em>Title</em>}' containment reference. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Title</em>' containment reference.
* @see #getTitle()
@@ -72,7 +72,7 @@ public interface AbstractSect extends EObject {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Para</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getAbstractSect_Para()
* @model containment="true"
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Author.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Author.java
index 17e3694832..df1315abc3 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Author.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Author.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Author</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -27,7 +27,7 @@ import org.eclipse.emf.ecore.EObject;
* Address</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getAuthor()
* @model
* @generated
@@ -41,7 +41,7 @@ public interface Author extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Email</em>' attribute.
* @see #setEmail(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getAuthor_Email()
@@ -54,7 +54,7 @@ public interface Author extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Author#getEmail
* <em>Email</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Email</em>' attribute.
* @see #getEmail()
@@ -70,7 +70,7 @@ public interface Author extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Personname</em>' attribute.
* @see #setPersonname(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getAuthor_Personname()
@@ -84,7 +84,7 @@ public interface Author extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.Author#getPersonname
* <em>Personname</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Personname</em>' attribute.
* @see #getPersonname()
@@ -100,7 +100,7 @@ public interface Author extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Address</em>' attribute.
* @see #setAddress(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getAuthor_Address()
@@ -114,7 +114,7 @@ public interface Author extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.Author#getAddress
* <em>Address</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @param value
* the new value of the '<em>Address</em>' attribute.
* @see #getAddress()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Book.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Book.java
index cb4cab8ef0..c5a21bb8e7 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Book.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Book.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Book</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -31,7 +31,7 @@ import org.eclipse.emf.ecore.EObject;
* Version</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getBook()
* @model
* @generated
@@ -45,7 +45,7 @@ public interface Book extends EObject {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Bookinfo</em>' containment reference.
* @see #setBookinfo(Info)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getBook_Bookinfo()
@@ -59,7 +59,7 @@ public interface Book extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getBookinfo
* <em>Bookinfo</em>}' containment reference. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Bookinfo</em>' containment
* reference.
@@ -78,7 +78,7 @@ public interface Book extends EObject {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Chapter</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getBook_Chapter()
* @model containment="true"
@@ -94,7 +94,7 @@ public interface Book extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getBook_Id()
@@ -107,7 +107,7 @@ public interface Book extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getId <em>Id</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Id</em>' attribute.
* @see #getId()
@@ -123,7 +123,7 @@ public interface Book extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Lang</em>' attribute.
* @see #setLang(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getBook_Lang()
@@ -136,7 +136,7 @@ public interface Book extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getLang
* <em>Lang</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Lang</em>' attribute.
* @see #getLang()
@@ -152,7 +152,7 @@ public interface Book extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Version</em>' attribute.
* @see #setVersion(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getBook_Version()
@@ -166,7 +166,7 @@ public interface Book extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getVersion
* <em>Version</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @param value
* the new value of the '<em>Version</em>' attribute.
* @see #getVersion()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Chapter.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Chapter.java
index 0a65049597..d9bd7d7d83 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Chapter.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Chapter.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Chapter</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -30,7 +30,7 @@ import org.eclipse.emf.ecore.EObject;
* </li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getChapter()
* @model
* @generated
@@ -44,7 +44,7 @@ public interface Chapter extends EObject {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Title</em>' containment reference.
* @see #setTitle(Title)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getChapter_Title()
@@ -58,7 +58,7 @@ public interface Chapter extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.Chapter#getTitle
* <em>Title</em>}' containment reference. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Title</em>' containment reference.
* @see #getTitle()
@@ -76,7 +76,7 @@ public interface Chapter extends EObject {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Para</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getChapter_Para()
* @model containment="true"
@@ -94,7 +94,7 @@ public interface Chapter extends EObject {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Sect1</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getChapter_Sect1()
* @model containment="true"
@@ -110,7 +110,7 @@ public interface Chapter extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getChapter_Id()
@@ -123,7 +123,7 @@ public interface Chapter extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Chapter#getId <em>Id</em>}
* ' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Id</em>' attribute.
* @see #getId()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookFactory.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookFactory.java
index 61c4a7ca9b..01dfa78657 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookFactory.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookFactory.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
* create method for each non-abstract class of the model. <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage
* @generated
*/
@@ -23,7 +23,7 @@ public interface DocbookFactory extends EFactory {
/**
* The singleton instance of the factory. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
DocbookFactory eINSTANCE = org.eclipse.sirius.tests.sample.docbook.impl.DocbookFactoryImpl.init();
@@ -31,7 +31,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Book</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Book</em>'.
* @generated
*/
@@ -40,7 +40,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Info</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Info</em>'.
* @generated
*/
@@ -49,7 +49,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Author</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Author</em>'.
* @generated
*/
@@ -58,7 +58,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Chapter</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Chapter</em>'.
* @generated
*/
@@ -67,7 +67,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Title</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Title</em>'.
* @generated
*/
@@ -76,7 +76,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Para</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Para</em>'.
* @generated
*/
@@ -85,7 +85,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Simple List</em>'. <!-- begin-user-doc
* --> <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Simple List</em>'.
* @generated
*/
@@ -94,7 +94,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Itemized List</em>'. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Itemized List</em>'.
* @generated
*/
@@ -103,7 +103,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Ordered List</em>'. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Ordered List</em>'.
* @generated
*/
@@ -112,7 +112,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Sect1</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Sect1</em>'.
* @generated
*/
@@ -121,7 +121,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Sect2</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Sect2</em>'.
* @generated
*/
@@ -130,7 +130,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Emphasis</em>'. <!-- begin-user-doc
* --> <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Emphasis</em>'.
* @generated
*/
@@ -139,7 +139,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>ULink</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>ULink</em>'.
* @generated
*/
@@ -148,7 +148,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Link</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Link</em>'.
* @generated
*/
@@ -157,7 +157,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>XRef</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>XRef</em>'.
* @generated
*/
@@ -166,7 +166,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Example</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Example</em>'.
* @generated
*/
@@ -175,7 +175,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>Sect3</em>'. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>Sect3</em>'.
* @generated
*/
@@ -184,7 +184,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns a new object of class '<em>List Item</em>'. <!-- begin-user-doc
* --> <!-- end-user-doc -->
- *
+ *
* @return a new object of class '<em>List Item</em>'.
* @generated
*/
@@ -193,7 +193,7 @@ public interface DocbookFactory extends EFactory {
/**
* Returns the package supported by this factory. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the package supported by this factory.
* @generated
*/
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookPackage.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookPackage.java
index e7e1fa3b07..18e80b54b0 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookPackage.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/DocbookPackage.java
@@ -25,7 +25,7 @@ import org.eclipse.emf.ecore.EReference;
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookFactory
* @model kind="package"
* @generated
@@ -33,21 +33,21 @@ import org.eclipse.emf.ecore.EReference;
public interface DocbookPackage extends EPackage {
/**
* The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
String eNAME = "docbook";
/**
* The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
String eNS_URI = "http://docbook.org/ns/docbook";
/**
* The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
String eNS_PREFIX = "docbook";
@@ -55,7 +55,7 @@ public interface DocbookPackage extends EPackage {
/**
* The singleton instance of the package. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
DocbookPackage eINSTANCE = org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl.init();
@@ -64,7 +64,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.BookImpl
* <em>Book</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.BookImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getBook()
* @generated
@@ -74,7 +74,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Bookinfo</b></em>' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -83,7 +83,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Chapter</b></em>' containment reference
* list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -92,7 +92,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Id</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -101,7 +101,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Lang</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -110,7 +110,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Version</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -119,7 +119,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Book</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -129,7 +129,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.InfoImpl
* <em>Info</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.InfoImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getInfo()
* @generated
@@ -139,7 +139,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Author</b></em>' containment reference
* list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -148,7 +148,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Date</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -157,7 +157,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Pubdate</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -166,7 +166,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Info</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -176,7 +176,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.AuthorImpl
* <em>Author</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.AuthorImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getAuthor()
* @generated
@@ -186,7 +186,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Email</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -195,7 +195,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Personname</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -204,7 +204,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Address</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -213,7 +213,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Author</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -223,7 +223,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ChapterImpl
* <em>Chapter</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ChapterImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getChapter()
* @generated
@@ -233,7 +233,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Title</b></em>' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -242,7 +242,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Para</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -251,7 +251,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Sect1</b></em>' containment reference
* list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -260,7 +260,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Id</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -269,7 +269,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Chapter</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -279,7 +279,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.TitleImpl
* <em>Title</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.TitleImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getTitle()
* @generated
@@ -289,7 +289,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Data</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -298,7 +298,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Title</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -308,7 +308,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ParaImpl
* <em>Para</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ParaImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getPara()
* @generated
@@ -318,7 +318,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Data</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -327,7 +327,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Para</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -338,7 +338,7 @@ public interface DocbookPackage extends EPackage {
* {@link org.eclipse.sirius.tests.sample.docbook.impl.SimpleListImpl
* <em>Simple List</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.SimpleListImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSimpleList()
* @generated
@@ -348,7 +348,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Simple List</em>' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -359,7 +359,7 @@ public interface DocbookPackage extends EPackage {
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ItemizedListImpl
* <em>Itemized List</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ItemizedListImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getItemizedList()
* @generated
@@ -369,7 +369,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Mark</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -378,7 +378,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Listitem</b></em>' containment reference
* list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -387,7 +387,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Itemized List</em>' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -398,7 +398,7 @@ public interface DocbookPackage extends EPackage {
* {@link org.eclipse.sirius.tests.sample.docbook.impl.OrderedListImpl
* <em>Ordered List</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.OrderedListImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getOrderedList()
* @generated
@@ -408,7 +408,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Numeration</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -417,7 +417,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Ordered List</em>' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -428,7 +428,7 @@ public interface DocbookPackage extends EPackage {
* {@link org.eclipse.sirius.tests.sample.docbook.impl.AbstractSectImpl
* <em>Abstract Sect</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.AbstractSectImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getAbstractSect()
* @generated
@@ -438,7 +438,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Title</b></em>' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -447,7 +447,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Para</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -456,7 +456,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Abstract Sect</em>' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -466,7 +466,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.Sect1Impl
* <em>Sect1</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.Sect1Impl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSect1()
* @generated
@@ -476,53 +476,53 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Title</b></em>' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT1__TITLE = ABSTRACT_SECT__TITLE;
+ int SECT1__TITLE = DocbookPackage.ABSTRACT_SECT__TITLE;
/**
* The feature id for the '<em><b>Para</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT1__PARA = ABSTRACT_SECT__PARA;
+ int SECT1__PARA = DocbookPackage.ABSTRACT_SECT__PARA;
/**
* The feature id for the '<em><b>Id</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT1__ID = ABSTRACT_SECT_FEATURE_COUNT + 0;
+ int SECT1__ID = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Sect2</b></em>' containment reference
* list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT1__SECT2 = ABSTRACT_SECT_FEATURE_COUNT + 1;
+ int SECT1__SECT2 = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Sect1</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT1_FEATURE_COUNT = ABSTRACT_SECT_FEATURE_COUNT + 2;
+ int SECT1_FEATURE_COUNT = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 2;
/**
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.Sect2Impl
* <em>Sect2</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.Sect2Impl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSect2()
* @generated
@@ -532,53 +532,53 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Title</b></em>' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT2__TITLE = ABSTRACT_SECT__TITLE;
+ int SECT2__TITLE = DocbookPackage.ABSTRACT_SECT__TITLE;
/**
* The feature id for the '<em><b>Para</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT2__PARA = ABSTRACT_SECT__PARA;
+ int SECT2__PARA = DocbookPackage.ABSTRACT_SECT__PARA;
/**
* The feature id for the '<em><b>Id</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT2__ID = ABSTRACT_SECT_FEATURE_COUNT + 0;
+ int SECT2__ID = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Sect3</b></em>' containment reference
* list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT2__SECT3 = ABSTRACT_SECT_FEATURE_COUNT + 1;
+ int SECT2__SECT3 = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Sect2</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT2_FEATURE_COUNT = ABSTRACT_SECT_FEATURE_COUNT + 2;
+ int SECT2_FEATURE_COUNT = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 2;
/**
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.EmphasisImpl
* <em>Emphasis</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.EmphasisImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getEmphasis()
* @generated
@@ -588,7 +588,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Remap</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -597,7 +597,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Emphasis</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -607,7 +607,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ULinkImpl
* <em>ULink</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ULinkImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getULink()
* @generated
@@ -617,7 +617,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Url</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -626,7 +626,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Data</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -635,7 +635,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>ULink</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -645,7 +645,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.LinkImpl
* <em>Link</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.LinkImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getLink()
* @generated
@@ -655,7 +655,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>Link</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -665,7 +665,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.XRefImpl
* <em>XRef</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.XRefImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getXRef()
* @generated
@@ -675,7 +675,7 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Linkend</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -684,7 +684,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>XRef</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -694,7 +694,7 @@ public interface DocbookPackage extends EPackage {
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ExampleImpl
* <em>Example</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ExampleImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getExample()
* @generated
@@ -704,35 +704,35 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Title</b></em>' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int EXAMPLE__TITLE = ABSTRACT_SECT__TITLE;
+ int EXAMPLE__TITLE = DocbookPackage.ABSTRACT_SECT__TITLE;
/**
* The feature id for the '<em><b>Para</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int EXAMPLE__PARA = ABSTRACT_SECT__PARA;
+ int EXAMPLE__PARA = DocbookPackage.ABSTRACT_SECT__PARA;
/**
* The number of structural features of the '<em>Example</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int EXAMPLE_FEATURE_COUNT = ABSTRACT_SECT_FEATURE_COUNT + 0;
+ int EXAMPLE_FEATURE_COUNT = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 0;
/**
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.Sect3Impl
* <em>Sect3</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.Sect3Impl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSect3()
* @generated
@@ -742,44 +742,44 @@ public interface DocbookPackage extends EPackage {
/**
* The feature id for the '<em><b>Title</b></em>' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT3__TITLE = ABSTRACT_SECT__TITLE;
+ int SECT3__TITLE = DocbookPackage.ABSTRACT_SECT__TITLE;
/**
* The feature id for the '<em><b>Para</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT3__PARA = ABSTRACT_SECT__PARA;
+ int SECT3__PARA = DocbookPackage.ABSTRACT_SECT__PARA;
/**
* The feature id for the '<em><b>Id</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT3__ID = ABSTRACT_SECT_FEATURE_COUNT + 0;
+ int SECT3__ID = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Sect3</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int SECT3_FEATURE_COUNT = ABSTRACT_SECT_FEATURE_COUNT + 1;
+ int SECT3_FEATURE_COUNT = DocbookPackage.ABSTRACT_SECT_FEATURE_COUNT + 1;
/**
* The meta object id for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ListItemImpl
* <em>List Item</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ListItemImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getListItem()
* @generated
@@ -789,7 +789,7 @@ public interface DocbookPackage extends EPackage {
/**
* The number of structural features of the '<em>List Item</em>' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -799,7 +799,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Book <em>Book</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Book</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Book
* @generated
@@ -810,7 +810,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference '
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getBookinfo
* <em>Bookinfo</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference '<em>Bookinfo</em>
* '.
* @see org.eclipse.sirius.tests.sample.docbook.Book#getBookinfo()
@@ -823,7 +823,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getChapter
* <em>Chapter</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '
* <em>Chapter</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Book#getChapter()
@@ -836,7 +836,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getId <em>Id</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Book#getId()
* @see #getBook()
@@ -848,7 +848,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getLang
* <em>Lang</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Lang</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Book#getLang()
* @see #getBook()
@@ -860,7 +860,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Book#getVersion
* <em>Version</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Version</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Book#getVersion()
* @see #getBook()
@@ -872,7 +872,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Info <em>Info</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Info</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Info
* @generated
@@ -883,7 +883,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.Info#getAuthor
* <em>Author</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '
* <em>Author</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Info#getAuthor()
@@ -896,7 +896,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Info#getDate
* <em>Date</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Date</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Info#getDate()
* @see #getInfo()
@@ -908,7 +908,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Info#getPubdate
* <em>Pubdate</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Pubdate</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Info#getPubdate()
* @see #getInfo()
@@ -920,7 +920,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Author <em>Author</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Author</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Author
* @generated
@@ -931,7 +931,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Author#getEmail
* <em>Email</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Email</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Author#getEmail()
* @see #getAuthor()
@@ -943,7 +943,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Author#getPersonname
* <em>Personname</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Personname</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Author#getPersonname()
* @see #getAuthor()
@@ -955,7 +955,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Author#getAddress
* <em>Address</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Address</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Author#getAddress()
* @see #getAuthor()
@@ -967,7 +967,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Chapter <em>Chapter</em>}
* '. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Chapter</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Chapter
* @generated
@@ -978,7 +978,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference '
* {@link org.eclipse.sirius.tests.sample.docbook.Chapter#getTitle
* <em>Title</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference '<em>Title</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Chapter#getTitle()
* @see #getChapter()
@@ -990,7 +990,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.Chapter#getPara
* <em>Para</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '<em>Para</em>
* '.
* @see org.eclipse.sirius.tests.sample.docbook.Chapter#getPara()
@@ -1003,7 +1003,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.Chapter#getSect1
* <em>Sect1</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '
* <em>Sect1</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Chapter#getSect1()
@@ -1016,7 +1016,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Chapter#getId <em>Id</em>}
* '. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Chapter#getId()
* @see #getChapter()
@@ -1028,7 +1028,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Title <em>Title</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Title</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Title
* @generated
@@ -1039,7 +1039,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Title#getData
* <em>Data</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Data</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Title#getData()
* @see #getTitle()
@@ -1051,7 +1051,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Para <em>Para</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Para</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Para
* @generated
@@ -1062,7 +1062,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Para#getData
* <em>Data</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Data</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Para#getData()
* @see #getPara()
@@ -1074,7 +1074,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.SimpleList
* <em>Simple List</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Simple List</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.SimpleList
* @generated
@@ -1085,7 +1085,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.ItemizedList
* <em>Itemized List</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Itemized List</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.ItemizedList
* @generated
@@ -1096,7 +1096,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.ItemizedList#getMark
* <em>Mark</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Mark</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.ItemizedList#getMark()
* @see #getItemizedList()
@@ -1108,7 +1108,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.ItemizedList#getListitem
* <em>Listitem</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '
* <em>Listitem</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.ItemizedList#getListitem()
@@ -1121,7 +1121,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.OrderedList
* <em>Ordered List</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Ordered List</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.OrderedList
* @generated
@@ -1132,7 +1132,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.OrderedList#getNumeration
* <em>Numeration</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Numeration</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.OrderedList#getNumeration()
* @see #getOrderedList()
@@ -1144,7 +1144,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect1 <em>Sect1</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Sect1</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect1
* @generated
@@ -1155,7 +1155,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect1#getId <em>Id</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect1#getId()
* @see #getSect1()
@@ -1167,7 +1167,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect1#getSect2
* <em>Sect2</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '
* <em>Sect2</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect1#getSect2()
@@ -1180,7 +1180,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.AbstractSect
* <em>Abstract Sect</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Abstract Sect</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.AbstractSect
* @generated
@@ -1191,7 +1191,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference '
* {@link org.eclipse.sirius.tests.sample.docbook.AbstractSect#getTitle
* <em>Title</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference '<em>Title</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.AbstractSect#getTitle()
* @see #getAbstractSect()
@@ -1203,7 +1203,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.AbstractSect#getPara
* <em>Para</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '<em>Para</em>
* '.
* @see org.eclipse.sirius.tests.sample.docbook.AbstractSect#getPara()
@@ -1216,7 +1216,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect2 <em>Sect2</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Sect2</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect2
* @generated
@@ -1227,7 +1227,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect2#getId <em>Id</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect2#getId()
* @see #getSect2()
@@ -1239,7 +1239,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the containment reference list '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect2#getSect3
* <em>Sect3</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the containment reference list '
* <em>Sect3</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect2#getSect3()
@@ -1252,7 +1252,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Emphasis
* <em>Emphasis</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Emphasis</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Emphasis
* @generated
@@ -1263,7 +1263,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Emphasis#getRemap
* <em>Remap</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Remap</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Emphasis#getRemap()
* @see #getEmphasis()
@@ -1275,7 +1275,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.ULink <em>ULink</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>ULink</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.ULink
* @generated
@@ -1286,7 +1286,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.ULink#getUrl <em>Url</em>}
* '. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Url</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.ULink#getUrl()
* @see #getULink()
@@ -1298,7 +1298,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.ULink#getData
* <em>Data</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Data</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.ULink#getData()
* @see #getULink()
@@ -1310,7 +1310,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Link <em>Link</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Link</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Link
* @generated
@@ -1321,7 +1321,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.XRef <em>XRef</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>XRef</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.XRef
* @generated
@@ -1332,7 +1332,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.XRef#getLinkend
* <em>Linkend</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Linkend</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.XRef#getLinkend()
* @see #getXRef()
@@ -1344,7 +1344,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Example <em>Example</em>}
* '. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Example</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Example
* @generated
@@ -1355,7 +1355,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect3 <em>Sect3</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Sect3</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect3
* @generated
@@ -1366,7 +1366,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for the attribute '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect3#getId <em>Id</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.Sect3#getId()
* @see #getSect3()
@@ -1378,7 +1378,7 @@ public interface DocbookPackage extends EPackage {
* Returns the meta object for class '
* {@link org.eclipse.sirius.tests.sample.docbook.ListItem
* <em>List Item</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>List Item</em>'.
* @see org.eclipse.sirius.tests.sample.docbook.ListItem
* @generated
@@ -1388,7 +1388,7 @@ public interface DocbookPackage extends EPackage {
/**
* Returns the factory that creates the instances of the model. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @return the factory that creates the instances of the model.
* @generated
*/
@@ -1404,7 +1404,7 @@ public interface DocbookPackage extends EPackage {
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
interface Literals {
@@ -1412,469 +1412,469 @@ public interface DocbookPackage extends EPackage {
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.BookImpl
* <em>Book</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.BookImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getBook()
* @generated
*/
- EClass BOOK = eINSTANCE.getBook();
+ EClass BOOK = DocbookPackage.eINSTANCE.getBook();
/**
* The meta object literal for the '<em><b>Bookinfo</b></em>'
* containment reference feature. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
- EReference BOOK__BOOKINFO = eINSTANCE.getBook_Bookinfo();
+ EReference BOOK__BOOKINFO = DocbookPackage.eINSTANCE.getBook_Bookinfo();
/**
* The meta object literal for the '<em><b>Chapter</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference BOOK__CHAPTER = eINSTANCE.getBook_Chapter();
+ EReference BOOK__CHAPTER = DocbookPackage.eINSTANCE.getBook_Chapter();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute BOOK__ID = eINSTANCE.getBook_Id();
+ EAttribute BOOK__ID = DocbookPackage.eINSTANCE.getBook_Id();
/**
* The meta object literal for the '<em><b>Lang</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute BOOK__LANG = eINSTANCE.getBook_Lang();
+ EAttribute BOOK__LANG = DocbookPackage.eINSTANCE.getBook_Lang();
/**
* The meta object literal for the '<em><b>Version</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute BOOK__VERSION = eINSTANCE.getBook_Version();
+ EAttribute BOOK__VERSION = DocbookPackage.eINSTANCE.getBook_Version();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.InfoImpl
* <em>Info</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.InfoImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getInfo()
* @generated
*/
- EClass INFO = eINSTANCE.getInfo();
+ EClass INFO = DocbookPackage.eINSTANCE.getInfo();
/**
* The meta object literal for the '<em><b>Author</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference INFO__AUTHOR = eINSTANCE.getInfo_Author();
+ EReference INFO__AUTHOR = DocbookPackage.eINSTANCE.getInfo_Author();
/**
* The meta object literal for the '<em><b>Date</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute INFO__DATE = eINSTANCE.getInfo_Date();
+ EAttribute INFO__DATE = DocbookPackage.eINSTANCE.getInfo_Date();
/**
* The meta object literal for the '<em><b>Pubdate</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute INFO__PUBDATE = eINSTANCE.getInfo_Pubdate();
+ EAttribute INFO__PUBDATE = DocbookPackage.eINSTANCE.getInfo_Pubdate();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.AuthorImpl
* <em>Author</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.AuthorImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getAuthor()
* @generated
*/
- EClass AUTHOR = eINSTANCE.getAuthor();
+ EClass AUTHOR = DocbookPackage.eINSTANCE.getAuthor();
/**
* The meta object literal for the '<em><b>Email</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute AUTHOR__EMAIL = eINSTANCE.getAuthor_Email();
+ EAttribute AUTHOR__EMAIL = DocbookPackage.eINSTANCE.getAuthor_Email();
/**
* The meta object literal for the '<em><b>Personname</b></em>'
* attribute feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute AUTHOR__PERSONNAME = eINSTANCE.getAuthor_Personname();
+ EAttribute AUTHOR__PERSONNAME = DocbookPackage.eINSTANCE.getAuthor_Personname();
/**
* The meta object literal for the '<em><b>Address</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute AUTHOR__ADDRESS = eINSTANCE.getAuthor_Address();
+ EAttribute AUTHOR__ADDRESS = DocbookPackage.eINSTANCE.getAuthor_Address();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ChapterImpl
* <em>Chapter</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ChapterImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getChapter()
* @generated
*/
- EClass CHAPTER = eINSTANCE.getChapter();
+ EClass CHAPTER = DocbookPackage.eINSTANCE.getChapter();
/**
* The meta object literal for the '<em><b>Title</b></em>' containment
* reference feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference CHAPTER__TITLE = eINSTANCE.getChapter_Title();
+ EReference CHAPTER__TITLE = DocbookPackage.eINSTANCE.getChapter_Title();
/**
* The meta object literal for the '<em><b>Para</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference CHAPTER__PARA = eINSTANCE.getChapter_Para();
+ EReference CHAPTER__PARA = DocbookPackage.eINSTANCE.getChapter_Para();
/**
* The meta object literal for the '<em><b>Sect1</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference CHAPTER__SECT1 = eINSTANCE.getChapter_Sect1();
+ EReference CHAPTER__SECT1 = DocbookPackage.eINSTANCE.getChapter_Sect1();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute CHAPTER__ID = eINSTANCE.getChapter_Id();
+ EAttribute CHAPTER__ID = DocbookPackage.eINSTANCE.getChapter_Id();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.TitleImpl
* <em>Title</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.TitleImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getTitle()
* @generated
*/
- EClass TITLE = eINSTANCE.getTitle();
+ EClass TITLE = DocbookPackage.eINSTANCE.getTitle();
/**
* The meta object literal for the '<em><b>Data</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute TITLE__DATA = eINSTANCE.getTitle_Data();
+ EAttribute TITLE__DATA = DocbookPackage.eINSTANCE.getTitle_Data();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ParaImpl
* <em>Para</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ParaImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getPara()
* @generated
*/
- EClass PARA = eINSTANCE.getPara();
+ EClass PARA = DocbookPackage.eINSTANCE.getPara();
/**
* The meta object literal for the '<em><b>Data</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute PARA__DATA = eINSTANCE.getPara_Data();
+ EAttribute PARA__DATA = DocbookPackage.eINSTANCE.getPara_Data();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.SimpleListImpl
* <em>Simple List</em>}' class. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.SimpleListImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSimpleList()
* @generated
*/
- EClass SIMPLE_LIST = eINSTANCE.getSimpleList();
+ EClass SIMPLE_LIST = DocbookPackage.eINSTANCE.getSimpleList();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ItemizedListImpl
* <em>Itemized List</em>}' class. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ItemizedListImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getItemizedList()
* @generated
*/
- EClass ITEMIZED_LIST = eINSTANCE.getItemizedList();
+ EClass ITEMIZED_LIST = DocbookPackage.eINSTANCE.getItemizedList();
/**
* The meta object literal for the '<em><b>Mark</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute ITEMIZED_LIST__MARK = eINSTANCE.getItemizedList_Mark();
+ EAttribute ITEMIZED_LIST__MARK = DocbookPackage.eINSTANCE.getItemizedList_Mark();
/**
* The meta object literal for the '<em><b>Listitem</b></em>'
* containment reference list feature. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
- EReference ITEMIZED_LIST__LISTITEM = eINSTANCE.getItemizedList_Listitem();
+ EReference ITEMIZED_LIST__LISTITEM = DocbookPackage.eINSTANCE.getItemizedList_Listitem();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.OrderedListImpl
* <em>Ordered List</em>}' class. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.OrderedListImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getOrderedList()
* @generated
*/
- EClass ORDERED_LIST = eINSTANCE.getOrderedList();
+ EClass ORDERED_LIST = DocbookPackage.eINSTANCE.getOrderedList();
/**
* The meta object literal for the '<em><b>Numeration</b></em>'
* attribute feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute ORDERED_LIST__NUMERATION = eINSTANCE.getOrderedList_Numeration();
+ EAttribute ORDERED_LIST__NUMERATION = DocbookPackage.eINSTANCE.getOrderedList_Numeration();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.Sect1Impl
* <em>Sect1</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.Sect1Impl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSect1()
* @generated
*/
- EClass SECT1 = eINSTANCE.getSect1();
+ EClass SECT1 = DocbookPackage.eINSTANCE.getSect1();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute SECT1__ID = eINSTANCE.getSect1_Id();
+ EAttribute SECT1__ID = DocbookPackage.eINSTANCE.getSect1_Id();
/**
* The meta object literal for the '<em><b>Sect2</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference SECT1__SECT2 = eINSTANCE.getSect1_Sect2();
+ EReference SECT1__SECT2 = DocbookPackage.eINSTANCE.getSect1_Sect2();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.AbstractSectImpl
* <em>Abstract Sect</em>}' class. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.AbstractSectImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getAbstractSect()
* @generated
*/
- EClass ABSTRACT_SECT = eINSTANCE.getAbstractSect();
+ EClass ABSTRACT_SECT = DocbookPackage.eINSTANCE.getAbstractSect();
/**
* The meta object literal for the '<em><b>Title</b></em>' containment
* reference feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference ABSTRACT_SECT__TITLE = eINSTANCE.getAbstractSect_Title();
+ EReference ABSTRACT_SECT__TITLE = DocbookPackage.eINSTANCE.getAbstractSect_Title();
/**
* The meta object literal for the '<em><b>Para</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference ABSTRACT_SECT__PARA = eINSTANCE.getAbstractSect_Para();
+ EReference ABSTRACT_SECT__PARA = DocbookPackage.eINSTANCE.getAbstractSect_Para();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.Sect2Impl
* <em>Sect2</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.Sect2Impl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSect2()
* @generated
*/
- EClass SECT2 = eINSTANCE.getSect2();
+ EClass SECT2 = DocbookPackage.eINSTANCE.getSect2();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute SECT2__ID = eINSTANCE.getSect2_Id();
+ EAttribute SECT2__ID = DocbookPackage.eINSTANCE.getSect2_Id();
/**
* The meta object literal for the '<em><b>Sect3</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EReference SECT2__SECT3 = eINSTANCE.getSect2_Sect3();
+ EReference SECT2__SECT3 = DocbookPackage.eINSTANCE.getSect2_Sect3();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.EmphasisImpl
* <em>Emphasis</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.EmphasisImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getEmphasis()
* @generated
*/
- EClass EMPHASIS = eINSTANCE.getEmphasis();
+ EClass EMPHASIS = DocbookPackage.eINSTANCE.getEmphasis();
/**
* The meta object literal for the '<em><b>Remap</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute EMPHASIS__REMAP = eINSTANCE.getEmphasis_Remap();
+ EAttribute EMPHASIS__REMAP = DocbookPackage.eINSTANCE.getEmphasis_Remap();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ULinkImpl
* <em>ULink</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ULinkImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getULink()
* @generated
*/
- EClass ULINK = eINSTANCE.getULink();
+ EClass ULINK = DocbookPackage.eINSTANCE.getULink();
/**
* The meta object literal for the '<em><b>Url</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute ULINK__URL = eINSTANCE.getULink_Url();
+ EAttribute ULINK__URL = DocbookPackage.eINSTANCE.getULink_Url();
/**
* The meta object literal for the '<em><b>Data</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute ULINK__DATA = eINSTANCE.getULink_Data();
+ EAttribute ULINK__DATA = DocbookPackage.eINSTANCE.getULink_Data();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.LinkImpl
* <em>Link</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.LinkImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getLink()
* @generated
*/
- EClass LINK = eINSTANCE.getLink();
+ EClass LINK = DocbookPackage.eINSTANCE.getLink();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.XRefImpl
* <em>XRef</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.XRefImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getXRef()
* @generated
*/
- EClass XREF = eINSTANCE.getXRef();
+ EClass XREF = DocbookPackage.eINSTANCE.getXRef();
/**
* The meta object literal for the '<em><b>Linkend</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute XREF__LINKEND = eINSTANCE.getXRef_Linkend();
+ EAttribute XREF__LINKEND = DocbookPackage.eINSTANCE.getXRef_Linkend();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ExampleImpl
* <em>Example</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ExampleImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getExample()
* @generated
*/
- EClass EXAMPLE = eINSTANCE.getExample();
+ EClass EXAMPLE = DocbookPackage.eINSTANCE.getExample();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.Sect3Impl
* <em>Sect3</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.Sect3Impl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getSect3()
* @generated
*/
- EClass SECT3 = eINSTANCE.getSect3();
+ EClass SECT3 = DocbookPackage.eINSTANCE.getSect3();
/**
* The meta object literal for the '<em><b>Id</b></em>' attribute
* feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
- EAttribute SECT3__ID = eINSTANCE.getSect3_Id();
+ EAttribute SECT3__ID = DocbookPackage.eINSTANCE.getSect3_Id();
/**
* The meta object literal for the '
* {@link org.eclipse.sirius.tests.sample.docbook.impl.ListItemImpl
* <em>List Item</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.impl.ListItemImpl
* @see org.eclipse.sirius.tests.sample.docbook.impl.DocbookPackageImpl#getListItem()
* @generated
*/
- EClass LIST_ITEM = eINSTANCE.getListItem();
+ EClass LIST_ITEM = DocbookPackage.eINSTANCE.getListItem();
}
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Emphasis.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Emphasis.java
index 28a506319d..e47c1286df 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Emphasis.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Emphasis.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Emphasis</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -23,7 +23,7 @@ import org.eclipse.emf.ecore.EObject;
* Remap</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getEmphasis()
* @model
* @generated
@@ -37,7 +37,7 @@ public interface Emphasis extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Remap</em>' attribute.
* @see #setRemap(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getEmphasis_Remap()
@@ -50,7 +50,7 @@ public interface Emphasis extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Emphasis#getRemap
* <em>Remap</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Remap</em>' attribute.
* @see #getRemap()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Example.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Example.java
index 400b36de60..51cca56e5f 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Example.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Example.java
@@ -13,8 +13,8 @@ package org.eclipse.sirius.tests.sample.docbook;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Example</b></em>'. <!-- end-user-doc -->
- *
- *
+ *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getExample()
* @model
* @generated
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Info.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Info.java
index 4d53632aba..c343f330c0 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Info.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Info.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Info</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -28,7 +28,7 @@ import org.eclipse.emf.ecore.EObject;
* Pubdate</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getInfo()
* @model
* @generated
@@ -44,7 +44,7 @@ public interface Info extends EObject {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Author</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getInfo_Author()
* @model containment="true"
@@ -60,7 +60,7 @@ public interface Info extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Date</em>' attribute.
* @see #setDate(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getInfo_Date()
@@ -73,7 +73,7 @@ public interface Info extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Info#getDate
* <em>Date</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Date</em>' attribute.
* @see #getDate()
@@ -89,7 +89,7 @@ public interface Info extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Pubdate</em>' attribute.
* @see #setPubdate(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getInfo_Pubdate()
@@ -103,7 +103,7 @@ public interface Info extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.Info#getPubdate
* <em>Pubdate</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @param value
* the new value of the '<em>Pubdate</em>' attribute.
* @see #getPubdate()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ItemizedList.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ItemizedList.java
index 5edf8108bc..6df78de13f 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ItemizedList.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ItemizedList.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Itemized List</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -26,7 +26,7 @@ import org.eclipse.emf.ecore.EObject;
* <em>Listitem</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getItemizedList()
* @model
* @generated
@@ -40,7 +40,7 @@ public interface ItemizedList extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Mark</em>' attribute.
* @see #setMark(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getItemizedList_Mark()
@@ -53,7 +53,7 @@ public interface ItemizedList extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.ItemizedList#getMark
* <em>Mark</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Mark</em>' attribute.
* @see #getMark()
@@ -71,7 +71,7 @@ public interface ItemizedList extends EObject {
* isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Listitem</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getItemizedList_Listitem()
* @model containment="true"
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Link.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Link.java
index c14665bfcf..495b0b4ee9 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Link.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Link.java
@@ -15,8 +15,8 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Link</b></em>'. <!-- end-user-doc -->
- *
- *
+ *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getLink()
* @model
* @generated
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ListItem.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ListItem.java
index 15221a50ee..913d3bbb40 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ListItem.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ListItem.java
@@ -15,8 +15,8 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>List Item</b></em>'. <!-- end-user-doc -->
- *
- *
+ *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getListItem()
* @model
* @generated
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/OrderedList.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/OrderedList.java
index 9bcce5b421..b366185d5b 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/OrderedList.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/OrderedList.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Ordered List</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -23,7 +23,7 @@ import org.eclipse.emf.ecore.EObject;
* <em>Numeration</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getOrderedList()
* @model
* @generated
@@ -37,7 +37,7 @@ public interface OrderedList extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Numeration</em>' attribute.
* @see #setNumeration(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getOrderedList_Numeration()
@@ -51,7 +51,7 @@ public interface OrderedList extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.OrderedList#getNumeration
* <em>Numeration</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Numeration</em>' attribute.
* @see #getNumeration()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Para.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Para.java
index a3b4dd5a09..e1e2253401 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Para.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Para.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Para</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -23,7 +23,7 @@ import org.eclipse.emf.ecore.EObject;
* </em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getPara()
* @model extendedMetaData="kind='simple'"
* @generated
@@ -37,7 +37,7 @@ public interface Para extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Data</em>' attribute.
* @see #setData(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getPara_Data()
@@ -50,7 +50,7 @@ public interface Para extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Para#getData
* <em>Data</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Data</em>' attribute.
* @see #getData()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect1.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect1.java
index 6dd5b95dcd..9a6d6dece6 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect1.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect1.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Sect1</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -24,7 +24,7 @@ import org.eclipse.emf.common.util.EList;
* </em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect1()
* @model
* @generated
@@ -38,7 +38,7 @@ public interface Sect1 extends AbstractSect {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect1_Id()
@@ -51,7 +51,7 @@ public interface Sect1 extends AbstractSect {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect1#getId <em>Id</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Id</em>' attribute.
* @see #getId()
@@ -69,7 +69,7 @@ public interface Sect1 extends AbstractSect {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Sect2</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect1_Sect2()
* @model containment="true"
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect2.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect2.java
index 069e3e6d6f..a46197c83d 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect2.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect2.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Sect2</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -24,7 +24,7 @@ import org.eclipse.emf.common.util.EList;
* </em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect2()
* @model
* @generated
@@ -38,7 +38,7 @@ public interface Sect2 extends AbstractSect {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect2_Id()
@@ -51,7 +51,7 @@ public interface Sect2 extends AbstractSect {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect2#getId <em>Id</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Id</em>' attribute.
* @see #getId()
@@ -69,7 +69,7 @@ public interface Sect2 extends AbstractSect {
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Sect3</em>' containment reference list.
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect2_Sect3()
* @model containment="true"
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect3.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect3.java
index ff29530460..ed7150669e 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect3.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Sect3.java
@@ -13,14 +13,14 @@ package org.eclipse.sirius.tests.sample.docbook;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Sect3</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.sirius.tests.sample.docbook.Sect3#getId <em>Id</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect3()
* @model
* @generated
@@ -34,7 +34,7 @@ public interface Sect3 extends AbstractSect {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSect3_Id()
@@ -47,7 +47,7 @@ public interface Sect3 extends AbstractSect {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Sect3#getId <em>Id</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Id</em>' attribute.
* @see #getId()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/SimpleList.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/SimpleList.java
index a29c7078ca..c520924592 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/SimpleList.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/SimpleList.java
@@ -15,8 +15,8 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Simple List</b></em>'. <!-- end-user-doc -->
- *
- *
+ *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getSimpleList()
* @model
* @generated
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Title.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Title.java
index 0d8e4074a9..3fc6cf404a 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Title.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/Title.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>Title</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -23,7 +23,7 @@ import org.eclipse.emf.ecore.EObject;
* </em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getTitle()
* @model extendedMetaData="kind='simple'"
* @generated
@@ -37,7 +37,7 @@ public interface Title extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Data</em>' attribute.
* @see #setData(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getTitle_Data()
@@ -50,7 +50,7 @@ public interface Title extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.Title#getData
* <em>Data</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Data</em>' attribute.
* @see #getData()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ULink.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ULink.java
index e47be2606a..e421286013 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ULink.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/ULink.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>ULink</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -25,7 +25,7 @@ import org.eclipse.emf.ecore.EObject;
* </em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getULink()
* @model extendedMetaData="kind='simple'"
* @generated
@@ -39,7 +39,7 @@ public interface ULink extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Url</em>' attribute.
* @see #setUrl(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getULink_Url()
@@ -52,7 +52,7 @@ public interface ULink extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.ULink#getUrl <em>Url</em>}
* ' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Url</em>' attribute.
* @see #getUrl()
@@ -68,7 +68,7 @@ public interface ULink extends EObject {
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Data</em>' attribute.
* @see #setData(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getULink_Data()
@@ -81,7 +81,7 @@ public interface ULink extends EObject {
* Sets the value of the '
* {@link org.eclipse.sirius.tests.sample.docbook.ULink#getData
* <em>Data</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @param value
* the new value of the '<em>Data</em>' attribute.
* @see #getData()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/XRef.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/XRef.java
index f6f174079f..2553e8bfee 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/XRef.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/XRef.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc --> A representation of the model object '
* <em><b>XRef</b></em>'. <!-- end-user-doc -->
- *
+ *
* <p>
* The following features are supported:
* <ul>
@@ -23,7 +23,7 @@ import org.eclipse.emf.ecore.EObject;
* Linkend</em>}</li>
* </ul>
* </p>
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getXRef()
* @model
* @generated
@@ -37,7 +37,7 @@ public interface XRef extends EObject {
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- *
+ *
* @return the value of the '<em>Linkend</em>' attribute.
* @see #setLinkend(String)
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#getXRef_Linkend()
@@ -51,7 +51,7 @@ public interface XRef extends EObject {
* {@link org.eclipse.sirius.tests.sample.docbook.XRef#getLinkend
* <em>Linkend</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
- *
+ *
* @param value
* the new value of the '<em>Linkend</em>' attribute.
* @see #getLinkend()
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AbstractSectImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AbstractSectImpl.java
index 41ef04f9da..6d83538a84 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AbstractSectImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AbstractSectImpl.java
@@ -40,14 +40,14 @@ import org.eclipse.sirius.tests.sample.docbook.Title;
* <em>Para</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSect {
/**
* The cached value of the '{@link #getTitle() <em>Title</em>}' containment
* reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getTitle()
* @generated
* @ordered
@@ -57,7 +57,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* The cached value of the '{@link #getPara() <em>Para</em>}' containment
* reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getPara()
* @generated
* @ordered
@@ -66,7 +66,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected AbstractSectImpl() {
@@ -75,7 +75,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -85,16 +85,17 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Title getTitle() {
return title;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
public NotificationChain basicSetTitle(Title newTitle, NotificationChain msgs) {
@@ -102,38 +103,45 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
title = newTitle;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DocbookPackage.ABSTRACT_SECT__TITLE, oldTitle, newTitle);
- if (msgs == null)
+ if (msgs == null) {
msgs = notification;
- else
+ } else {
msgs.add(notification);
+ }
}
return msgs;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setTitle(Title newTitle) {
if (newTitle != title) {
NotificationChain msgs = null;
- if (title != null)
- msgs = ((InternalEObject) title).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DocbookPackage.ABSTRACT_SECT__TITLE, null, msgs);
- if (newTitle != null)
- msgs = ((InternalEObject) newTitle).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DocbookPackage.ABSTRACT_SECT__TITLE, null, msgs);
+ if (title != null) {
+ msgs = ((InternalEObject) title).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DocbookPackage.ABSTRACT_SECT__TITLE, null, msgs);
+ }
+ if (newTitle != null) {
+ msgs = ((InternalEObject) newTitle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DocbookPackage.ABSTRACT_SECT__TITLE, null, msgs);
+ }
msgs = basicSetTitle(newTitle, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.ABSTRACT_SECT__TITLE, newTitle, newTitle));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<Para> getPara() {
if (para == null) {
para = new EObjectContainmentEList<Para>(Para.class, this, DocbookPackage.ABSTRACT_SECT__PARA);
@@ -143,7 +151,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -159,7 +167,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -175,7 +183,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -195,7 +203,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -213,7 +221,7 @@ public abstract class AbstractSectImpl extends EObjectImpl implements AbstractSe
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AuthorImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AuthorImpl.java
index fa429363de..d9cf70570c 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AuthorImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/AuthorImpl.java
@@ -33,14 +33,14 @@ import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
* <em>Address</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class AuthorImpl extends EObjectImpl implements Author {
/**
* The default value of the '{@link #getEmail() <em>Email</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getEmail()
* @generated
* @ordered
@@ -50,17 +50,17 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* The cached value of the '{@link #getEmail() <em>Email</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getEmail()
* @generated
* @ordered
*/
- protected String email = EMAIL_EDEFAULT;
+ protected String email = AuthorImpl.EMAIL_EDEFAULT;
/**
* The default value of the '{@link #getPersonname() <em>Personname</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getPersonname()
* @generated
* @ordered
@@ -70,17 +70,17 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* The cached value of the '{@link #getPersonname() <em>Personname</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getPersonname()
* @generated
* @ordered
*/
- protected String personname = PERSONNAME_EDEFAULT;
+ protected String personname = AuthorImpl.PERSONNAME_EDEFAULT;
/**
* The default value of the '{@link #getAddress() <em>Address</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getAddress()
* @generated
* @ordered
@@ -90,16 +90,16 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* The cached value of the '{@link #getAddress() <em>Address</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getAddress()
* @generated
* @ordered
*/
- protected String address = ADDRESS_EDEFAULT;
+ protected String address = AuthorImpl.ADDRESS_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected AuthorImpl() {
@@ -108,7 +108,7 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -118,70 +118,79 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getEmail() {
return email;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setEmail(String newEmail) {
String oldEmail = email;
email = newEmail;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.AUTHOR__EMAIL, oldEmail, email));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getPersonname() {
return personname;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setPersonname(String newPersonname) {
String oldPersonname = personname;
personname = newPersonname;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.AUTHOR__PERSONNAME, oldPersonname, personname));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getAddress() {
return address;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setAddress(String newAddress) {
String oldAddress = address;
address = newAddress;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.AUTHOR__ADDRESS, oldAddress, address));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -199,7 +208,7 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -220,20 +229,20 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.AUTHOR__EMAIL:
- setEmail(EMAIL_EDEFAULT);
+ setEmail(AuthorImpl.EMAIL_EDEFAULT);
return;
case DocbookPackage.AUTHOR__PERSONNAME:
- setPersonname(PERSONNAME_EDEFAULT);
+ setPersonname(AuthorImpl.PERSONNAME_EDEFAULT);
return;
case DocbookPackage.AUTHOR__ADDRESS:
- setAddress(ADDRESS_EDEFAULT);
+ setAddress(AuthorImpl.ADDRESS_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -241,31 +250,32 @@ public class AuthorImpl extends EObjectImpl implements Author {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.AUTHOR__EMAIL:
- return EMAIL_EDEFAULT == null ? email != null : !EMAIL_EDEFAULT.equals(email);
+ return AuthorImpl.EMAIL_EDEFAULT == null ? email != null : !AuthorImpl.EMAIL_EDEFAULT.equals(email);
case DocbookPackage.AUTHOR__PERSONNAME:
- return PERSONNAME_EDEFAULT == null ? personname != null : !PERSONNAME_EDEFAULT.equals(personname);
+ return AuthorImpl.PERSONNAME_EDEFAULT == null ? personname != null : !AuthorImpl.PERSONNAME_EDEFAULT.equals(personname);
case DocbookPackage.AUTHOR__ADDRESS:
- return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
+ return AuthorImpl.ADDRESS_EDEFAULT == null ? address != null : !AuthorImpl.ADDRESS_EDEFAULT.equals(address);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (email: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/BookImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/BookImpl.java
index fcf3493534..f1defc9138 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/BookImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/BookImpl.java
@@ -44,14 +44,14 @@ import org.eclipse.sirius.tests.sample.docbook.Info;
* <em>Version</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class BookImpl extends EObjectImpl implements Book {
/**
* The cached value of the '{@link #getBookinfo() <em>Bookinfo</em>}'
* containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getBookinfo()
* @generated
* @ordered
@@ -61,7 +61,7 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* The cached value of the '{@link #getChapter() <em>Chapter</em>}'
* containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getChapter()
* @generated
* @ordered
@@ -71,7 +71,7 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
@@ -81,17 +81,17 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
*/
- protected String id = ID_EDEFAULT;
+ protected String id = BookImpl.ID_EDEFAULT;
/**
* The default value of the '{@link #getLang() <em>Lang</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getLang()
* @generated
* @ordered
@@ -101,17 +101,17 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* The cached value of the '{@link #getLang() <em>Lang</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getLang()
* @generated
* @ordered
*/
- protected String lang = LANG_EDEFAULT;
+ protected String lang = BookImpl.LANG_EDEFAULT;
/**
* The default value of the '{@link #getVersion() <em>Version</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getVersion()
* @generated
* @ordered
@@ -121,16 +121,16 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* The cached value of the '{@link #getVersion() <em>Version</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getVersion()
* @generated
* @ordered
*/
- protected String version = VERSION_EDEFAULT;
+ protected String version = BookImpl.VERSION_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected BookImpl() {
@@ -139,7 +139,7 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -149,16 +149,17 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Info getBookinfo() {
return bookinfo;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
public NotificationChain basicSetBookinfo(Info newBookinfo, NotificationChain msgs) {
@@ -166,38 +167,45 @@ public class BookImpl extends EObjectImpl implements Book {
bookinfo = newBookinfo;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DocbookPackage.BOOK__BOOKINFO, oldBookinfo, newBookinfo);
- if (msgs == null)
+ if (msgs == null) {
msgs = notification;
- else
+ } else {
msgs.add(notification);
+ }
}
return msgs;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setBookinfo(Info newBookinfo) {
if (newBookinfo != bookinfo) {
NotificationChain msgs = null;
- if (bookinfo != null)
- msgs = ((InternalEObject) bookinfo).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DocbookPackage.BOOK__BOOKINFO, null, msgs);
- if (newBookinfo != null)
- msgs = ((InternalEObject) newBookinfo).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DocbookPackage.BOOK__BOOKINFO, null, msgs);
+ if (bookinfo != null) {
+ msgs = ((InternalEObject) bookinfo).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DocbookPackage.BOOK__BOOKINFO, null, msgs);
+ }
+ if (newBookinfo != null) {
+ msgs = ((InternalEObject) newBookinfo).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DocbookPackage.BOOK__BOOKINFO, null, msgs);
+ }
msgs = basicSetBookinfo(newBookinfo, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.BOOK__BOOKINFO, newBookinfo, newBookinfo));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<Chapter> getChapter() {
if (chapter == null) {
chapter = new EObjectContainmentEList<Chapter>(Chapter.class, this, DocbookPackage.BOOK__CHAPTER);
@@ -207,70 +215,79 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getId() {
return id;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.BOOK__ID, oldId, id));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getLang() {
return lang;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setLang(String newLang) {
String oldLang = lang;
lang = newLang;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.BOOK__LANG, oldLang, lang));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getVersion() {
return version;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setVersion(String newVersion) {
String oldVersion = version;
version = newVersion;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.BOOK__VERSION, oldVersion, version));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -286,7 +303,7 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -308,7 +325,7 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -337,7 +354,7 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -350,13 +367,13 @@ public class BookImpl extends EObjectImpl implements Book {
getChapter().clear();
return;
case DocbookPackage.BOOK__ID:
- setId(ID_EDEFAULT);
+ setId(BookImpl.ID_EDEFAULT);
return;
case DocbookPackage.BOOK__LANG:
- setLang(LANG_EDEFAULT);
+ setLang(BookImpl.LANG_EDEFAULT);
return;
case DocbookPackage.BOOK__VERSION:
- setVersion(VERSION_EDEFAULT);
+ setVersion(BookImpl.VERSION_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -364,7 +381,7 @@ public class BookImpl extends EObjectImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -375,24 +392,25 @@ public class BookImpl extends EObjectImpl implements Book {
case DocbookPackage.BOOK__CHAPTER:
return chapter != null && !chapter.isEmpty();
case DocbookPackage.BOOK__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ return BookImpl.ID_EDEFAULT == null ? id != null : !BookImpl.ID_EDEFAULT.equals(id);
case DocbookPackage.BOOK__LANG:
- return LANG_EDEFAULT == null ? lang != null : !LANG_EDEFAULT.equals(lang);
+ return BookImpl.LANG_EDEFAULT == null ? lang != null : !BookImpl.LANG_EDEFAULT.equals(lang);
case DocbookPackage.BOOK__VERSION:
- return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
+ return BookImpl.VERSION_EDEFAULT == null ? version != null : !BookImpl.VERSION_EDEFAULT.equals(version);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ChapterImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ChapterImpl.java
index 5b46bce74c..a669db34af 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ChapterImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ChapterImpl.java
@@ -43,14 +43,14 @@ import org.eclipse.sirius.tests.sample.docbook.Title;
* <em>Id</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* The cached value of the '{@link #getTitle() <em>Title</em>}' containment
* reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getTitle()
* @generated
* @ordered
@@ -60,7 +60,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* The cached value of the '{@link #getPara() <em>Para</em>}' containment
* reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getPara()
* @generated
* @ordered
@@ -70,7 +70,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* The cached value of the '{@link #getSect1() <em>Sect1</em>}' containment
* reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getSect1()
* @generated
* @ordered
@@ -80,7 +80,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
@@ -90,16 +90,16 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
*/
- protected String id = ID_EDEFAULT;
+ protected String id = ChapterImpl.ID_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected ChapterImpl() {
@@ -108,7 +108,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -118,16 +118,17 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Title getTitle() {
return title;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
public NotificationChain basicSetTitle(Title newTitle, NotificationChain msgs) {
@@ -135,38 +136,45 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
title = newTitle;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DocbookPackage.CHAPTER__TITLE, oldTitle, newTitle);
- if (msgs == null)
+ if (msgs == null) {
msgs = notification;
- else
+ } else {
msgs.add(notification);
+ }
}
return msgs;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setTitle(Title newTitle) {
if (newTitle != title) {
NotificationChain msgs = null;
- if (title != null)
- msgs = ((InternalEObject) title).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DocbookPackage.CHAPTER__TITLE, null, msgs);
- if (newTitle != null)
- msgs = ((InternalEObject) newTitle).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DocbookPackage.CHAPTER__TITLE, null, msgs);
+ if (title != null) {
+ msgs = ((InternalEObject) title).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DocbookPackage.CHAPTER__TITLE, null, msgs);
+ }
+ if (newTitle != null) {
+ msgs = ((InternalEObject) newTitle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DocbookPackage.CHAPTER__TITLE, null, msgs);
+ }
msgs = basicSetTitle(newTitle, msgs);
- if (msgs != null)
+ if (msgs != null) {
msgs.dispatch();
- } else if (eNotificationRequired())
+ }
+ } else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.CHAPTER__TITLE, newTitle, newTitle));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<Para> getPara() {
if (para == null) {
para = new EObjectContainmentEList<Para>(Para.class, this, DocbookPackage.CHAPTER__PARA);
@@ -176,9 +184,10 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<Sect1> getSect1() {
if (sect1 == null) {
sect1 = new EObjectContainmentEList<Sect1>(Sect1.class, this, DocbookPackage.CHAPTER__SECT1);
@@ -188,28 +197,31 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getId() {
return id;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.CHAPTER__ID, oldId, id));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -227,7 +239,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -247,7 +259,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -274,7 +286,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -290,7 +302,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
getSect1().clear();
return;
case DocbookPackage.CHAPTER__ID:
- setId(ID_EDEFAULT);
+ setId(ChapterImpl.ID_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -298,7 +310,7 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -311,20 +323,21 @@ public class ChapterImpl extends EObjectImpl implements Chapter {
case DocbookPackage.CHAPTER__SECT1:
return sect1 != null && !sect1.isEmpty();
case DocbookPackage.CHAPTER__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ return ChapterImpl.ID_EDEFAULT == null ? id != null : !ChapterImpl.ID_EDEFAULT.equals(id);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookFactoryImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookFactoryImpl.java
index 780f3284a7..c2b1c4b5d0 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookFactoryImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookFactoryImpl.java
@@ -39,14 +39,14 @@ import org.eclipse.sirius.tests.sample.docbook.XRef;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
* end-user-doc -->
- *
+ *
* @generated
*/
public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* Creates the default factory implementation. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
public static DocbookFactory init() {
@@ -64,7 +64,7 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* Creates an instance of the factory. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
public DocbookFactoryImpl() {
@@ -73,7 +73,7 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -122,9 +122,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Book createBook() {
BookImpl book = new BookImpl();
return book;
@@ -132,9 +133,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Info createInfo() {
InfoImpl info = new InfoImpl();
return info;
@@ -142,9 +144,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Author createAuthor() {
AuthorImpl author = new AuthorImpl();
return author;
@@ -152,9 +155,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Chapter createChapter() {
ChapterImpl chapter = new ChapterImpl();
return chapter;
@@ -162,9 +166,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Title createTitle() {
TitleImpl title = new TitleImpl();
return title;
@@ -172,9 +177,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Para createPara() {
ParaImpl para = new ParaImpl();
return para;
@@ -182,9 +188,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public SimpleList createSimpleList() {
SimpleListImpl simpleList = new SimpleListImpl();
return simpleList;
@@ -192,9 +199,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public ItemizedList createItemizedList() {
ItemizedListImpl itemizedList = new ItemizedListImpl();
return itemizedList;
@@ -202,9 +210,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public OrderedList createOrderedList() {
OrderedListImpl orderedList = new OrderedListImpl();
return orderedList;
@@ -212,9 +221,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Sect1 createSect1() {
Sect1Impl sect1 = new Sect1Impl();
return sect1;
@@ -222,9 +232,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Sect2 createSect2() {
Sect2Impl sect2 = new Sect2Impl();
return sect2;
@@ -232,9 +243,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Emphasis createEmphasis() {
EmphasisImpl emphasis = new EmphasisImpl();
return emphasis;
@@ -242,9 +254,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public ULink createULink() {
ULinkImpl uLink = new ULinkImpl();
return uLink;
@@ -252,9 +265,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Link createLink() {
LinkImpl link = new LinkImpl();
return link;
@@ -262,9 +276,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public XRef createXRef() {
XRefImpl xRef = new XRefImpl();
return xRef;
@@ -272,9 +287,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Example createExample() {
ExampleImpl example = new ExampleImpl();
return example;
@@ -282,9 +298,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public Sect3 createSect3() {
Sect3Impl sect3 = new Sect3Impl();
return sect3;
@@ -292,9 +309,10 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public ListItem createListItem() {
ListItemImpl listItem = new ListItemImpl();
return listItem;
@@ -302,16 +320,17 @@ public class DocbookFactoryImpl extends EFactoryImpl implements DocbookFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public DocbookPackage getDocbookPackage() {
return (DocbookPackage) getEPackage();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @deprecated
* @generated
*/
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookPackageImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookPackageImpl.java
index bcbe13b732..1e14026102 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookPackageImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/DocbookPackageImpl.java
@@ -40,139 +40,139 @@ import org.eclipse.sirius.tests.sample.docbook.XRef;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
* end-user-doc -->
- *
+ *
* @generated
*/
public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass bookEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass infoEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass authorEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass chapterEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass titleEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass paraEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass simpleListEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass itemizedListEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass orderedListEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass sect1EClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass abstractSectEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass sect2EClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass emphasisEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass uLinkEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass linkEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass xRefEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass exampleEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass sect3EClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass listItemEClass = null;
@@ -186,19 +186,19 @@ public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
* method {@link #init init()}, which also performs initialization of the
* package, or returns the registered package, if one already exists. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage#eNS_URI
* @see #init()
* @generated
*/
private DocbookPackageImpl() {
- super(eNS_URI, DocbookFactory.eINSTANCE);
+ super(DocbookPackage.eNS_URI, DocbookFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private static boolean isInited = false;
@@ -206,27 +206,28 @@ public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
/**
* Creates, registers, and initializes the <b>Package</b> for this model,
* and for any others upon which it depends.
- *
+ *
* <p>
* This method is used to initialize {@link DocbookPackage#eINSTANCE} when
* that field is accessed. Clients should not invoke it directly. Instead,
* they should simply access that field to obtain the package. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static DocbookPackage init() {
- if (isInited)
+ if (DocbookPackageImpl.isInited) {
return (DocbookPackage) EPackage.Registry.INSTANCE.getEPackage(DocbookPackage.eNS_URI);
+ }
// Obtain or create and register package
- DocbookPackageImpl theDocbookPackage = (DocbookPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DocbookPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
- : new DocbookPackageImpl());
+ DocbookPackageImpl theDocbookPackage = (DocbookPackageImpl) (EPackage.Registry.INSTANCE.get(DocbookPackage.eNS_URI) instanceof DocbookPackageImpl ? EPackage.Registry.INSTANCE
+ .get(DocbookPackage.eNS_URI) : new DocbookPackageImpl());
- isInited = true;
+ DocbookPackageImpl.isInited = true;
// Create package meta-data objects
theDocbookPackage.createPackageContents();
@@ -244,466 +245,517 @@ public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getBook() {
return bookEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getBook_Bookinfo() {
return (EReference) bookEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getBook_Chapter() {
return (EReference) bookEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getBook_Id() {
return (EAttribute) bookEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getBook_Lang() {
return (EAttribute) bookEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getBook_Version() {
return (EAttribute) bookEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getInfo() {
return infoEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getInfo_Author() {
return (EReference) infoEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getInfo_Date() {
return (EAttribute) infoEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getInfo_Pubdate() {
return (EAttribute) infoEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getAuthor() {
return authorEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getAuthor_Email() {
return (EAttribute) authorEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getAuthor_Personname() {
return (EAttribute) authorEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getAuthor_Address() {
return (EAttribute) authorEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getChapter() {
return chapterEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getChapter_Title() {
return (EReference) chapterEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getChapter_Para() {
return (EReference) chapterEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getChapter_Sect1() {
return (EReference) chapterEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getChapter_Id() {
return (EAttribute) chapterEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getTitle() {
return titleEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getTitle_Data() {
return (EAttribute) titleEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getPara() {
return paraEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getPara_Data() {
return (EAttribute) paraEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getSimpleList() {
return simpleListEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getItemizedList() {
return itemizedListEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getItemizedList_Mark() {
return (EAttribute) itemizedListEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getItemizedList_Listitem() {
return (EReference) itemizedListEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getOrderedList() {
return orderedListEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getOrderedList_Numeration() {
return (EAttribute) orderedListEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getSect1() {
return sect1EClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getSect1_Id() {
return (EAttribute) sect1EClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getSect1_Sect2() {
return (EReference) sect1EClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getAbstractSect() {
return abstractSectEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getAbstractSect_Title() {
return (EReference) abstractSectEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getAbstractSect_Para() {
return (EReference) abstractSectEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getSect2() {
return sect2EClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getSect2_Id() {
return (EAttribute) sect2EClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EReference getSect2_Sect3() {
return (EReference) sect2EClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getEmphasis() {
return emphasisEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getEmphasis_Remap() {
return (EAttribute) emphasisEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getULink() {
return uLinkEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getULink_Url() {
return (EAttribute) uLinkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getULink_Data() {
return (EAttribute) uLinkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getLink() {
return linkEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getXRef() {
return xRefEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getXRef_Linkend() {
return (EAttribute) xRefEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getExample() {
return exampleEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getSect3() {
return sect3EClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EAttribute getSect3_Id() {
return (EAttribute) sect3EClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EClass getListItem() {
return listItemEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public DocbookFactory getDocbookFactory() {
return (DocbookFactory) getEFactoryInstance();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private boolean isCreated = false;
@@ -712,88 +764,89 @@ public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
* Creates the meta-model objects for the package. This method is guarded to
* have no affect on any invocation but its first. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public void createPackageContents() {
- if (isCreated)
+ if (isCreated) {
return;
+ }
isCreated = true;
// Create classes and their features
- bookEClass = createEClass(BOOK);
- createEReference(bookEClass, BOOK__BOOKINFO);
- createEReference(bookEClass, BOOK__CHAPTER);
- createEAttribute(bookEClass, BOOK__ID);
- createEAttribute(bookEClass, BOOK__LANG);
- createEAttribute(bookEClass, BOOK__VERSION);
+ bookEClass = createEClass(DocbookPackage.BOOK);
+ createEReference(bookEClass, DocbookPackage.BOOK__BOOKINFO);
+ createEReference(bookEClass, DocbookPackage.BOOK__CHAPTER);
+ createEAttribute(bookEClass, DocbookPackage.BOOK__ID);
+ createEAttribute(bookEClass, DocbookPackage.BOOK__LANG);
+ createEAttribute(bookEClass, DocbookPackage.BOOK__VERSION);
- infoEClass = createEClass(INFO);
- createEReference(infoEClass, INFO__AUTHOR);
- createEAttribute(infoEClass, INFO__DATE);
- createEAttribute(infoEClass, INFO__PUBDATE);
+ infoEClass = createEClass(DocbookPackage.INFO);
+ createEReference(infoEClass, DocbookPackage.INFO__AUTHOR);
+ createEAttribute(infoEClass, DocbookPackage.INFO__DATE);
+ createEAttribute(infoEClass, DocbookPackage.INFO__PUBDATE);
- authorEClass = createEClass(AUTHOR);
- createEAttribute(authorEClass, AUTHOR__EMAIL);
- createEAttribute(authorEClass, AUTHOR__PERSONNAME);
- createEAttribute(authorEClass, AUTHOR__ADDRESS);
+ authorEClass = createEClass(DocbookPackage.AUTHOR);
+ createEAttribute(authorEClass, DocbookPackage.AUTHOR__EMAIL);
+ createEAttribute(authorEClass, DocbookPackage.AUTHOR__PERSONNAME);
+ createEAttribute(authorEClass, DocbookPackage.AUTHOR__ADDRESS);
- chapterEClass = createEClass(CHAPTER);
- createEReference(chapterEClass, CHAPTER__TITLE);
- createEReference(chapterEClass, CHAPTER__PARA);
- createEReference(chapterEClass, CHAPTER__SECT1);
- createEAttribute(chapterEClass, CHAPTER__ID);
+ chapterEClass = createEClass(DocbookPackage.CHAPTER);
+ createEReference(chapterEClass, DocbookPackage.CHAPTER__TITLE);
+ createEReference(chapterEClass, DocbookPackage.CHAPTER__PARA);
+ createEReference(chapterEClass, DocbookPackage.CHAPTER__SECT1);
+ createEAttribute(chapterEClass, DocbookPackage.CHAPTER__ID);
- titleEClass = createEClass(TITLE);
- createEAttribute(titleEClass, TITLE__DATA);
+ titleEClass = createEClass(DocbookPackage.TITLE);
+ createEAttribute(titleEClass, DocbookPackage.TITLE__DATA);
- paraEClass = createEClass(PARA);
- createEAttribute(paraEClass, PARA__DATA);
+ paraEClass = createEClass(DocbookPackage.PARA);
+ createEAttribute(paraEClass, DocbookPackage.PARA__DATA);
- simpleListEClass = createEClass(SIMPLE_LIST);
+ simpleListEClass = createEClass(DocbookPackage.SIMPLE_LIST);
- itemizedListEClass = createEClass(ITEMIZED_LIST);
- createEAttribute(itemizedListEClass, ITEMIZED_LIST__MARK);
- createEReference(itemizedListEClass, ITEMIZED_LIST__LISTITEM);
+ itemizedListEClass = createEClass(DocbookPackage.ITEMIZED_LIST);
+ createEAttribute(itemizedListEClass, DocbookPackage.ITEMIZED_LIST__MARK);
+ createEReference(itemizedListEClass, DocbookPackage.ITEMIZED_LIST__LISTITEM);
- orderedListEClass = createEClass(ORDERED_LIST);
- createEAttribute(orderedListEClass, ORDERED_LIST__NUMERATION);
+ orderedListEClass = createEClass(DocbookPackage.ORDERED_LIST);
+ createEAttribute(orderedListEClass, DocbookPackage.ORDERED_LIST__NUMERATION);
- sect1EClass = createEClass(SECT1);
- createEAttribute(sect1EClass, SECT1__ID);
- createEReference(sect1EClass, SECT1__SECT2);
+ sect1EClass = createEClass(DocbookPackage.SECT1);
+ createEAttribute(sect1EClass, DocbookPackage.SECT1__ID);
+ createEReference(sect1EClass, DocbookPackage.SECT1__SECT2);
- abstractSectEClass = createEClass(ABSTRACT_SECT);
- createEReference(abstractSectEClass, ABSTRACT_SECT__TITLE);
- createEReference(abstractSectEClass, ABSTRACT_SECT__PARA);
+ abstractSectEClass = createEClass(DocbookPackage.ABSTRACT_SECT);
+ createEReference(abstractSectEClass, DocbookPackage.ABSTRACT_SECT__TITLE);
+ createEReference(abstractSectEClass, DocbookPackage.ABSTRACT_SECT__PARA);
- sect2EClass = createEClass(SECT2);
- createEAttribute(sect2EClass, SECT2__ID);
- createEReference(sect2EClass, SECT2__SECT3);
+ sect2EClass = createEClass(DocbookPackage.SECT2);
+ createEAttribute(sect2EClass, DocbookPackage.SECT2__ID);
+ createEReference(sect2EClass, DocbookPackage.SECT2__SECT3);
- emphasisEClass = createEClass(EMPHASIS);
- createEAttribute(emphasisEClass, EMPHASIS__REMAP);
+ emphasisEClass = createEClass(DocbookPackage.EMPHASIS);
+ createEAttribute(emphasisEClass, DocbookPackage.EMPHASIS__REMAP);
- uLinkEClass = createEClass(ULINK);
- createEAttribute(uLinkEClass, ULINK__URL);
- createEAttribute(uLinkEClass, ULINK__DATA);
+ uLinkEClass = createEClass(DocbookPackage.ULINK);
+ createEAttribute(uLinkEClass, DocbookPackage.ULINK__URL);
+ createEAttribute(uLinkEClass, DocbookPackage.ULINK__DATA);
- linkEClass = createEClass(LINK);
+ linkEClass = createEClass(DocbookPackage.LINK);
- xRefEClass = createEClass(XREF);
- createEAttribute(xRefEClass, XREF__LINKEND);
+ xRefEClass = createEClass(DocbookPackage.XREF);
+ createEAttribute(xRefEClass, DocbookPackage.XREF__LINKEND);
- exampleEClass = createEClass(EXAMPLE);
+ exampleEClass = createEClass(DocbookPackage.EXAMPLE);
- sect3EClass = createEClass(SECT3);
- createEAttribute(sect3EClass, SECT3__ID);
+ sect3EClass = createEClass(DocbookPackage.SECT3);
+ createEAttribute(sect3EClass, DocbookPackage.SECT3__ID);
- listItemEClass = createEClass(LIST_ITEM);
+ listItemEClass = createEClass(DocbookPackage.LIST_ITEM);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
private boolean isInitialized = false;
@@ -802,18 +855,19 @@ public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
public void initializePackageContents() {
- if (isInitialized)
+ if (isInitialized) {
return;
+ }
isInitialized = true;
// Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
+ setName(DocbookPackage.eNAME);
+ setNsPrefix(DocbookPackage.eNS_PREFIX);
+ setNsURI(DocbookPackage.eNS_URI);
// Create type parameters
@@ -826,104 +880,109 @@ public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
sect3EClass.getESuperTypes().add(this.getAbstractSect());
// Initialize classes and features; add operations and parameters
- initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getBook_Bookinfo(), this.getInfo(), null, "bookinfo", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getBook_Chapter(), this.getChapter(), null, "chapter", null, 0, -1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Id(), ecorePackage.getEString(), "id", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
- initEAttribute(getBook_Version(), ecorePackage.getEString(), "version", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(infoEClass, Info.class, "Info", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getInfo_Author(), this.getAuthor(), null, "author", null, 0, -1, Info.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getInfo_Date(), ecorePackage.getEString(), "date", null, 0, 1, Info.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
- initEAttribute(getInfo_Pubdate(), ecorePackage.getEString(), "pubdate", null, 0, 1, Info.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(authorEClass, Author.class, "Author", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getAuthor_Email(), ecorePackage.getEString(), "email", null, 0, 1, Author.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
- initEAttribute(getAuthor_Personname(), ecorePackage.getEString(), "personname", null, 0, 1, Author.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEAttribute(getAuthor_Address(), ecorePackage.getEString(), "address", null, 0, 1, Author.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(chapterEClass, Chapter.class, "Chapter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getChapter_Title(), this.getTitle(), null, "title", null, 0, 1, Chapter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getChapter_Para(), this.getPara(), null, "para", null, 0, -1, Chapter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getChapter_Sect1(), this.getSect1(), null, "sect1", null, 0, -1, Chapter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getChapter_Id(), ecorePackage.getEString(), "id", null, 0, 1, Chapter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(titleEClass, Title.class, "Title", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getTitle_Data(), ecorePackage.getEString(), "data", null, 0, 1, Title.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(paraEClass, Para.class, "Para", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPara_Data(), ecorePackage.getEString(), "data", null, 0, 1, Para.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(simpleListEClass, SimpleList.class, "SimpleList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(itemizedListEClass, ItemizedList.class, "ItemizedList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getItemizedList_Mark(), ecorePackage.getEString(), "mark", null, 0, 1, ItemizedList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
- !IS_DERIVED, IS_ORDERED);
- initEReference(getItemizedList_Listitem(), this.getListItem(), null, "listitem", null, 0, -1, ItemizedList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
- !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(orderedListEClass, OrderedList.class, "OrderedList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getOrderedList_Numeration(), ecorePackage.getEString(), "numeration", null, 0, 1, OrderedList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(sect1EClass, Sect1.class, "Sect1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getSect1_Id(), ecorePackage.getEString(), "id", null, 0, 1, Sect1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getSect1_Sect2(), this.getSect2(), null, "sect2", null, 0, -1, Sect1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(abstractSectEClass, AbstractSect.class, "AbstractSect", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getAbstractSect_Title(), this.getTitle(), null, "title", null, 0, 1, AbstractSect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAbstractSect_Para(), this.getPara(), null, "para", null, 0, -1, AbstractSect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
- !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(sect2EClass, Sect2.class, "Sect2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getSect2_Id(), ecorePackage.getEString(), "id", null, 0, 1, Sect2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getSect2_Sect3(), this.getSect3(), null, "sect3", null, 0, -1, Sect2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
- IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(emphasisEClass, Emphasis.class, "Emphasis", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEmphasis_Remap(), ecorePackage.getEString(), "remap", null, 0, 1, Emphasis.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(uLinkEClass, ULink.class, "ULink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getULink_Url(), ecorePackage.getEString(), "url", null, 0, 1, ULink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
- initEAttribute(getULink_Data(), ecorePackage.getEString(), "data", null, 0, 1, ULink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(linkEClass, Link.class, "Link", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(xRefEClass, XRef.class, "XRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getXRef_Linkend(), ecorePackage.getEString(), "linkend", null, 0, 1, XRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
-
- initEClass(exampleEClass, Example.class, "Example", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(sect3EClass, Sect3.class, "Sect3", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getSect3_Id(), ecorePackage.getEString(), "id", null, 0, 1, Sect3.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(listItemEClass, ListItem.class, "ListItem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEClass(bookEClass, Book.class, "Book", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getBook_Bookinfo(), this.getInfo(), null, "bookinfo", null, 0, 1, Book.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getBook_Chapter(), this.getChapter(), null, "chapter", null, 0, -1, Book.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getBook_Id(), ecorePackage.getEString(), "id", null, 0, 1, Book.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getBook_Lang(), ecorePackage.getEString(), "lang", null, 0, 1, Book.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getBook_Version(), ecorePackage.getEString(), "version", null, 0, 1, Book.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(infoEClass, Info.class, "Info", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getInfo_Author(), this.getAuthor(), null, "author", null, 0, -1, Info.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getInfo_Date(), ecorePackage.getEString(), "date", null, 0, 1, Info.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getInfo_Pubdate(), ecorePackage.getEString(), "pubdate", null, 0, 1, Info.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(authorEClass, Author.class, "Author", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAuthor_Email(), ecorePackage.getEString(), "email", null, 0, 1, Author.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getAuthor_Personname(), ecorePackage.getEString(), "personname", null, 0, 1, Author.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getAuthor_Address(), ecorePackage.getEString(), "address", null, 0, 1, Author.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(chapterEClass, Chapter.class, "Chapter", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getChapter_Title(), this.getTitle(), null, "title", null, 0, 1, Chapter.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getChapter_Para(), this.getPara(), null, "para", null, 0, -1, Chapter.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getChapter_Sect1(), this.getSect1(), null, "sect1", null, 0, -1, Chapter.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getChapter_Id(), ecorePackage.getEString(), "id", null, 0, 1, Chapter.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(titleEClass, Title.class, "Title", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getTitle_Data(), ecorePackage.getEString(), "data", null, 0, 1, Title.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(paraEClass, Para.class, "Para", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPara_Data(), ecorePackage.getEString(), "data", null, 0, 1, Para.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(simpleListEClass, SimpleList.class, "SimpleList", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(itemizedListEClass, ItemizedList.class, "ItemizedList", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getItemizedList_Mark(), ecorePackage.getEString(), "mark", null, 0, 1, ItemizedList.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getItemizedList_Listitem(), this.getListItem(), null, "listitem", null, 0, -1, ItemizedList.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE,
+ EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED,
+ EPackageImpl.IS_ORDERED);
+
+ initEClass(orderedListEClass, OrderedList.class, "OrderedList", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getOrderedList_Numeration(), ecorePackage.getEString(), "numeration", null, 0, 1, OrderedList.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE,
+ EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(sect1EClass, Sect1.class, "Sect1", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSect1_Id(), ecorePackage.getEString(), "id", null, 0, 1, Sect1.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getSect1_Sect2(), this.getSect2(), null, "sect2", null, 0, -1, Sect1.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(abstractSectEClass, AbstractSect.class, "AbstractSect", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAbstractSect_Title(), this.getTitle(), null, "title", null, 0, 1, AbstractSect.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getAbstractSect_Para(), this.getPara(), null, "para", null, 0, -1, AbstractSect.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(sect2EClass, Sect2.class, "Sect2", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSect2_Id(), ecorePackage.getEString(), "id", null, 0, 1, Sect2.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getSect2_Sect3(), this.getSect3(), null, "sect3", null, 0, -1, Sect2.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(emphasisEClass, Emphasis.class, "Emphasis", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEmphasis_Remap(), ecorePackage.getEString(), "remap", null, 0, 1, Emphasis.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(uLinkEClass, ULink.class, "ULink", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getULink_Url(), ecorePackage.getEString(), "url", null, 0, 1, ULink.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEAttribute(getULink_Data(), ecorePackage.getEString(), "data", null, 0, 1, ULink.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(linkEClass, Link.class, "Link", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(xRefEClass, XRef.class, "XRef", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getXRef_Linkend(), ecorePackage.getEString(), "linkend", null, 0, 1, XRef.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(exampleEClass, Example.class, "Example", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(sect3EClass, Sect3.class, "Sect3", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSect3_Id(), ecorePackage.getEString(), "id", null, 0, 1, Sect3.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+
+ initEClass(listItemEClass, ListItem.class, "ListItem", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
// Create resource
- createResource(eNS_URI);
+ createResource(DocbookPackage.eNS_URI);
// Create annotations
// http:///org/eclipse/emf/ecore/util/ExtendedMetaData
@@ -934,7 +993,7 @@ public class DocbookPackageImpl extends EPackageImpl implements DocbookPackage {
* Initializes the annotations for
* <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected void createExtendedMetaDataAnnotations() {
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/EmphasisImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/EmphasisImpl.java
index 50afd4312e..f63eb7a6c3 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/EmphasisImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/EmphasisImpl.java
@@ -28,14 +28,14 @@ import org.eclipse.sirius.tests.sample.docbook.Emphasis;
* <em>Remap</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class EmphasisImpl extends EObjectImpl implements Emphasis {
/**
* The default value of the '{@link #getRemap() <em>Remap</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getRemap()
* @generated
* @ordered
@@ -45,16 +45,16 @@ public class EmphasisImpl extends EObjectImpl implements Emphasis {
/**
* The cached value of the '{@link #getRemap() <em>Remap</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getRemap()
* @generated
* @ordered
*/
- protected String remap = REMAP_EDEFAULT;
+ protected String remap = EmphasisImpl.REMAP_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected EmphasisImpl() {
@@ -63,7 +63,7 @@ public class EmphasisImpl extends EObjectImpl implements Emphasis {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -73,28 +73,31 @@ public class EmphasisImpl extends EObjectImpl implements Emphasis {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getRemap() {
return remap;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setRemap(String newRemap) {
String oldRemap = remap;
remap = newRemap;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.EMPHASIS__REMAP, oldRemap, remap));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -108,7 +111,7 @@ public class EmphasisImpl extends EObjectImpl implements Emphasis {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -123,14 +126,14 @@ public class EmphasisImpl extends EObjectImpl implements Emphasis {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.EMPHASIS__REMAP:
- setRemap(REMAP_EDEFAULT);
+ setRemap(EmphasisImpl.REMAP_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -138,27 +141,28 @@ public class EmphasisImpl extends EObjectImpl implements Emphasis {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.EMPHASIS__REMAP:
- return REMAP_EDEFAULT == null ? remap != null : !REMAP_EDEFAULT.equals(remap);
+ return EmphasisImpl.REMAP_EDEFAULT == null ? remap != null : !EmphasisImpl.REMAP_EDEFAULT.equals(remap);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (remap: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ExampleImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ExampleImpl.java
index e39bc545da..665dfd5533 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ExampleImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ExampleImpl.java
@@ -19,13 +19,13 @@ import org.eclipse.sirius.tests.sample.docbook.Example;
* <em><b>Example</b></em>'. <!-- end-user-doc -->
* <p>
* </p>
- *
+ *
* @generated
*/
public class ExampleImpl extends AbstractSectImpl implements Example {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected ExampleImpl() {
@@ -34,7 +34,7 @@ public class ExampleImpl extends AbstractSectImpl implements Example {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/InfoImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/InfoImpl.java
index 1dc30a8f23..7dee592413 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/InfoImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/InfoImpl.java
@@ -39,14 +39,14 @@ import org.eclipse.sirius.tests.sample.docbook.Info;
* <em>Pubdate</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class InfoImpl extends EObjectImpl implements Info {
/**
* The cached value of the '{@link #getAuthor() <em>Author</em>}'
* containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getAuthor()
* @generated
* @ordered
@@ -56,7 +56,7 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* The default value of the '{@link #getDate() <em>Date</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getDate()
* @generated
* @ordered
@@ -66,17 +66,17 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* The cached value of the '{@link #getDate() <em>Date</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getDate()
* @generated
* @ordered
*/
- protected String date = DATE_EDEFAULT;
+ protected String date = InfoImpl.DATE_EDEFAULT;
/**
* The default value of the '{@link #getPubdate() <em>Pubdate</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getPubdate()
* @generated
* @ordered
@@ -86,16 +86,16 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* The cached value of the '{@link #getPubdate() <em>Pubdate</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getPubdate()
* @generated
* @ordered
*/
- protected String pubdate = PUBDATE_EDEFAULT;
+ protected String pubdate = InfoImpl.PUBDATE_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected InfoImpl() {
@@ -104,7 +104,7 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -114,9 +114,10 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<Author> getAuthor() {
if (author == null) {
author = new EObjectContainmentEList<Author>(Author.class, this, DocbookPackage.INFO__AUTHOR);
@@ -126,49 +127,55 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getDate() {
return date;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setDate(String newDate) {
String oldDate = date;
date = newDate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.INFO__DATE, oldDate, date));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getPubdate() {
return pubdate;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setPubdate(String newPubdate) {
String oldPubdate = pubdate;
pubdate = newPubdate;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.INFO__PUBDATE, oldPubdate, pubdate));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -182,7 +189,7 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -200,7 +207,7 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -223,7 +230,7 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -233,10 +240,10 @@ public class InfoImpl extends EObjectImpl implements Info {
getAuthor().clear();
return;
case DocbookPackage.INFO__DATE:
- setDate(DATE_EDEFAULT);
+ setDate(InfoImpl.DATE_EDEFAULT);
return;
case DocbookPackage.INFO__PUBDATE:
- setPubdate(PUBDATE_EDEFAULT);
+ setPubdate(InfoImpl.PUBDATE_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -244,7 +251,7 @@ public class InfoImpl extends EObjectImpl implements Info {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -253,22 +260,23 @@ public class InfoImpl extends EObjectImpl implements Info {
case DocbookPackage.INFO__AUTHOR:
return author != null && !author.isEmpty();
case DocbookPackage.INFO__DATE:
- return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date);
+ return InfoImpl.DATE_EDEFAULT == null ? date != null : !InfoImpl.DATE_EDEFAULT.equals(date);
case DocbookPackage.INFO__PUBDATE:
- return PUBDATE_EDEFAULT == null ? pubdate != null : !PUBDATE_EDEFAULT.equals(pubdate);
+ return InfoImpl.PUBDATE_EDEFAULT == null ? pubdate != null : !InfoImpl.PUBDATE_EDEFAULT.equals(pubdate);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (date: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ItemizedListImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ItemizedListImpl.java
index aaf25952e0..24c11bf202 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ItemizedListImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ItemizedListImpl.java
@@ -39,14 +39,14 @@ import org.eclipse.sirius.tests.sample.docbook.ListItem;
* <em>Listitem</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* The default value of the '{@link #getMark() <em>Mark</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getMark()
* @generated
* @ordered
@@ -56,17 +56,17 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* The cached value of the '{@link #getMark() <em>Mark</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getMark()
* @generated
* @ordered
*/
- protected String mark = MARK_EDEFAULT;
+ protected String mark = ItemizedListImpl.MARK_EDEFAULT;
/**
* The cached value of the '{@link #getListitem() <em>Listitem</em>}'
* containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getListitem()
* @generated
* @ordered
@@ -75,7 +75,7 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected ItemizedListImpl() {
@@ -84,7 +84,7 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -94,30 +94,34 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getMark() {
return mark;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setMark(String newMark) {
String oldMark = mark;
mark = newMark;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.ITEMIZED_LIST__MARK, oldMark, mark));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<ListItem> getListitem() {
if (listitem == null) {
listitem = new EObjectContainmentEList<ListItem>(ListItem.class, this, DocbookPackage.ITEMIZED_LIST__LISTITEM);
@@ -127,7 +131,7 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -141,7 +145,7 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -157,7 +161,7 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -177,14 +181,14 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.ITEMIZED_LIST__MARK:
- setMark(MARK_EDEFAULT);
+ setMark(ItemizedListImpl.MARK_EDEFAULT);
return;
case DocbookPackage.ITEMIZED_LIST__LISTITEM:
getListitem().clear();
@@ -195,14 +199,14 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.ITEMIZED_LIST__MARK:
- return MARK_EDEFAULT == null ? mark != null : !MARK_EDEFAULT.equals(mark);
+ return ItemizedListImpl.MARK_EDEFAULT == null ? mark != null : !ItemizedListImpl.MARK_EDEFAULT.equals(mark);
case DocbookPackage.ITEMIZED_LIST__LISTITEM:
return listitem != null && !listitem.isEmpty();
}
@@ -211,13 +215,14 @@ public class ItemizedListImpl extends EObjectImpl implements ItemizedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (mark: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/LinkImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/LinkImpl.java
index c5b0a32f26..87d805a8a6 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/LinkImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/LinkImpl.java
@@ -20,13 +20,13 @@ import org.eclipse.sirius.tests.sample.docbook.Link;
* <em><b>Link</b></em>'. <!-- end-user-doc -->
* <p>
* </p>
- *
+ *
* @generated
*/
public class LinkImpl extends EObjectImpl implements Link {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected LinkImpl() {
@@ -35,7 +35,7 @@ public class LinkImpl extends EObjectImpl implements Link {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ListItemImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ListItemImpl.java
index 480bd16483..94a6fb9389 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ListItemImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ListItemImpl.java
@@ -20,13 +20,13 @@ import org.eclipse.sirius.tests.sample.docbook.ListItem;
* <em><b>List Item</b></em>'. <!-- end-user-doc -->
* <p>
* </p>
- *
+ *
* @generated
*/
public class ListItemImpl extends EObjectImpl implements ListItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected ListItemImpl() {
@@ -35,7 +35,7 @@ public class ListItemImpl extends EObjectImpl implements ListItem {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/OrderedListImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/OrderedListImpl.java
index f2d617cd20..1374e6a92c 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/OrderedListImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/OrderedListImpl.java
@@ -28,14 +28,14 @@ import org.eclipse.sirius.tests.sample.docbook.OrderedList;
* <em>Numeration</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class OrderedListImpl extends EObjectImpl implements OrderedList {
/**
* The default value of the '{@link #getNumeration() <em>Numeration</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getNumeration()
* @generated
* @ordered
@@ -45,16 +45,16 @@ public class OrderedListImpl extends EObjectImpl implements OrderedList {
/**
* The cached value of the '{@link #getNumeration() <em>Numeration</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getNumeration()
* @generated
* @ordered
*/
- protected String numeration = NUMERATION_EDEFAULT;
+ protected String numeration = OrderedListImpl.NUMERATION_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected OrderedListImpl() {
@@ -63,7 +63,7 @@ public class OrderedListImpl extends EObjectImpl implements OrderedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -73,28 +73,31 @@ public class OrderedListImpl extends EObjectImpl implements OrderedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getNumeration() {
return numeration;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setNumeration(String newNumeration) {
String oldNumeration = numeration;
numeration = newNumeration;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.ORDERED_LIST__NUMERATION, oldNumeration, numeration));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -108,7 +111,7 @@ public class OrderedListImpl extends EObjectImpl implements OrderedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -123,14 +126,14 @@ public class OrderedListImpl extends EObjectImpl implements OrderedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.ORDERED_LIST__NUMERATION:
- setNumeration(NUMERATION_EDEFAULT);
+ setNumeration(OrderedListImpl.NUMERATION_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -138,27 +141,28 @@ public class OrderedListImpl extends EObjectImpl implements OrderedList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.ORDERED_LIST__NUMERATION:
- return NUMERATION_EDEFAULT == null ? numeration != null : !NUMERATION_EDEFAULT.equals(numeration);
+ return OrderedListImpl.NUMERATION_EDEFAULT == null ? numeration != null : !OrderedListImpl.NUMERATION_EDEFAULT.equals(numeration);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (numeration: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ParaImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ParaImpl.java
index 2a095292a9..6599d4eec6 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ParaImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ParaImpl.java
@@ -27,14 +27,14 @@ import org.eclipse.sirius.tests.sample.docbook.Para;
* Data</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class ParaImpl extends EObjectImpl implements Para {
/**
* The default value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getData()
* @generated
* @ordered
@@ -44,16 +44,16 @@ public class ParaImpl extends EObjectImpl implements Para {
/**
* The cached value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getData()
* @generated
* @ordered
*/
- protected String data = DATA_EDEFAULT;
+ protected String data = ParaImpl.DATA_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected ParaImpl() {
@@ -62,7 +62,7 @@ public class ParaImpl extends EObjectImpl implements Para {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -72,28 +72,31 @@ public class ParaImpl extends EObjectImpl implements Para {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getData() {
return data;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setData(String newData) {
String oldData = data;
data = newData;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.PARA__DATA, oldData, data));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -107,7 +110,7 @@ public class ParaImpl extends EObjectImpl implements Para {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -122,14 +125,14 @@ public class ParaImpl extends EObjectImpl implements Para {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.PARA__DATA:
- setData(DATA_EDEFAULT);
+ setData(ParaImpl.DATA_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -137,27 +140,28 @@ public class ParaImpl extends EObjectImpl implements Para {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.PARA__DATA:
- return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data);
+ return ParaImpl.DATA_EDEFAULT == null ? data != null : !ParaImpl.DATA_EDEFAULT.equals(data);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (data: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect1Impl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect1Impl.java
index 14166eef0b..80e6cfc864 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect1Impl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect1Impl.java
@@ -36,14 +36,14 @@ import org.eclipse.sirius.tests.sample.docbook.Sect2;
* <em>Sect2</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
@@ -53,17 +53,17 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
*/
- protected String id = ID_EDEFAULT;
+ protected String id = Sect1Impl.ID_EDEFAULT;
/**
* The cached value of the '{@link #getSect2() <em>Sect2</em>}' containment
* reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getSect2()
* @generated
* @ordered
@@ -72,7 +72,7 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Sect1Impl() {
@@ -81,7 +81,7 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -91,30 +91,34 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getId() {
return id;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.SECT1__ID, oldId, id));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<Sect2> getSect2() {
if (sect2 == null) {
sect2 = new EObjectContainmentEList<Sect2>(Sect2.class, this, DocbookPackage.SECT1__SECT2);
@@ -124,7 +128,7 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -138,7 +142,7 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -154,7 +158,7 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -174,14 +178,14 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.SECT1__ID:
- setId(ID_EDEFAULT);
+ setId(Sect1Impl.ID_EDEFAULT);
return;
case DocbookPackage.SECT1__SECT2:
getSect2().clear();
@@ -192,14 +196,14 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.SECT1__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ return Sect1Impl.ID_EDEFAULT == null ? id != null : !Sect1Impl.ID_EDEFAULT.equals(id);
case DocbookPackage.SECT1__SECT2:
return sect2 != null && !sect2.isEmpty();
}
@@ -208,13 +212,14 @@ public class Sect1Impl extends AbstractSectImpl implements Sect1 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect2Impl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect2Impl.java
index 4a1df8727a..900cad652e 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect2Impl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect2Impl.java
@@ -36,14 +36,14 @@ import org.eclipse.sirius.tests.sample.docbook.Sect3;
* <em>Sect3</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
@@ -53,17 +53,17 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
*/
- protected String id = ID_EDEFAULT;
+ protected String id = Sect2Impl.ID_EDEFAULT;
/**
* The cached value of the '{@link #getSect3() <em>Sect3</em>}' containment
* reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getSect3()
* @generated
* @ordered
@@ -72,7 +72,7 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Sect2Impl() {
@@ -81,7 +81,7 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -91,30 +91,34 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getId() {
return id;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.SECT2__ID, oldId, id));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public EList<Sect3> getSect3() {
if (sect3 == null) {
sect3 = new EObjectContainmentEList<Sect3>(Sect3.class, this, DocbookPackage.SECT2__SECT3);
@@ -124,7 +128,7 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -138,7 +142,7 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -154,7 +158,7 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@@ -174,14 +178,14 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.SECT2__ID:
- setId(ID_EDEFAULT);
+ setId(Sect2Impl.ID_EDEFAULT);
return;
case DocbookPackage.SECT2__SECT3:
getSect3().clear();
@@ -192,14 +196,14 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.SECT2__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ return Sect2Impl.ID_EDEFAULT == null ? id != null : !Sect2Impl.ID_EDEFAULT.equals(id);
case DocbookPackage.SECT2__SECT3:
return sect3 != null && !sect3.isEmpty();
}
@@ -208,13 +212,14 @@ public class Sect2Impl extends AbstractSectImpl implements Sect2 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect3Impl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect3Impl.java
index 21a6965637..723df3f624 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect3Impl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/Sect3Impl.java
@@ -26,14 +26,14 @@ import org.eclipse.sirius.tests.sample.docbook.Sect3;
* Id</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class Sect3Impl extends AbstractSectImpl implements Sect3 {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
@@ -43,16 +43,16 @@ public class Sect3Impl extends AbstractSectImpl implements Sect3 {
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getId()
* @generated
* @ordered
*/
- protected String id = ID_EDEFAULT;
+ protected String id = Sect3Impl.ID_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Sect3Impl() {
@@ -61,7 +61,7 @@ public class Sect3Impl extends AbstractSectImpl implements Sect3 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -71,28 +71,31 @@ public class Sect3Impl extends AbstractSectImpl implements Sect3 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getId() {
return id;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setId(String newId) {
String oldId = id;
id = newId;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.SECT3__ID, oldId, id));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -106,7 +109,7 @@ public class Sect3Impl extends AbstractSectImpl implements Sect3 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -121,14 +124,14 @@ public class Sect3Impl extends AbstractSectImpl implements Sect3 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.SECT3__ID:
- setId(ID_EDEFAULT);
+ setId(Sect3Impl.ID_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -136,27 +139,28 @@ public class Sect3Impl extends AbstractSectImpl implements Sect3 {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.SECT3__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ return Sect3Impl.ID_EDEFAULT == null ? id != null : !Sect3Impl.ID_EDEFAULT.equals(id);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (id: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/SimpleListImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/SimpleListImpl.java
index 00446532d7..94596dcfd5 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/SimpleListImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/SimpleListImpl.java
@@ -20,13 +20,13 @@ import org.eclipse.sirius.tests.sample.docbook.SimpleList;
* <em><b>Simple List</b></em>'. <!-- end-user-doc -->
* <p>
* </p>
- *
+ *
* @generated
*/
public class SimpleListImpl extends EObjectImpl implements SimpleList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected SimpleListImpl() {
@@ -35,7 +35,7 @@ public class SimpleListImpl extends EObjectImpl implements SimpleList {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/TitleImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/TitleImpl.java
index 02a915a3a8..0d3c438588 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/TitleImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/TitleImpl.java
@@ -27,14 +27,14 @@ import org.eclipse.sirius.tests.sample.docbook.Title;
* <em>Data</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class TitleImpl extends EObjectImpl implements Title {
/**
* The default value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getData()
* @generated
* @ordered
@@ -44,16 +44,16 @@ public class TitleImpl extends EObjectImpl implements Title {
/**
* The cached value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getData()
* @generated
* @ordered
*/
- protected String data = DATA_EDEFAULT;
+ protected String data = TitleImpl.DATA_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected TitleImpl() {
@@ -62,7 +62,7 @@ public class TitleImpl extends EObjectImpl implements Title {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -72,28 +72,31 @@ public class TitleImpl extends EObjectImpl implements Title {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getData() {
return data;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setData(String newData) {
String oldData = data;
data = newData;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.TITLE__DATA, oldData, data));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -107,7 +110,7 @@ public class TitleImpl extends EObjectImpl implements Title {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -122,14 +125,14 @@ public class TitleImpl extends EObjectImpl implements Title {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.TITLE__DATA:
- setData(DATA_EDEFAULT);
+ setData(TitleImpl.DATA_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -137,27 +140,28 @@ public class TitleImpl extends EObjectImpl implements Title {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.TITLE__DATA:
- return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data);
+ return TitleImpl.DATA_EDEFAULT == null ? data != null : !TitleImpl.DATA_EDEFAULT.equals(data);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (data: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ULinkImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ULinkImpl.java
index 8ed991b5aa..02e59edfee 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ULinkImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/ULinkImpl.java
@@ -29,14 +29,14 @@ import org.eclipse.sirius.tests.sample.docbook.ULink;
* <em>Data</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class ULinkImpl extends EObjectImpl implements ULink {
/**
* The default value of the '{@link #getUrl() <em>Url</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getUrl()
* @generated
* @ordered
@@ -46,17 +46,17 @@ public class ULinkImpl extends EObjectImpl implements ULink {
/**
* The cached value of the '{@link #getUrl() <em>Url</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getUrl()
* @generated
* @ordered
*/
- protected String url = URL_EDEFAULT;
+ protected String url = ULinkImpl.URL_EDEFAULT;
/**
* The default value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getData()
* @generated
* @ordered
@@ -66,16 +66,16 @@ public class ULinkImpl extends EObjectImpl implements ULink {
/**
* The cached value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getData()
* @generated
* @ordered
*/
- protected String data = DATA_EDEFAULT;
+ protected String data = ULinkImpl.DATA_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected ULinkImpl() {
@@ -84,7 +84,7 @@ public class ULinkImpl extends EObjectImpl implements ULink {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -94,49 +94,55 @@ public class ULinkImpl extends EObjectImpl implements ULink {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getUrl() {
return url;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setUrl(String newUrl) {
String oldUrl = url;
url = newUrl;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.ULINK__URL, oldUrl, url));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getData() {
return data;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setData(String newData) {
String oldData = data;
data = newData;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.ULINK__DATA, oldData, data));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -152,7 +158,7 @@ public class ULinkImpl extends EObjectImpl implements ULink {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -170,17 +176,17 @@ public class ULinkImpl extends EObjectImpl implements ULink {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.ULINK__URL:
- setUrl(URL_EDEFAULT);
+ setUrl(ULinkImpl.URL_EDEFAULT);
return;
case DocbookPackage.ULINK__DATA:
- setData(DATA_EDEFAULT);
+ setData(ULinkImpl.DATA_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -188,29 +194,30 @@ public class ULinkImpl extends EObjectImpl implements ULink {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.ULINK__URL:
- return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url);
+ return ULinkImpl.URL_EDEFAULT == null ? url != null : !ULinkImpl.URL_EDEFAULT.equals(url);
case DocbookPackage.ULINK__DATA:
- return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data);
+ return ULinkImpl.DATA_EDEFAULT == null ? data != null : !ULinkImpl.DATA_EDEFAULT.equals(data);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (url: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/XRefImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/XRefImpl.java
index c8a7938327..0ae7b95840 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/XRefImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/impl/XRefImpl.java
@@ -27,14 +27,14 @@ import org.eclipse.sirius.tests.sample.docbook.XRef;
* <em>Linkend</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class XRefImpl extends EObjectImpl implements XRef {
/**
* The default value of the '{@link #getLinkend() <em>Linkend</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getLinkend()
* @generated
* @ordered
@@ -44,16 +44,16 @@ public class XRefImpl extends EObjectImpl implements XRef {
/**
* The cached value of the '{@link #getLinkend() <em>Linkend</em>}'
* attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @see #getLinkend()
* @generated
* @ordered
*/
- protected String linkend = LINKEND_EDEFAULT;
+ protected String linkend = XRefImpl.LINKEND_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected XRefImpl() {
@@ -62,7 +62,7 @@ public class XRefImpl extends EObjectImpl implements XRef {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -72,28 +72,31 @@ public class XRefImpl extends EObjectImpl implements XRef {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public String getLinkend() {
return linkend;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
+ @Override
public void setLinkend(String newLinkend) {
String oldLinkend = linkend;
linkend = newLinkend;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DocbookPackage.XREF__LINKEND, oldLinkend, linkend));
+ }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -107,7 +110,7 @@ public class XRefImpl extends EObjectImpl implements XRef {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -122,14 +125,14 @@ public class XRefImpl extends EObjectImpl implements XRef {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DocbookPackage.XREF__LINKEND:
- setLinkend(LINKEND_EDEFAULT);
+ setLinkend(XRefImpl.LINKEND_EDEFAULT);
return;
}
super.eUnset(featureID);
@@ -137,27 +140,28 @@ public class XRefImpl extends EObjectImpl implements XRef {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DocbookPackage.XREF__LINKEND:
- return LINKEND_EDEFAULT == null ? linkend != null : !LINKEND_EDEFAULT.equals(linkend);
+ return XRefImpl.LINKEND_EDEFAULT == null ? linkend != null : !XRefImpl.LINKEND_EDEFAULT.equals(linkend);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy())
+ if (eIsProxy()) {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (linkend: ");
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookAdapterFactory.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookAdapterFactory.java
index 07abb28a97..8e9efb9741 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookAdapterFactory.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookAdapterFactory.java
@@ -39,14 +39,14 @@ import org.eclipse.sirius.tests.sample.docbook.XRef;
* <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
* an adapter <code>createXXX</code> method for each class of the model. <!--
* end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage
* @generated
*/
public class DocbookAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected static DocbookPackage modelPackage;
@@ -54,12 +54,12 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
/**
* Creates an instance of the adapter factory. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
public DocbookAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = DocbookPackage.eINSTANCE;
+ if (DocbookAdapterFactory.modelPackage == null) {
+ DocbookAdapterFactory.modelPackage = DocbookPackage.eINSTANCE;
}
}
@@ -68,17 +68,17 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc --> This implementation returns <code>true</code> if
* the object is either the model's package or is an instance object of the
* model. <!-- end-user-doc -->
- *
+ *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
+ if (object == DocbookAdapterFactory.modelPackage) {
return true;
}
if (object instanceof EObject) {
- return ((EObject) object).eClass().getEPackage() == modelPackage;
+ return ((EObject) object).eClass().getEPackage() == DocbookAdapterFactory.modelPackage;
}
return false;
}
@@ -86,7 +86,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
/**
* The switch that delegates to the <code>createXXX</code> methods. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected DocbookSwitch<Adapter> modelSwitch = new DocbookSwitch<Adapter>() {
@@ -194,7 +194,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
/**
* Creates an adapter for the <code>target</code>. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @param target
* the object to adapt.
* @return the adapter for the <code>target</code>.
@@ -211,7 +211,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* begin-user-doc --> This default implementation returns null so that we
* can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Book
* @generated
@@ -226,7 +226,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* begin-user-doc --> This default implementation returns null so that we
* can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Info
* @generated
@@ -241,7 +241,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc --> This default implementation returns null so that
* we can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Author
* @generated
@@ -256,7 +256,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* '. <!-- begin-user-doc --> This default implementation returns null so
* that we can easily ignore cases; it's useful to ignore a case when
* inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Chapter
* @generated
@@ -271,7 +271,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc --> This default implementation returns null so that
* we can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Title
* @generated
@@ -286,7 +286,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* begin-user-doc --> This default implementation returns null so that we
* can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Para
* @generated
@@ -302,7 +302,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* implementation returns null so that we can easily ignore cases; it's
* useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.SimpleList
* @generated
@@ -318,7 +318,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* implementation returns null so that we can easily ignore cases; it's
* useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.ItemizedList
* @generated
@@ -334,7 +334,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* implementation returns null so that we can easily ignore cases; it's
* useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.OrderedList
* @generated
@@ -349,7 +349,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc --> This default implementation returns null so that
* we can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Sect1
* @generated
@@ -365,7 +365,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* implementation returns null so that we can easily ignore cases; it's
* useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.AbstractSect
* @generated
@@ -380,7 +380,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc --> This default implementation returns null so that
* we can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Sect2
* @generated
@@ -396,7 +396,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* returns null so that we can easily ignore cases; it's useful to ignore a
* case when inheritance will catch all the cases anyway. <!-- end-user-doc
* -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Emphasis
* @generated
@@ -411,7 +411,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc --> This default implementation returns null so that
* we can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.ULink
* @generated
@@ -426,7 +426,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* begin-user-doc --> This default implementation returns null so that we
* can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Link
* @generated
@@ -441,7 +441,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* begin-user-doc --> This default implementation returns null so that we
* can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.XRef
* @generated
@@ -456,7 +456,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* '. <!-- begin-user-doc --> This default implementation returns null so
* that we can easily ignore cases; it's useful to ignore a case when
* inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Example
* @generated
@@ -471,7 +471,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc --> This default implementation returns null so that
* we can easily ignore cases; it's useful to ignore a case when inheritance
* will catch all the cases anyway. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.Sect3
* @generated
@@ -487,7 +487,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
* returns null so that we can easily ignore cases; it's useful to ignore a
* case when inheritance will catch all the cases anyway. <!-- end-user-doc
* -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.sirius.tests.sample.docbook.ListItem
* @generated
@@ -499,7 +499,7 @@ public class DocbookAdapterFactory extends AdapterFactoryImpl {
/**
* Creates a new adapter for the default case. <!-- begin-user-doc --> This
* default implementation returns null. <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @generated
*/
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceFactoryImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceFactoryImpl.java
index 2732b29d3a..eeea8507ab 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceFactoryImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceFactoryImpl.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource;
/**
* <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
* package. <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.util.DocbookResourceImpl
* @generated
*/
@@ -26,7 +26,7 @@ public class DocbookResourceFactoryImpl extends ResourceFactoryImpl {
/**
* Creates an instance of the resource factory. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
public DocbookResourceFactoryImpl() {
@@ -36,7 +36,7 @@ public class DocbookResourceFactoryImpl extends ResourceFactoryImpl {
/**
* Creates an instance of the resource. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
@Override
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceImpl.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceImpl.java
index ac945c644f..13a05584cc 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceImpl.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookResourceImpl.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
/**
* <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.util.DocbookResourceFactoryImpl
* @generated
*/
@@ -24,7 +24,7 @@ public class DocbookResourceImpl extends XMLResourceImpl {
/**
* Creates an instance of the resource. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @param uri
* the URI of the new resource.
* @generated
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookSwitch.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookSwitch.java
index cc09586d1b..966d8f8266 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookSwitch.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookSwitch.java
@@ -41,14 +41,14 @@ import org.eclipse.sirius.tests.sample.docbook.XRef;
* starting with the actual class of the object and proceeding up the
* inheritance hierarchy until a non-null result is returned, which is the
* result of the switch. <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.sirius.tests.sample.docbook.DocbookPackage
* @generated
*/
public class DocbookSwitch<T> extends Switch<T> {
/**
* The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected static DocbookPackage modelPackage;
@@ -56,33 +56,33 @@ public class DocbookSwitch<T> extends Switch<T> {
/**
* Creates an instance of the switch. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @generated
*/
public DocbookSwitch() {
- if (modelPackage == null) {
- modelPackage = DocbookPackage.eINSTANCE;
+ if (DocbookSwitch.modelPackage == null) {
+ DocbookSwitch.modelPackage = DocbookPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @parameter ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
- return ePackage == modelPackage;
+ return ePackage == DocbookSwitch.modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns
* a non null result; it yields that result. <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
+ *
* @return the first non-null result returned by a <code>caseXXX</code>
* call.
* @generated
@@ -93,142 +93,165 @@ public class DocbookSwitch<T> extends Switch<T> {
case DocbookPackage.BOOK: {
Book book = (Book) theEObject;
T result = caseBook(book);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.INFO: {
Info info = (Info) theEObject;
T result = caseInfo(info);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.AUTHOR: {
Author author = (Author) theEObject;
T result = caseAuthor(author);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.CHAPTER: {
Chapter chapter = (Chapter) theEObject;
T result = caseChapter(chapter);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.TITLE: {
Title title = (Title) theEObject;
T result = caseTitle(title);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.PARA: {
Para para = (Para) theEObject;
T result = casePara(para);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.SIMPLE_LIST: {
SimpleList simpleList = (SimpleList) theEObject;
T result = caseSimpleList(simpleList);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.ITEMIZED_LIST: {
ItemizedList itemizedList = (ItemizedList) theEObject;
T result = caseItemizedList(itemizedList);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.ORDERED_LIST: {
OrderedList orderedList = (OrderedList) theEObject;
T result = caseOrderedList(orderedList);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.SECT1: {
Sect1 sect1 = (Sect1) theEObject;
T result = caseSect1(sect1);
- if (result == null)
+ if (result == null) {
result = caseAbstractSect(sect1);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.ABSTRACT_SECT: {
AbstractSect abstractSect = (AbstractSect) theEObject;
T result = caseAbstractSect(abstractSect);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.SECT2: {
Sect2 sect2 = (Sect2) theEObject;
T result = caseSect2(sect2);
- if (result == null)
+ if (result == null) {
result = caseAbstractSect(sect2);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.EMPHASIS: {
Emphasis emphasis = (Emphasis) theEObject;
T result = caseEmphasis(emphasis);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.ULINK: {
ULink uLink = (ULink) theEObject;
T result = caseULink(uLink);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.LINK: {
Link link = (Link) theEObject;
T result = caseLink(link);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.XREF: {
XRef xRef = (XRef) theEObject;
T result = caseXRef(xRef);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.EXAMPLE: {
Example example = (Example) theEObject;
T result = caseExample(example);
- if (result == null)
+ if (result == null) {
result = caseAbstractSect(example);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.SECT3: {
Sect3 sect3 = (Sect3) theEObject;
T result = caseSect3(sect3);
- if (result == null)
+ if (result == null) {
result = caseAbstractSect(sect3);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case DocbookPackage.LIST_ITEM: {
ListItem listItem = (ListItem) theEObject;
T result = caseListItem(listItem);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
default:
@@ -241,7 +264,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Book</em>'. <!-- begin-user-doc --> This implementation returns null;
* returning a non-null result will terminate the switch. <!-- end-user-doc
* -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -258,7 +281,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Info</em>'. <!-- begin-user-doc --> This implementation returns null;
* returning a non-null result will terminate the switch. <!-- end-user-doc
* -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -275,7 +298,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Author</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -292,7 +315,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Chapter</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -309,7 +332,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Title</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -326,7 +349,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Para</em>'. <!-- begin-user-doc --> This implementation returns null;
* returning a non-null result will terminate the switch. <!-- end-user-doc
* -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -343,7 +366,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Simple List</em>'. <!-- begin-user-doc --> This implementation
* returns null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -360,7 +383,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Itemized List</em>'. <!-- begin-user-doc --> This implementation
* returns null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -377,7 +400,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Ordered List</em>'. <!-- begin-user-doc --> This implementation
* returns null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -394,7 +417,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Sect1</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -411,7 +434,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Abstract Sect</em>'. <!-- begin-user-doc --> This implementation
* returns null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -428,7 +451,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Sect2</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -445,7 +468,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Emphasis</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -462,7 +485,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>ULink</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -479,7 +502,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Link</em>'. <!-- begin-user-doc --> This implementation returns null;
* returning a non-null result will terminate the switch. <!-- end-user-doc
* -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -496,7 +519,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>XRef</em>'. <!-- begin-user-doc --> This implementation returns null;
* returning a non-null result will terminate the switch. <!-- end-user-doc
* -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -513,7 +536,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Example</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -530,7 +553,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>Sect3</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -547,7 +570,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>List Item</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch. <!--
* end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
@@ -564,7 +587,7 @@ public class DocbookSwitch<T> extends Switch<T> {
* <em>EObject</em>'. <!-- begin-user-doc --> This implementation returns
* null; returning a non-null result will terminate the switch, but this is
* the last case anyway. <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '
diff --git a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookXMLProcessor.java b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookXMLProcessor.java
index 14321da9d4..3abb1635a2 100644
--- a/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookXMLProcessor.java
+++ b/plugins/org.eclipse.sirius.tests.sample.docbook/src/org/eclipse/sirius/tests/sample/docbook/util/DocbookXMLProcessor.java
@@ -20,7 +20,7 @@ import org.eclipse.sirius.tests.sample.docbook.DocbookPackage;
/**
* This class contains helper methods to serialize and deserialize XML documents
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
public class DocbookXMLProcessor extends XMLProcessor {
@@ -28,7 +28,7 @@ public class DocbookXMLProcessor extends XMLProcessor {
/**
* Public constructor to instantiate the helper. <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public DocbookXMLProcessor() {
@@ -39,15 +39,15 @@ public class DocbookXMLProcessor extends XMLProcessor {
/**
* Register for "*" and "xml" file extensions the DocbookResourceFactoryImpl
* factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
protected Map<String, Resource.Factory> getRegistrations() {
if (registrations == null) {
super.getRegistrations();
- registrations.put(XML_EXTENSION, new DocbookResourceFactoryImpl());
- registrations.put(STAR_EXTENSION, new DocbookResourceFactoryImpl());
+ registrations.put(XMLProcessor.XML_EXTENSION, new DocbookResourceFactoryImpl());
+ registrations.put(XMLProcessor.STAR_EXTENSION, new DocbookResourceFactoryImpl());
}
return registrations;
}

Back to the top