Author: dvinnichek
Date: 2010-10-26 09:55:56 -0400 (Tue, 26 Oct 2010)
New Revision: 26068
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/icons/
trunk/vpe/plugins/org.jboss.tools.vpe/icons/border.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/bundle-as-el.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/non-visual-tags.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/point_to_css.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/preferences.gif
trunk/vpe/plugins/org.jboss.tools.vpe/icons/refresh.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_left.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_top.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_left.gif
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_top.gif
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.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/handlers/ShowBorderHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
Log:
move some vpe toolbar buttons to external toolbar
(
https://jira.jboss.org/browse/JBIDE-4701)
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/border.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/border.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/bundle-as-el.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/bundle-as-el.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/non-visual-tags.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/non-visual-tags.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/point_to_css.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/point_to_css.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/preferences.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/preferences.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/vpe/plugins/org.jboss.tools.vpe/icons/refresh.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/icons/refresh.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-10-26 12:45:27 UTC (rev
26067)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-10-26 13:55:56 UTC (rev
26068)
@@ -13,3 +13,12 @@
exportUserTagsTemplatesWizardDescription=Export User specified tag templates to the local
file system
importUserTagsTemplatesWizardName=User specified tag templates
importUserTagsTemplatesWizardDescription=Import User specified tag templates from the
local file system
+vpe.menu.name=Vpe Menu
+vpe.toolbar.preferences=Preferences
+vpe.toolbar.refresh=Refresh
+vpe.toolbar.page_design_options=Page Design Options
+vpe.toolbar.rotate_editors=Rotate Editors
+vpe.toolbar.show_border=Show border for unknown tags
+vpe.toolbar.show_non_visual_tags=Show non-visual tags
+vpe.toolbar.show_text_formatting=Show text formatting bar
+vpe.toolbar.show_bundle_as_el=Show bundle's messages as EL expressions
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-26 12:45:27 UTC (rev 26067)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-26 13:55:56 UTC (rev 26068)
@@ -59,6 +59,50 @@
<command categoryId="org.jboss.tools.vpe.category"
id="org.jboss.tools.vpe.jumping"
name="%visual.jumping"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.preferencesCommand"
+ name="%vpe.toolbar.preferences"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.refreshCommand"
+ name="%vpe.toolbar.refresh"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ name="%vpe.toolbar.page_design_options"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ name="%vpe.toolbar.rotate_editors"/>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showBorderCommand"
+ name="%vpe.toolbar.show_border">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ name="%vpe.toolbar.show_non_visual_tags">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
+ <!--command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ name="%vpe.toolbar.show_text_formatting">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command-->
+ <command categoryId="org.jboss.tools.vpe.category"
+ id="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ name="%vpe.toolbar.show_bundle_as_el">
+ <state
+ class="org.eclipse.ui.handlers.RegistryToggleState:false"
+ id="org.eclipse.ui.commands.toggleState">
+ </state>
+ </command>
</extension>
<extension point="org.eclipse.ui.bindings">
<key commandId="org.jboss.tools.vpe.source.maxmin"
@@ -73,6 +117,46 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
contextId="org.jboss.tools.vpe.editorContext"
sequence="M1+M2+Tab"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.preferencesCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+1"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+2"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+3"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+4"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+5"/>
+ <key
+ commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+6"/>
+ <!--key
+ commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+7"/-->
+ <key
+ commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ contextId="org.eclipse.ui.contexts.window"
+ sequence="M1+M2+8"/>
</extension>
<extension
point="org.jboss.tools.jst.jsp.visulaEditorImplementations"
id="org.jboss.tools.vpe.editor.VpeEditorPartFactory">
@@ -97,6 +181,138 @@
id="org.jboss.tools.vpe.editor.menu.SetupTemplateContributionItem">
</dynamic>
</menuContribution>
+ <menuContribution
+
locationURI="menu:sourceMenuId?after=org.jboss.tools.jst.jsp.menus.i18">
+ <menu
+ id="org.jboss.tools.vpe.menus.VpeMenu"
+ label="%vpe.menu.name"
+ mnemonic="M">
+ <command
+
commandId="org.jboss.tools.vpe.commands.preferencesCommand"
+ icon="icons/preferences.gif"
+ id="org.jboss.tools.vpe.menus.preferencesCommand"
+ mnemonic="S"/>
+ <command
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"
+ icon="icons/refresh.gif"
+ id="org.jboss.tools.vpe.menus.refreshCommand"
+ mnemonic="S"/>
+ <command
+
commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ icon="icons/point_to_css.gif"
+ id="org.jboss.tools.vpe.menus.pageDesignOptionsCommand"
+ mnemonic="S"/>
+ <command
+
commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ id="org.jboss.tools.vpe.menus.rotateEditorsCommand"
+ mnemonic="S"/>
+ <command
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"
+ icon="icons/border.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showBorderCommand"
+ mnemonic="S"/>
+ <command
+
commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ icon="icons/non-visual-tags.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showNonVisualTagsCommand"
+ mnemonic="S"/>
+ <!--command
+
commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ icon="icons/text-formatting.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showTextFormattingCommand"
+ mnemonic="S"/-->
+ <command
+
commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ icon="icons/bundle-as-el.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.menus.showBundleAsELCommand"
+ mnemonic="S"/>
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ <menuContribution
+
locationURI="toolbar:org.jboss.tools.jst.jsp.toolbars.sampleToolbar?after=org.jboss.tools.jst.jsp.toolbars.i18">
+ <command
+ commandId="org.jboss.tools.vpe.commands.preferencesCommand"
+ icon="icons/preferences.gif"
+ id="org.jboss.tools.vpe.toolbars.preferencesCommand"
+ tooltip="%vpe.toolbar.preferences">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"
+ icon="icons/refresh.gif"
+ id="org.jboss.tools.vpe.toolbars.refreshCommand"
+ tooltip="%vpe.toolbar.refresh">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+
commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"
+ icon="icons/point_to_css.gif"
+ id="org.jboss.tools.vpe.toolbars.pageDesignOptionsCommand"
+ tooltip="%vpe.toolbar.page_design_options">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"
+ icon=""
+ id="org.jboss.tools.vpe.toolbars.rotateEditorsCommand">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"
+ icon="icons/border.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showBorderCommand"
+ tooltip="%vpe.toolbar.show_border">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <command
+
commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"
+ icon="icons/non-visual-tags.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showNonVisualTagsCommand"
+ tooltip="%vpe.toolbar.show_non_visual_tags">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ <!--command
+
commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"
+ icon="icons/text-formatting.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showTextFormattingCommand"
+ tooltip="%vpe.toolbar.show_text_formatting">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command-->
+ <command
+ commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"
+ icon="icons/bundle-as-el.gif"
+ style="toggle"
+ id="org.jboss.tools.vpe.toolbars.showBundleAsELCommand"
+ tooltip="%vpe.toolbar.show_text_formatting">
+ <visibleWhen checkEnabled="false">
+ <reference
definitionId="org.jboss.tools.ui.structuredEditor"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
</extension>
<extension
point="org.eclipse.ui.menus">
@@ -144,6 +360,33 @@
</description>
</wizard>
</extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.jboss.tools.vpe.handlers.PreferencesHandler"
+ commandId="org.jboss.tools.vpe.commands.preferencesCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.RefreshHandler"
+ commandId="org.jboss.tools.vpe.commands.refreshCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.PageDesignOptionsHandler"
+
commandId="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.RotateEditorsHandler"
+
commandId="org.jboss.tools.vpe.commands.rotateEditorsCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.ShowBorderHandler"
+ commandId="org.jboss.tools.vpe.commands.showBorderCommand"/>
+ <handler
+ class="org.jboss.tools.vpe.handlers.ShowNonVisualTagsHandler"
+
commandId="org.jboss.tools.vpe.commands.showNonVisualTagsCommand"/>
+ <!--handler
+ class="org.jboss.tools.vpe.handlers.ShowTextFormattingHandler"
+
commandId="org.jboss.tools.vpe.commands.showTextFormattingCommand"/-->
+ <handler
+ class="org.jboss.tools.vpe.handlers.ShowBundleAsELHandler"
+
commandId="org.jboss.tools.vpe.commands.showBundleAsELCommand"/>
+ </extension>
</plugin>
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_left.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_top.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/source_top.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_left.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_left.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_top.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/handlers/icons/visual_top.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java 2010-10-26
13:55:56 UTC (rev 26068)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.ILocationProvider;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.util.FileUtil;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
+
+/**
+ * Handler for PageDesignOptions
+ */
+public class PageDesignOptionsHandler extends AbstractHandler {
+ /**
+ * The constructor.
+ */
+ public PageDesignOptionsHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorPart activeEditor = HandlerUtil.getActiveEditorChecked(event);
+ IEditorInput input = activeEditor.getEditorInput();
+ Object fileLocation = null;
+ if (input instanceof IFileEditorInput) {
+ IFile file = ((IFileEditorInput) input).getFile();
+ fileLocation = file;
+ } else if (input instanceof ILocationProvider) {
+ ILocationProvider provider = (ILocationProvider) input;
+ IPath path = provider.getPath(input);
+ if (path != null) {
+ fileLocation = path;
+ }
+ }
+ if (null != fileLocation) {
+ VpeResourcesDialog dialogNew = new VpeResourcesDialog(PlatformUI
+ .getWorkbench().getDisplay().getActiveShell(), fileLocation);
+ dialogNew.open();
+ } else {
+ VpePlugin.getDefault().logError(
+ VpeUIMessages.COULD_NOT_OPEN_VPE_RESOURCES_DIALOG);
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorInput input = activeEditor.getEditorInput();
+ IFile file = null;
+ if (input instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) input).getFile();
+ } else if (input instanceof ILocationProvider) {
+ ILocationProvider provider = (ILocationProvider) input;
+ IPath path = provider.getPath(input);
+ if (path != null) {
+ file = FileUtil.getFile(input, path.lastSegment());
+ }
+ }
+ return ((file != null) && (file.exists()));
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java 2010-10-26
13:55:56 UTC (rev 26068)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage;
+
+/**
+ * Handler for Preferences
+ */
+public class PreferencesHandler extends AbstractHandler {
+ /**
+ * The constructor.
+ */
+ public PreferencesHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ VpeEditorPreferencesPage.openPreferenceDialog();
+ return null;
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java 2010-10-26
13:55:56 UTC (rev 26068)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+
+/**
+ * Handler for Refresh
+ */
+public class RefreshHandler extends AbstractHandler {
+ /**
+ * The constructor.
+ */
+ public RefreshHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorPart activeEditor = HandlerUtil.getActiveEditorChecked(event);
+ if (activeEditor instanceof JSPMultiPageEditor) {
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ jspEditor.getVisualEditor().getController().visualRefresh();
+ }
+ return null;
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
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
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java 2010-10-26
13:55:56 UTC (rev 26068)
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.handlers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+/**
+ * Handler for RotateEditors
+ */
+public class RotateEditorsHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ private static List<String> layoutValues;
+ private static Map<String, String> layoutIcons;
+ private static Map<String, String> layoutNames;
+ 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$
+ private static final String ICON_ORIENTATION_VISUAI_TOP =
"icons/visual_top.gif"; //$NON-NLS-1$
+
+ static {
+ /*
+ * Values from <code>layoutValues</code> should correspond to the order
+ * when increasing the index of the array will cause the source editor
+ * rotation
+ */
+ layoutIcons = new HashMap<String, String>();
+ layoutIcons.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE,
+ ICON_ORIENTATION_SOURCE_LEFT);
+ layoutIcons.put(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE,
+ ICON_ORIENTATION_SOURCE_TOP);
+ layoutIcons.put(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE,
+ ICON_ORIENTATION_VISUAL_LEFT);
+ 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);
+
+ layoutValues = new ArrayList<String>();
+ layoutValues.add(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_SOURCE_VALUE);
+ layoutValues.add(IVpePreferencesPage.SPLITTING_VERT_TOP_SOURCE_VALUE);
+ layoutValues.add(IVpePreferencesPage.SPLITTING_HORIZ_LEFT_VISUAL_VALUE);
+ layoutValues.add(IVpePreferencesPage.SPLITTING_VERT_TOP_VISUAL_VALUE);
+ }
+
+ /**
+ * The constructor.
+ */
+ public RotateEditorsHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ IPreferenceStore preferences = JspEditorPlugin.getDefault()
+ .getPreferenceStore();
+ String orientation = preferences
+ .getString(IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING);
+ int currentOrientationIndex = layoutValues.indexOf(orientation);
+
+ /*
+ * Rotate editors orientation clockwise.
+ */
+ currentOrientationIndex++;
+ if (currentOrientationIndex >= layoutValues.size()) {
+ currentOrientationIndex = currentOrientationIndex
+ % layoutValues.size();
+ }
+
+ String newOrientation = layoutValues.get(currentOrientationIndex);
+ preferences.setValue(
+ IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING,
+ newOrientation);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ 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(
+ IVpePreferencesPage.VISUAL_SOURCE_EDITORS_SPLITTING,
+ orientation);
+ }
+
+ /*
+ * Update icon and tooltip
+ */
+ element.setIcon(ImageDescriptor.createFromFile(this.getClass(),
+ layoutIcons.get(orientation)));
+ String orientationName = layoutNames.get(orientation);
+ element.setTooltip(orientationName);
+ element.setText(orientationName);
+
+ /*
+ * Call <code>filContainer()</code> from VpeEditorPart to redraw
+ * CustomSashForm with new layout.
+ */
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (activeEditor instanceof JSPMultiPageEditor) {
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+ vpeController.getPageContext().getEditPart()
+ .fillContainer(true, orientation);
+ }
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java 2010-10-26
13:55:56 UTC (rev 26068)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.handlers;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+
+/**
+ * Handler for ShowBorder
+ */
+public class ShowBorderHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ /**
+ * The constructor.
+ */
+ public ShowBorderHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ boolean oldToggleState = HandlerUtil.toggleCommandState(event
+ .getCommand());
+ JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .setValue(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS,
+ !oldToggleState);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(activeEditor instanceof JSPMultiPageEditor)) {
+ return;
+ }
+
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+
+ boolean toggleState = JspEditorPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS);
+ /*
+ * Set new value to VpeVisualDomBuilder.
+ */
+ vpeController.getVisualBuilder().setShowBorderForUnknownTags(
+ toggleState);
+ /*
+ * Update VPE
+ */
+ vpeController.visualRefresh();
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java 2010-10-26
13:55:56 UTC (rev 26068)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.handlers;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+
+/**
+ * Handler for ShowBundleAsEL
+ */
+public class ShowBundleAsELHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ /**
+ * The constructor.
+ */
+ public ShowBundleAsELHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ boolean oldToggleState = HandlerUtil.toggleCommandState(event
+ .getCommand());
+ JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .setValue(
+ IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL,
+ !oldToggleState);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(activeEditor instanceof JSPMultiPageEditor)) {
+ return;
+ }
+
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+
+ boolean toggleState = JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .getBoolean(
+ IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL);
+
+ /*
+ * Update bundle messages.
+ */
+ vpeController.getPageContext().getBundle()
+ .updateShowBundleUsageAsEL(toggleState);
+ vpeController.visualRefresh();
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java 2010-10-26
13:55:56 UTC (rev 26068)
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.handlers;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.menus.UIElement;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
+import org.jboss.tools.vpe.editor.VpeController;
+
+/**
+ * Handler for ShowNonVisualTags
+ */
+public class ShowNonVisualTagsHandler extends AbstractHandler implements
+ IElementUpdater {
+
+ /**
+ * The constructor.
+ */
+ public ShowNonVisualTagsHandler() {
+ }
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ boolean oldToggleState = HandlerUtil.toggleCommandState(event
+ .getCommand());
+ JspEditorPlugin
+ .getDefault()
+ .getPreferenceStore()
+ .setValue(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS,
+ !oldToggleState);
+
+ Command command = event.getCommand();
+ ICommandService commandService = (ICommandService) PlatformUI
+ .getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(command.getId(), null);
+
+ return null;
+ }
+
+ @Override
+ public void updateElement(UIElement element, Map parameters) {
+
+ IEditorPart activeEditor = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(activeEditor instanceof JSPMultiPageEditor)) {
+ return;
+ }
+
+ JSPMultiPageEditor jspEditor = (JSPMultiPageEditor) activeEditor;
+ VpeController vpeController = (VpeController) jspEditor
+ .getVisualEditor().getController();
+
+ boolean toggleState = JspEditorPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IVpePreferencesPage.SHOW_NON_VISUAL_TAGS);
+ /*
+ * Change flag
+ */
+ vpeController.getVisualBuilder().setShowInvisibleTags(toggleState);
+ /*
+ * Update VPE
+ */
+ vpeController.visualRefresh();
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native