Author: dmaliarevich
Date: 2009-09-23 11:06:27 -0400 (Wed, 23 Sep 2009)
New Revision: 17702
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4935, default values for VPE Preference Page are
initialized now.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-09-23 12:58:07 UTC (rev
17701)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-09-23 15:06:27 UTC (rev
17702)
@@ -550,5 +550,10 @@
</markerResolutionGenerator>
</extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
class="org.jboss.tools.jst.jsp.preferences.VpePreferencesInitializer"/>
+ </extension>
+
</plugin>
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java 2009-09-23
12:58:07 UTC (rev 17701)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/IVpePreferencesPage.java 2009-09-23
15:06:27 UTC (rev 17702)
@@ -31,4 +31,5 @@
static final String SPLITTING_HORIZ_LEFT_SOURCE_VALUE = "3"; //$NON-NLS-1$
static final String SPLITTING_HORIZ_LEFT_VISUAL_VALUE = "4"; //$NON-NLS-1$
+ static final int DEFAULT_VISUAL_SOURCE_EDITORS_WEIGHTS = 500;
}
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java 2009-09-23
15:06:27 UTC (rev 17702)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.jsp.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.core.runtime.preferences.IScopeContext;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+
+public class VpePreferencesInitializer extends AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IEclipsePreferences defaultPreferences = ((IScopeContext) new
DefaultScope()).getNode(JspEditorPlugin.PLUGIN_ID);
+
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS,
false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS, false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_SELECTION_TAG_BAR, false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL,
false);
+ defaultPreferences.putBoolean(IVpePreferencesPage.ASK_TAG_ATTRIBUTES_ON_TAG_INSERT,
true);
+ defaultPreferences.putBoolean(IVpePreferencesPage.ASK_CONFIRMATION_ON_CLOSING_SELECTION_BAR,
true);
+ defaultPreferences.put(IVpePreferencesPage.DEFAULT_VPE_TAB,
IVpePreferencesPage.DEFAULT_VPE_TAB_VISUAL_SOURCE_VALUE);
+ defaultPreferences.put(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING,
IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE);
+ defaultPreferences.putInt(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_WEIGHTS,
IVpePreferencesPage.DEFAULT_VISUAL_SOURCE_EDITORS_WEIGHTS);
+
+ }
+
+}
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreferencesInitializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2009-09-23
12:58:07 UTC (rev 17701)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2009-09-23
15:06:27 UTC (rev 17702)
@@ -1176,7 +1176,7 @@
public static boolean isSourceEditorFirst() {
boolean sourceEditorFirst = false;
String splitting = JspEditorPlugin.getDefault().getPreferenceStore()
- .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
+ .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
if (IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE
.equalsIgnoreCase(splitting)
|| IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE