Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2017-08-23 13:54:56 +0000
committerPierre-Charles David2017-09-21 15:54:22 +0000
commit3e492c967265db3d160f7b370fd54bd197f4f223 (patch)
treea5f6bb04a6ecc7d2fa7fc32255033c4ba0c8d3e4
parenta5dbd7c3fc0197146c554f02b1a26aa34e6457fa (diff)
downloadorg.eclipse.sirius-3e492c967265db3d160f7b370fd54bd197f4f223.tar.gz
org.eclipse.sirius-3e492c967265db3d160f7b370fd54bd197f4f223.tar.xz
org.eclipse.sirius-3e492c967265db3d160f7b370fd54bd197f4f223.zip
[518524] Add default implementation for most methods in AbstractSessionEditorPage
Most of these have "natural" defaults, and providing them in the common super-class makes it simpler to create concrete extensions. Bug: 518524 Change-Id: If6f01649847de85242add4838a63134de98a58f6 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/api/pages/AbstractSessionEditorPage.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/api/pages/AbstractSessionEditorPage.java b/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/api/pages/AbstractSessionEditorPage.java
index 7ea0d9d0b6..335757ba42 100644
--- a/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/api/pages/AbstractSessionEditorPage.java
+++ b/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/api/pages/AbstractSessionEditorPage.java
@@ -64,7 +64,9 @@ public abstract class AbstractSessionEditorPage extends FormPage {
* @return the id of the page to take in consideration when positioning this
* page. {@link Optional#empty()} if no positioning is provided.
*/
- public abstract Optional<String> getLocationId();
+ public Optional<String> getLocationId() {
+ return Optional.of(DefaultSessionEditorPage.PAGE_ID);
+ }
/**
* Returns the kind of positioning to apply regarding the target page
@@ -93,7 +95,9 @@ public abstract class AbstractSessionEditorPage extends FormPage {
* @return an {@link PageUpdateCommand} the editor should execute.
* {@link Optional#empty()} if no update should be done.
*/
- public abstract Optional<PageUpdateCommand> resourceSetChanged(ResourceSetChangeEvent resourceSetChangeEvent);
+ public Optional<PageUpdateCommand> resourceSetChanged(ResourceSetChangeEvent resourceSetChangeEvent) {
+ return Optional.empty();
+ }
/**
* Notifies the page that its visibility status has changed. You can return
@@ -119,7 +123,9 @@ public abstract class AbstractSessionEditorPage extends FormPage {
* from session editor owning this page. {@link Optional#empty()} if
* no update must be done.
*/
- public abstract Optional<PageUpdateCommand> pageChanged(boolean isVisible);
+ public Optional<PageUpdateCommand> pageChanged(boolean isVisible) {
+ return Optional.empty();
+ }
/**
* Returns a filter that will reduce the call to the method

Back to the top