Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2015-12-14 11:33:55 -0500
committerChristian W. Damus2015-12-14 11:41:56 -0500
commitb00d4101f6626435e92af1b678a454980685ec1f (patch)
tree25e3459b72a5dbd8af5e44c931c402966db496d1 /plugins/views/properties
parent4e5d60fe35f36400265700b7cdf50494c6065849 (diff)
downloadorg.eclipse.papyrus-b00d4101f6626435e92af1b678a454980685ec1f.tar.gz
org.eclipse.papyrus-b00d4101f6626435e92af1b678a454980685ec1f.tar.xz
org.eclipse.papyrus-b00d4101f6626435e92af1b678a454980685ec1f.zip
Bug 469188: [Editor] Page management improvements in the Papyrus multi-editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469188 Support for saving the active Welcome Page layout as the default for all other (non-customized) welcome pages. This includes: * saving the user-defined layout in the workspace metadata area as the default Welcome Page model * notifying all other open editors that are using the default welcome model to refresh their layouts * a new button in the Welcome Page preferences to reset the default layout to factory defaults. This deletes the default welcome model and notifies editors to recompute the layout
Diffstat (limited to 'plugins/views/properties')
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF9
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/preferences/Preferences.java26
2 files changed, 31 insertions, 4 deletions
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF b/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF
index 3f18db67532..ce85d396c2a 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/META-INF/MANIFEST.MF
@@ -4,17 +4,18 @@ Export-Package: org.eclipse.papyrus.views.properties,
org.eclipse.papyrus.views.properties.creation,
org.eclipse.papyrus.views.properties.extensions,
org.eclipse.papyrus.views.properties.modelelement,
+ org.eclipse.papyrus.views.properties.preferences,
org.eclipse.papyrus.views.properties.providers,
org.eclipse.papyrus.views.properties.root,
org.eclipse.papyrus.views.properties.runtime,
+ org.eclipse.papyrus.views.properties.runtime.preferences,
+ org.eclipse.papyrus.views.properties.runtime.preferences.impl,
+ org.eclipse.papyrus.views.properties.runtime.preferences.util,
org.eclipse.papyrus.views.properties.storage,
org.eclipse.papyrus.views.properties.util,
org.eclipse.papyrus.views.properties.widgets,
org.eclipse.papyrus.views.properties.widgets.layout,
- org.eclipse.papyrus.views.properties.xwt,
- org.eclipse.papyrus.views.properties.runtime.preferences,
- org.eclipse.papyrus.views.properties.runtime.preferences.impl,
- org.eclipse.papyrus.views.properties.runtime.preferences.util
+ org.eclipse.papyrus.views.properties.xwt
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
bin
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/preferences/Preferences.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/preferences/Preferences.java
index eee6db4f44c..7e8bfa77f0c 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/preferences/Preferences.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/preferences/Preferences.java
@@ -88,6 +88,8 @@ public class Preferences extends PreferencePage implements IWorkbenchPreferenceP
self.setLayout(new GridLayout(1, false));
self.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ createHeaderContents(self);
+
Label label = new Label(self, SWT.NONE);
label.setText(Messages.Preferences_Contexts);
@@ -122,10 +124,34 @@ public class Preferences extends PreferencePage implements IWorkbenchPreferenceP
checkboxes.put(context, checkbox);
}
+ createFooterContents(self);
+
contextState.snapshot();
return null;
}
+ /**
+ * Overridden by subclasses to create optional header content above the
+ * list of context check-boxes.
+ *
+ * @param parent
+ * the parent composite
+ */
+ protected void createHeaderContents(Composite parent) {
+ // Pass
+ }
+
+ /**
+ * Overridden by subclasses to create optional footer content below the
+ * list of context check-boxes.
+ *
+ * @param parent
+ * the parent composite
+ */
+ protected void createFooterContents(Composite parent) {
+ // Pass
+ }
+
protected Comparator<? super Context> contextOrdering() {
return Comparator.comparingInt(this::getCategory).thenComparing(
Comparator.comparing(Context::getUserLabel));

Back to the top