Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PreferencesHandler.java	(working copy)
@@ -19,7 +19,6 @@
  * Handler for Preferences
  */
 public class PreferencesHandler extends VisualPartAbstractHandler {
-	public static final String COMMAND_ID = "org.jboss.tools.vpe.commands.preferencesCommand"; //$NON-NLS-1$
 	/**
 	 * the command has been executed, so extract extract the needed information
 	 * from the application context.
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java	(working copy)
@@ -20,27 +20,18 @@
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.ISources;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.editors.text.ILocationProvider;
 import org.eclipse.ui.handlers.HandlerUtil;
-import org.jboss.tools.common.resref.core.ResourceReference;
 import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
-import org.jboss.tools.vpe.VpePlugin;
 import org.jboss.tools.vpe.editor.VpeController;
-import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
 import org.jboss.tools.vpe.editor.preferences.VpeResourcesDialogFactory;
 import org.jboss.tools.vpe.editor.util.FileUtil;
-import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.jboss.tools.vpe.messages.VpeUIMessages;
-import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
 
 /**
  * Handler for PageDesignOptions
  */
 public class PageDesignOptionsHandler extends VisualPartAbstractHandler {
 	
-	public static final String COMMAND_ID="org.jboss.tools.vpe.commands.pageDesignOptionsCommand"; //$NON-NLS-1$
-
 	/**
 	 * the command has been executed, so extract extract the needed information
 	 * from the application context.
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java	(working copy)
@@ -37,8 +37,6 @@
  */
 public class RotateEditorsHandler extends VisualPartAbstractHandler{
 	
-	public static final String COMMAND_ID="org.jboss.tools.vpe.commands.rotateEditorsCommand"; //$NON-NLS-1$
-	
 	private static List<String> layoutValues;
 	private static Map<String, String> layoutIcons;
 	private static Map<String, String> layoutNames;
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RefreshHandler.java	(working copy)
@@ -22,7 +22,6 @@
  */
 public class RefreshHandler extends VisualPartAbstractHandler {
 	
-	public static final String COMMAND_ID = "org.jboss.tools.vpe.commands.refreshCommand"; //$NON-NLS-1$
 	/**
 	 * the command has been executed, so extract extract the needed information
 	 * from the application context.
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java	(working copy)
@@ -18,7 +18,6 @@
  * Handler for ShowBorder
  */
 public class ShowBorderHandler extends ShowOptionAbstractHandler {
-	public static final String COMMAND_ID = "org.jboss.tools.vpe.commands.showBorderCommand"; //$NON-NLS-1$
 
 	@Override
 	public String getPreferenceKey() {
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java	(working copy)
@@ -18,7 +18,6 @@
  * Handler for ShowNonVisualTags
  */
 public class ShowNonVisualTagsHandler extends ShowOptionAbstractHandler {
-	public static final String COMMAND_ID = "org.jboss.tools.vpe.commands.showNonVisualTagsCommand"; //$NON-NLS-1$
 
 	@Override
 	protected void toogleShow(VpeController vpeController,
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/VisualPartAbstractHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/VisualPartAbstractHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/VisualPartAbstractHandler.java	(working copy)
@@ -29,6 +29,7 @@
  */
 public abstract class VisualPartAbstractHandler extends AbstractHandler
 		implements IElementUpdater {
+	public static final String VPE_CATEGORY_ID="org.jboss.tools.vpe.category"; //$NON-NLS-1$
 	@Override
 	public void setEnabled(Object evaluationContext) {
 		boolean enabled = false;
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java	(working copy)
@@ -18,8 +18,6 @@
  * Handler for ShowBundleAsEL
  */
 public class ShowBundleAsELHandler extends ShowOptionAbstractHandler {
-	public static final String COMMAND_ID = "org.jboss.tools.vpe.commands.showBundleAsELCommand"; //$NON-NLS-1$
-
 	@Override
 	public String getPreferenceKey() {
 		return IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL;
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java	(working copy)
@@ -11,17 +11,12 @@
 
 package org.jboss.tools.vpe.handlers;
 
-import java.util.Map;
-
-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.IEditorReference;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
 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;
@@ -33,8 +28,6 @@
  * Handler for ShowTextFormatting
  */
 public class ShowTextFormattingHandler extends VisualPartAbstractHandler {
-	public static final String COMMAND_ID = "org.jboss.tools.vpe.commands.showTextFormattingCommand"; //$NON-NLS-1$
-
 	/**
 	 * the command has been executed, so extract extract the needed information
 	 * from the application context.
Index: /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java	(revision 32838)
+++ /home/mareshkau/Projects/jboss/trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java	(working copy)
@@ -13,10 +13,13 @@
 import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
 
 import java.text.MessageFormat;
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -136,6 +139,7 @@
 import org.jboss.tools.vpe.handlers.ShowBundleAsELHandler;
 import org.jboss.tools.vpe.handlers.ShowNonVisualTagsHandler;
 import org.jboss.tools.vpe.handlers.ShowTextFormattingHandler;
+import org.jboss.tools.vpe.handlers.VisualPartAbstractHandler;
 import org.jboss.tools.vpe.messages.VpeUIMessages;
 import org.jboss.tools.vpe.resref.core.AbsoluteFolderReferenceList;
 import org.jboss.tools.vpe.resref.core.CSSReferenceList;
@@ -211,6 +215,7 @@
 	private UIJob reinitJob;
 	private IZoomEventManager zoomEventManager;
 	private VpeDropWindow dropWindow = null;
+	private static List<String> vpeCommands = null;
 
 	/**
 	 * Added by Max Areshkau JBIDE-675, stores information about modification
@@ -2478,15 +2483,26 @@
 	 */
 	public void refreshCommands(){
 		ICommandService commandService = (ICommandService) PlatformUI
-		.getWorkbench().getService(ICommandService.class);
-		commandService.refreshElements(ShowTextFormattingHandler.COMMAND_ID, null);
-		commandService.refreshElements(RotateEditorsHandler.COMMAND_ID, null);
-		commandService.refreshElements(ShowNonVisualTagsHandler.COMMAND_ID, null);
-		commandService.refreshElements(ShowBundleAsELHandler.COMMAND_ID, null);
-		commandService.refreshElements(ShowBorderHandler.COMMAND_ID, null);
-		commandService.refreshElements(RefreshHandler.COMMAND_ID, null);
-		commandService.refreshElements(PreferencesHandler.COMMAND_ID, null);
-		commandService.refreshElements(PageDesignOptionsHandler.COMMAND_ID, null);
+				.getWorkbench().getService(ICommandService.class);
+		//init VPE Commands List if its has not been initialized
+		if(vpeCommands==null){
+			vpeCommands = new ArrayList<String>();
+					Command [] definedCommands = commandService.getDefinedCommands();
+					for (Command command : definedCommands) {
+						try {
+							if(VisualPartAbstractHandler.VPE_CATEGORY_ID.equals(command.getCategory().getId())){
+								//collecting vpe category commands
+								vpeCommands.add(command.getId());
+							}
+						} catch (NotDefinedException e) {
+							VpePlugin.reportProblem(e);
+						}
+					}
+		}
+		//just refresh state of commands
+		for (String commandId : vpeCommands) {
+			commandService.refreshElements(commandId, null);
+		}
 	}	
 
 	/**
