Index: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/VisualPartAbstractHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/VisualPartAbstractHandler.java	(revision 32791)
+++ 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: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java	(revision 32791)
+++ 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,31 @@
 	 */
 	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);
+		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())){
+								commandService.refreshElements(command.getId(), null);
+							}
+						} catch (NotDefinedException e) {
+							VpePlugin.reportProblem(e);
+						}
+					}
+		}
+		for (String commandId : vpeCommands) {
+			commandService.refreshElements(commandId, null);
+		}
+//		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);
 	}	
 
 	/**
