1 package org
.argeo
.demo
.i18n
.editors
;
3 import org
.apache
.commons
.logging
.Log
;
4 import org
.apache
.commons
.logging
.LogFactory
;
5 import org
.argeo
.ArgeoException
;
6 import org
.argeo
.demo
.i18n
.I18nDemoMessages
;
7 import org
.argeo
.demo
.i18n
.I18nDemoPlugin
;
8 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
9 import org
.eclipse
.ui
.IEditorInput
;
10 import org
.eclipse
.ui
.IEditorSite
;
11 import org
.eclipse
.ui
.PartInitException
;
12 import org
.eclipse
.ui
.forms
.editor
.FormEditor
;
16 * Container for the node editor page. At creation time, it takes a JCR Node
17 * that cannot be changed afterwards.
20 public class SimpleMultitabEditor
extends FormEditor
{
22 private final static Log log
= LogFactory
23 .getLog(SimpleMultitabEditor
.class);
24 public final static String ID
= I18nDemoPlugin
.ID
+ ".simpleMultitabEditor";
26 private SimplePage simplePage
;
27 private MultiSectionPage multiSectionPage
;
29 public void init(IEditorSite site
, IEditorInput input
)
30 throws PartInitException
{
31 super.init(site
, input
);
32 // this.setPartName("Internationalized editor part name");
36 protected void addPages() {
38 simplePage
= new SimplePage(this,
39 I18nDemoMessages
.get().SimpleMultitabEditor_SimplePageTitle
);
42 multiSectionPage
= new MultiSectionPage(
44 I18nDemoMessages
.get().SimpleMultitabEditor_MultiSectionPageTitle
);
45 addPage(multiSectionPage
);
47 } catch (PartInitException e
) {
48 throw new ArgeoException("Not able to add an empty page ", e
);
53 public void doSaveAs() {
54 // unused compulsory method
58 public void doSave(IProgressMonitor monitor
) {
60 // Automatically commit all pages of the editor
62 firePropertyChange(PROP_DIRTY
);
63 } catch (Exception e
) {
64 throw new ArgeoException("Error while saving node", e
);
70 public boolean isSaveAsAllowed() {