Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkchong2015-10-28 17:48:10 -0400
committerkchong2015-10-28 17:48:10 -0400
commita95786a4d4c50a43c4d76f4bc6db92b9f1205fa3 (patch)
treeb53ebe070e23021cd444622d160aedcf413ac0c3
parentf08c0a5ae162916501cfcc9c2d87d5dd5b9813d2 (diff)
downloadwebtools.sourceediting-a95786a4d4c50a43c4d76f4bc6db92b9f1205fa3.tar.gz
webtools.sourceediting-a95786a4d4c50a43c4d76f4bc6db92b9f1205fa3.tar.xz
webtools.sourceediting-a95786a4d4c50a43c4d76f4bc6db92b9f1205fa3.zip
[480167] WTP 3.8: Default preferences are not initialized (dependent on
runtime compatibility. layer)
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.xml8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/pom.xml2
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferenceInitializer.java45
4 files changed, 55 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
index e3b9f494c..685278ec0 100644
--- a/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %_UI_PLUGIN_NAME
Bundle-SymbolicName: org.eclipse.wst.xsd.ui; singleton:=true
-Bundle-Version: 1.2.500.qualifier
+Bundle-Version: 1.2.600.qualifier
Bundle-Activator: org.eclipse.wst.xsd.ui.internal.editor.XSDEditorPlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xsd.ui/plugin.xml b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
index 94f21e380..f3c52bb33 100644
--- a/bundles/org.eclipse.wst.xsd.ui/plugin.xml
+++ b/bundles/org.eclipse.wst.xsd.ui/plugin.xml
@@ -64,6 +64,14 @@
name="%_UI_XML_SCHEMA_VALIDATOR_PREFERENCE">
</page>
</extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.wst.xsd.ui.internal.preferences.XSDPreferenceInitializer">
+ </initializer>
+ </extension>
+
<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
<provisionalDefinition
type="preferencepages"
diff --git a/bundles/org.eclipse.wst.xsd.ui/pom.xml b/bundles/org.eclipse.wst.xsd.ui/pom.xml
index f8fef9ff0..08f46ca64 100644
--- a/bundles/org.eclipse.wst.xsd.ui/pom.xml
+++ b/bundles/org.eclipse.wst.xsd.ui/pom.xml
@@ -22,7 +22,7 @@
<groupId>org.eclipse.webtools.sourceediting</groupId>
<artifactId>org.eclipse.wst.xsd.ui</artifactId>
- <version>1.2.500-SNAPSHOT</version>
+ <version>1.2.600-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<!-- added this "constraint" for bug 458962 -->
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferenceInitializer.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferenceInitializer.java
new file mode 100644
index 000000000..51fe367e9
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferenceInitializer.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2015 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.wst.xsd.ui.internal.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.wst.xsd.ui.internal.editor.XSDEditorPlugin;
+
+public class XSDPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ public void initializeDefaultPreferences() {
+ IEclipsePreferences node = DefaultScope.INSTANCE.getNode(XSDEditorPlugin.getDefault().getBundle().getSymbolicName());
+ // formatting preferences
+ node.putBoolean(XSDEditorPlugin.CONST_SHOW_INHERITED_CONTENT, false);
+ node.put(XSDEditorPlugin.CONST_XSD_DEFAULT_PREFIX_TEXT, "xsd"); //$NON-NLS-1$
+ node.putBoolean(XSDEditorPlugin.CONST_XSD_LANGUAGE_QUALIFY, false);
+ node.put(XSDEditorPlugin.DEFAULT_PAGE, XSDEditorPlugin.DESIGN_PAGE);
+ node.put(XSDEditorPlugin.CONST_DEFAULT_TARGET_NAMESPACE, XSDEditorPlugin.DEFAULT_TARGET_NAMESPACE);
+ node.putBoolean(XSDEditorPlugin.CONST_SHOW_EXTERNALS, false);
+ node.putBoolean(XSDEditorPlugin.CONST_XSD_IMPORT_CLEANUP, false);
+ node.putBoolean(XSDEditorPlugin.CONST_XSD_AUTO_OPEN_SCHEMA_LOCATION_DIALOG, true);
+
+ //Even the last item in the list must contain a trailing List separator
+ node.put(XSDEditorPlugin.CONST_PREFERED_BUILT_IN_TYPES,
+ "boolean"+ XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "date" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "dateTime" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "double" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "float" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "hexBinary" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "int" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "string" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR + //$NON-NLS-1$
+ "time" + XSDEditorPlugin.CUSTOM_LIST_SEPARATOR); //$NON-NLS-1$
+ }
+
+}

Back to the top