Author: dmaliarevich
Date: 2009-09-17 04:17:46 -0400 (Thu, 17 Sep 2009)
New Revision: 17630
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertType.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-3504, context menu structure was updated,
"From Palette" menu item was removed.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java 2009-09-17
06:20:40 UTC (rev 17629)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java 2009-09-17
08:17:46 UTC (rev 17630)
@@ -81,29 +81,6 @@
@Override
public void fill(Menu menu, int index) {
/*
- *
https://jira.jboss.org/jira/browse/JBIDE-3504
- * Adding 'Insert tag from Palette' menu item.
- */
- final MenuItem fromPaletteItem;
- if (index < 0) {
- fromPaletteItem = new MenuItem(menu, SWT.CASCADE);
- } else {
- fromPaletteItem = new MenuItem(menu, SWT.CASCADE, index);
- }
- /*
- * Increasing parent menu item index.
- */
- index++;
- fromPaletteItem.setText(VpeUIMessages.FROM_PALETTE);
- /*
- * Creating menu for 'Insert tag from Palette' item.
- */
- final Menu fromPaletteMenu = new Menu(menu);
- /*
- * Tie menu with the item.
- */
- fromPaletteItem.setMenu(fromPaletteMenu);
- /*
* Setting each InsertType to correct position in the menu
*/
for (final InsertType insertItem : InsertType.values()) {
@@ -113,26 +90,12 @@
final MenuManager paletteManuManager = new MenuManager(
insertItem.getMessage());
final XModelObject model = ModelUtilities.getPreferenceModel()
- .getByPath("%Palette%"); //$NON-NLS-1$
+ .getByPath("%Palette%"); //$NON-NLS-1$
paletteManuManager.addMenuListener(new InsertMenuListener(
model, insertItem));
paletteManuManager.setRemoveAllWhenShown(true);
- /*
- * Place menu items to the correct menu.
- */
- if (insertItem.equals(InsertType.REPLACE_WITH)) {
- /*
- * Replace item will be placed in the parent menu.
- * Because of this its position index is required.
- */
- paletteManuManager.fill(menu, index);
- index++;
- } else {
- /*
- * Fill 'Insert tag from palette' menu with insert items.
- */
- paletteManuManager.fill(fromPaletteMenu, -1);
- }
+ paletteManuManager.fill(menu, index);
+ index++;
}
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertType.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertType.java 2009-09-17
06:20:40 UTC (rev 17629)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertType.java 2009-09-17
08:17:46 UTC (rev 17630)
@@ -19,8 +19,8 @@
INSERT_AROUND(VpeUIMessages.INSERT_AROUND),
INSERT_BEFORE(VpeUIMessages.INSERT_BEFORE),
INSERT_AFTER(VpeUIMessages.INSERT_AFTER),
- REPLACE_WITH(VpeUIMessages.REPLACE_WITH),
- INSERT_INTO(VpeUIMessages.INSERT_INTO);
+ INSERT_INTO(VpeUIMessages.INSERT_INTO),
+ REPLACE_WITH(VpeUIMessages.REPLACE_WITH);
private String message;
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 2009-09-17
06:20:40 UTC (rev 17629)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2009-09-17
08:17:46 UTC (rev 17630)
@@ -81,11 +81,11 @@
BaseActionManager_InsertTag=Insert Tag
BaseActionManager_ReplaceWith=Replace With
SETUP_TEMPLATE_FOR_MENU=Setup Template for <{0}>...
-INSERT_AROUND=Around
-INSERT_BEFORE=Before
-INSERT_AFTER=After
-REPLACE_WITH=Replace with Palette tag
-INSERT_INTO=Into
+INSERT_AROUND=Insert around
+INSERT_BEFORE=Insert before
+INSERT_AFTER=Insert after
+INSERT_INTO=Insert into
+REPLACE_WITH=Replace with
FROM_PALETTE=Insert tag from Palette
PAGE_DESIGN_OPTIONS_ABOUT=Here you can configure Visual Page Editor options, which will
be used for generating a preview
ACTUAL_RUN_TIME_FOLDERS_ABOUT=These options will be used by Visual Page Editor for
replacing absolute and relative path values when generating a preview