[134301] XML editor does not remember font settings
diff --git a/bundles/org.eclipse.wst.xml.ui/plugin.xml b/bundles/org.eclipse.wst.xml.ui/plugin.xml
index 0b9e607..c8a3d52 100644
--- a/bundles/org.eclipse.wst.xml.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.xml.ui/plugin.xml
@@ -281,6 +281,7 @@
icon="$nl$/icons/xmldoc.gif"
contributorClass="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorActionBarContributor"
class="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart"
+ symbolicFontName="org.eclipse.wst.sse.ui.textfont"
id="org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart">
<contentTypeBinding
contentTypeId="org.eclipse.core.runtime.xml" />
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
index 082edfc..0cb4194 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
@@ -9,6 +9,9 @@
package org.eclipse.wst.xml.ui.internal.tabletree;
import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -240,6 +243,26 @@
}
}
}
+
+ private class PageInitializationData {
+ IConfigurationElement fElement;
+ String fPropertyName;
+ Object fData;
+
+ PageInitializationData(IConfigurationElement cfig, String propertyName, Object data) {
+ super();
+ fElement = cfig;
+ fPropertyName = propertyName;
+ fData = data;
+ }
+ void sendInitializationData(IExecutableExtension executableExtension) {
+ try {
+ executableExtension.setInitializationData(fElement, fPropertyName, fData);
+ } catch (CoreException e) {
+ Logger.logException(e);
+ }
+ }
+ }
/**
* Internal IPropertyListener
@@ -387,6 +410,8 @@
private ILabelProvider fStatusLineLabelProvider;
+ private PageInitializationData fPageInitializer;
+
/**
* StructuredTextMultiPageEditorPart constructor comment.
*/
@@ -640,6 +665,15 @@
protected void createSourcePage() throws PartInitException {
fTextEditor = createTextEditor();
fTextEditor.setEditorPart(this);
+
+ /*
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=134301 - XML editor
+ * does not remember font settings
+ *
+ * @see
+ * org.eclipse.ui.texteditor.AbstractTextEditor#getSymbolicFontName()
+ */
+ fPageInitializer.sendInitializationData(fTextEditor);
if (fPropertyListener == null) {
fPropertyListener = new PropertyListener();
@@ -856,6 +890,11 @@
// save the last active page index to preference manager
getPreferenceStore().setValue(IXMLPreferenceNames.LAST_ACTIVE_PAGE, newPageIndex);
}
+
+ public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data) {
+ super.setInitializationData(cfig, propertyName, data);
+ fPageInitializer = new PageInitializationData(cfig, propertyName, data);
+ }
/*
* (non-Javadoc)