projects
/
gpl
/
argeo-suite.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor DocBook attributes.
[gpl/argeo-suite.git]
/
publishing
/
org.argeo.publishing.ui
/
src
/
org
/
argeo
/
docbook
/
ui
/
DocumentTextEditor.java
diff --git
a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DocumentTextEditor.java
b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DocumentTextEditor.java
index bdd72d59aad819a845178509a6a8b815c2b64d97..bac3fc36f8544e18530771d6f18065a0a9504dca 100644
(file)
--- a/
publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DocumentTextEditor.java
+++ b/
publishing/org.argeo.publishing.ui/src/org/argeo/docbook/ui/DocumentTextEditor.java
@@
-6,8
+6,8
@@
import javax.jcr.RepositoryException;
import org.argeo.cms.text.TextSection;
import org.argeo.cms.ui.CmsEditable;
import org.argeo.cms.ui.util.CmsUiUtils;
import org.argeo.cms.text.TextSection;
import org.argeo.cms.ui.CmsEditable;
import org.argeo.cms.ui.util.CmsUiUtils;
-import org.argeo.
jcr.Jcr
;
-import org.argeo.
jcr.Jcrx
Type;
+import org.argeo.
docbook.DbkUtils
;
+import org.argeo.
docbook.Dbk
Type;
import org.eclipse.swt.widgets.Composite;
/** Text editor where sections and subsections can be managed by the user. */
import org.eclipse.swt.widgets.Composite;
/** Text editor where sections and subsections can be managed by the user. */
@@
-23,8
+23,7
@@
public class DocumentTextEditor extends AbstractDbkViewer {
@Override
protected void initModel(Node textNode) throws RepositoryException {
if (isFlat()) {
@Override
protected void initModel(Node textNode) throws RepositoryException {
if (isFlat()) {
- textNode.addNode(DocBookNames.DBK_PARA, DocBookTypes.PARA).addNode(Jcr.JCR_XMLTEXT, JcrxType.JCRX_XMLTEXT)
- .setProperty(Jcr.JCR_XMLCHARACTERS, "");
+ DbkUtils.addParagraph(textNode, "");
}
// else
// textNode.setProperty(DocBookNames.DBK_TITLE, textNode.getName());
}
// else
// textNode.setProperty(DocBookNames.DBK_TITLE, textNode.getName());
@@
-32,8
+31,8
@@
public class DocumentTextEditor extends AbstractDbkViewer {
@Override
protected Boolean isModelInitialized(Node textNode) throws RepositoryException {
@Override
protected Boolean isModelInitialized(Node textNode) throws RepositoryException {
- return textNode.hasNode(D
ocBookTypes.TITLE) || textNode.hasNode(DocBookNames.DBK_PARA
)
- || (!isFlat() && textNode.hasNode(D
ocBookNames.DBK_SECTION
));
+ return textNode.hasNode(D
bkType.title.get()) || textNode.hasNode(DbkType.para.get()
)
+ || (!isFlat() && textNode.hasNode(D
bkType.section.get()
));
}
}
}
}