Author: dmaliarevich
Date: 2011-10-05 07:46:11 -0400 (Wed, 05 Oct 2011)
New Revision: 35363
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.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:
https://issues.jboss.org/browse/JBIDE-8995 , Tooltips names were separated from the
Preference page's splitting names.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2011-10-05
11:41:01 UTC (rev 35362)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2011-10-05
11:46:11 UTC (rev 35363)
@@ -163,10 +163,10 @@
layoutIcons.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
ICON_ORIENTATION_VISUAI_TOP);
layoutNames = new HashMap<String, String>();
- layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE,
VpeUIMessages.SPLITTING_HORIZ_LEFT_SOURCE);
- layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE,
VpeUIMessages.SPLITTING_VERT_TOP_SOURCE);
- layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE,
VpeUIMessages.SPLITTING_HORIZ_LEFT_VISUAL);
- layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
VpeUIMessages.SPLITTING_VERT_TOP_VISUAL);
+ layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE,
VpeUIMessages.SPLITTING_HORIZ_LEFT_SOURCE_TOOLTIP);
+ layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE,
VpeUIMessages.SPLITTING_VERT_TOP_SOURCE_TOOLTIP);
+ layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE,
VpeUIMessages.SPLITTING_HORIZ_LEFT_VISUAL_TOOLTIP);
+ layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
VpeUIMessages.SPLITTING_VERT_TOP_VISUAL_TOOLTIP);
layoutValues= new ArrayList<String>();
layoutValues.add(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java 2011-10-05
11:41:01 UTC (rev 35362)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java 2011-10-05
11:46:11 UTC (rev 35363)
@@ -41,7 +41,7 @@
private static List<String> layoutValues;
private static Map<String, String> layoutIcons;
- private static Map<String, String> layoutNames;
+ private static Map<String, String> layoutNamesAndTooltips;
private static final String ICON_ORIENTATION_SOURCE_LEFT =
"icons/source_left.gif"; //$NON-NLS-1$
private static final String ICON_ORIENTATION_SOURCE_TOP =
"icons/source_top.gif"; //$NON-NLS-1$
private static final String ICON_ORIENTATION_VISUAL_LEFT =
"icons/visual_left.gif"; //$NON-NLS-1$
@@ -63,15 +63,15 @@
layoutIcons.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
ICON_ORIENTATION_VISUAI_TOP);
- layoutNames = new HashMap<String, String>();
- layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE,
- VpeUIMessages.SPLITTING_HORIZ_LEFT_SOURCE);
- layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE,
- VpeUIMessages.SPLITTING_VERT_TOP_SOURCE);
- layoutNames.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE,
- VpeUIMessages.SPLITTING_HORIZ_LEFT_VISUAL);
- layoutNames.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
- VpeUIMessages.SPLITTING_VERT_TOP_VISUAL);
+ layoutNamesAndTooltips = new HashMap<String, String>();
+ layoutNamesAndTooltips.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE,
+ VpeUIMessages.SPLITTING_HORIZ_LEFT_SOURCE_TOOLTIP);
+ layoutNamesAndTooltips.put(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE,
+ VpeUIMessages.SPLITTING_VERT_TOP_SOURCE_TOOLTIP);
+ layoutNamesAndTooltips.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE,
+ VpeUIMessages.SPLITTING_HORIZ_LEFT_VISUAL_TOOLTIP);
+ layoutNamesAndTooltips.put(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE,
+ VpeUIMessages.SPLITTING_VERT_TOP_VISUAL_TOOLTIP);
layoutValues = new ArrayList<String>();
layoutValues.add(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE);
@@ -97,8 +97,7 @@
*/
currentOrientationIndex++;
if (currentOrientationIndex >= layoutValues.size()) {
- currentOrientationIndex = currentOrientationIndex
- % layoutValues.size();
+ currentOrientationIndex = currentOrientationIndex % layoutValues.size();
}
String newOrientation = layoutValues.get(currentOrientationIndex);
@@ -120,10 +119,9 @@
}
public void updateElement(UIElement element, Map parameters) {
- IPreferenceStore preferences = JspEditorPlugin.getDefault()
- .getPreferenceStore();
- String orientation = preferences
- .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
+ IPreferenceStore preferences = JspEditorPlugin.getDefault().getPreferenceStore();
+ String orientation = preferences.getString(
+ IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
if (orientation.isEmpty()) {
orientation = IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE;
preferences.setValue(
@@ -136,7 +134,7 @@
*/
element.setIcon(ImageDescriptor.createFromFile(this.getClass(),
layoutIcons.get(orientation)));
- String orientationName = layoutNames.get(orientation);
+ String orientationName = layoutNamesAndTooltips.get(orientation);
element.setTooltip(orientationName);
element.setText(orientationName);
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 2011-10-05
11:41:01 UTC (rev 35362)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2011-10-05
11:46:11 UTC (rev 35363)
@@ -141,6 +141,10 @@
public static String DEFAULT_VPE_TAB_VISUAL_SOURCE;
public static String DEFAULT_VPE_TAB_SOURCE;
public static String DEFAULT_VPE_TAB_PREVIEW;
+ public static String SPLITTING_VERT_TOP_SOURCE_TOOLTIP;
+ public static String SPLITTING_VERT_TOP_VISUAL_TOOLTIP;
+ public static String SPLITTING_HORIZ_LEFT_SOURCE_TOOLTIP;
+ public static String SPLITTING_HORIZ_LEFT_VISUAL_TOOLTIP;
public static String SPLITTING_VERT_TOP_SOURCE;
public static String SPLITTING_VERT_TOP_VISUAL;
public static String SPLITTING_HORIZ_LEFT_SOURCE;
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 2011-10-05
11:41:01 UTC (rev 35362)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2011-10-05
11:46:11 UTC (rev 35363)
@@ -133,10 +133,14 @@
DEFAULT_VPE_TAB_VISUAL_SOURCE=Visual/Source
DEFAULT_VPE_TAB_SOURCE=Source
DEFAULT_VPE_TAB_PREVIEW=Preview
-SPLITTING_HORIZ_LEFT_SOURCE=Switch Visual Editor to the bottom
-SPLITTING_VERT_TOP_SOURCE=Switch Visual Editor to the left
-SPLITTING_HORIZ_LEFT_VISUAL=Switch Visual Editor to the top
-SPLITTING_VERT_TOP_VISUAL=Switch Visual Editor to the right
+SPLITTING_HORIZ_LEFT_SOURCE_TOOLTIP=Switch Visual Editor to the bottom
+SPLITTING_VERT_TOP_SOURCE_TOOLTIP=Switch Visual Editor to the left
+SPLITTING_HORIZ_LEFT_VISUAL_TOOLTIP=Switch Visual Editor to the top
+SPLITTING_VERT_TOP_VISUAL_TOOLTIP=Switch Visual Editor to the right
+SPLITTING_VERT_TOP_SOURCE=Vertical splitting with Source Editor on the top
+SPLITTING_VERT_TOP_VISUAL=Vertical splitting with Visual Editor on the top
+SPLITTING_HORIZ_LEFT_SOURCE=Horizontal splitting with Source Editor to the left
+SPLITTING_HORIZ_LEFT_VISUAL=Horizontal splitting with Visual Editor to the left
# Import/Export user specified tag templates messages
IMPORT_USER_TAGS_TEMPLATES_WIZARD_PAGE=Import user specified tag templates wizard page