Author: dmaliarevich
Date: 2008-06-05 03:28:26 -0400 (Thu, 05 Jun 2008)
New Revision: 8559
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-2111, slider control added, source-visual editors
sash weights configuration now available.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java 2008-06-05
07:28:21 UTC (rev 8558)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java 2008-06-05
07:28:26 UTC (rev 8559)
@@ -9,6 +9,7 @@
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IEditorPart;
+import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.vpe.VpePlugin;
@@ -114,6 +115,28 @@
sash.setWeights(weights);
if (saved>=0)
sash.setCurrentSavedWeight(saved);
+ } else {
+ /*
+ * Set weights from the preference page
+ */
+ String stringValue = VpePreference.SOURCE_VISUAL_EDITORS_WEIGHTS.getValue();
+ try {
+ int intValue = Integer.parseInt(stringValue);
+ int[] weights = sash.getWeights();
+ if (weights.length > 2) {
+ if (intValue == 0) {
+ sash.maxUp();
+ } else if (intValue == 1000) {
+ sash.maxDown();
+ } else {
+ weights[0] = intValue;
+ weights[1] = 1000 - intValue;
+ sash.setWeights(weights);
+ }
+ }
+ } catch (Exception e) {
+ // Do nothing
+ }
}
} catch (CoreException e1) {
VpePlugin.getPluginLog().logError(e1);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2008-06-05
07:28:21 UTC (rev 8558)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2008-06-05
07:28:26 UTC (rev 8559)
@@ -55,6 +55,7 @@
public static String USE_ABSOLUTE_POSITION;
public static String ALWAYS_PROMPT_FOR_TAG_ATTRIBUTES_DURING_TAG_INSERT;
public static String OPTION_LIST;
+ public static String SOURCE_VISUAL_EDITORS_WEIGHTS;
public static String GENERAL;
public static String TEMPLATES;
public static String TEMPLATE;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2008-06-05
07:28:21 UTC (rev 8558)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2008-06-05
07:28:26 UTC (rev 8559)
@@ -15,6 +15,7 @@
USE_ABSOLUTE_POSITION=use absolute position
ALWAYS_PROMPT_FOR_TAG_ATTRIBUTES_DURING_TAG_INSERT=always prompt for tag attributes
during tag insert
OPTION_LIST=option list
+SOURCE_VISUAL_EDITORS_WEIGHTS=Source-Visual Editors Weights
GENERAL=General
TEMPLATES=Templates
TEMPLATE=Template