+ Composite parent = shell;
+ CmsEditable cmsEditable = textViewer.getCmsEditable();
+// if (availableStyles.isEmpty())
+// return;
+
+ if (editablePart instanceof Paragraph) {
+ Paragraph paragraph = (Paragraph) editablePart;
+ deletePartB(parent, DbkMsg.deleteParagraph.lead(), paragraph);
+ insertMediaB(parent, DbkMsg.insertMedia.lead(), paragraph);
+
+ } else if (editablePart instanceof Img) {
+ Img img = (Img) editablePart;
+ deletePartB(parent, DbkMsg.deleteMedia.lead(), img);
+ insertMediaB(parent, DbkMsg.insertMedia.lead(), img);
+
+ } else if (editablePart instanceof DocBookSectionTitle) {
+ DocBookSectionTitle sectionTitle = (DocBookSectionTitle) editablePart;
+ TextSection section = sectionTitle.getSection();
+ if (!section.isTitleReadOnly()) {
+ Label deleteB = new Label(shell, SWT.NONE);
+ deleteB.setText(DbkMsg.deleteSection.lead());
+ deleteB.addMouseListener((MouseDown) (e) -> {
+ textViewer.deleteSection(section);
+ hide();
+ });
+ }
+ insertMediaB(parent, DbkMsg.insertMedia.lead(), sectionTitle.getSection(), sectionTitle);
+ }