Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java	(revision 1415)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java	(revision 1416)
@@ -1,9 +1,9 @@
 package org.txm.rcp.editors;
 
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 
+import org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem;
 import org.eclipse.jface.action.ToolBarManager;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
@@ -22,7 +22,6 @@
 import org.txm.core.results.TXMResult;
 import org.txm.rcp.swt.GLComposite;
 import org.txm.rcp.swt.toolbar.DropDownCheckToolItem;
-import org.txm.rcp.swt.toolbar.DropDownToolItem;
 import org.txm.rcp.swt.toolbar.OpenCloseToolItem;
 
 /**
@@ -288,10 +287,31 @@
 		return this.buttons.get(groupTitle);
 	}
 	
+
+	/**
+	 * Gets a ToolItem from RCP item contribution from plugin.xml by its id.
+	 * @param id
+	 * @return
+	 */
+	public ToolItem getItemByContributionId(String id)	{
+		ToolItem item = null;
+		for (int i = 0; i < this.getItemCount(); i++) {
+			
+			if(this.getItem(i).getData() != null && this.getItem(i).getData() instanceof HandledContributionItem)	{
+				HandledContributionItem contribution = (HandledContributionItem) this.getItem(i).getData(); 
+				if(contribution.getId().equals(id))	{
+					item = this.getItem(i);
+					break;
+				}
+			}
+		}
+		return item;
+	}
+	
 	@Override
 	public void setEnabled(boolean enabled) {
 		super.setEnabled(enabled);
-		for(Control c: this.getChildren()) {
+		for(Control c : this.getChildren()) {
 		    c.setEnabled(enabled);
 		}
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1415)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1416)
@@ -36,6 +36,7 @@
 import org.eclipse.swt.layout.RowLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Menu;
@@ -535,10 +536,20 @@
 		// FIXME: old version
 		//this.result.setDirty(dirty);
         
-		ToolBarManager manager = new ToolBarManager(this.topToolBar);
-		IContributionItem[] items = manager.getItems(); 
+//		ToolBarManager manager = new ToolBarManager(this.topToolBar);
+//		IContributionItem[] items = manager.getItems(); 
 
 		
+		//this.topToolBar.setEnabled(dirty);
+		ToolItem computeButton = this.topToolBar.getItemByContributionId("compute");
+		computeButton.setEnabled(dirty);
+		
+		
+//		for(Control c : this.topToolBar.getChildren()) {
+//		    //c.setEnabled(enabled);
+//			System.out.println("TXMEditor.setDirty(): " + c);
+//		}
+		
         firePropertyChange(IEditorPart.PROP_DIRTY);
         CorporaView.refreshObject(this.result);
     }
@@ -558,6 +569,7 @@
 		// FIXME: SJ: tests
 		//dirty = this.getResult().isDirty() && this.getResult().hasBeenComputedOnce();
 		
+		
 
 		for (TXMEditorExtension<T> b : extensions) {
 			try {
Index: tmp/org.txm.rcp/plugin.xml
===================================================================
--- tmp/org.txm.rcp/plugin.xml	(revision 1415)
+++ tmp/org.txm.rcp/plugin.xml	(revision 1416)
@@ -2301,6 +2301,7 @@
          <command
                commandId="org.txm.rcp.handlers.ComputeTXMResult"
                icon="icons/functions/run.png"
+               id="compute"
                label="%command.label.36"
                style="push">
          </command>
@@ -3183,22 +3184,4 @@
             natureId="org.txm.core.CorpusNature">
       </image>
    </extension>
-   <extension
-         point="org.eclipse.ui.handlers">
-      <handler
-            class="org.txm.rcp.handlers.results.ComputeTXMResult"
-            commandId="org.txm.rcp.handlers.ComputeTXMResult">
-         <enabledWhen>
-            <test
-                  property="org.txm.rcp.testers.CurrentEditorIsDirty"
-                  value="false">
-            </test>
-         </enabledWhen>
-         <activeWhen>
-            <reference
-                  definitionId="TXMEditorActive">
-            </reference>
-         </activeWhen>
-      </handler>
-   </extension>
 </plugin>
Index: tmp/org.txm.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.rcp/META-INF/MANIFEST.MF	(revision 1415)
+++ tmp/org.txm.rcp/META-INF/MANIFEST.MF	(revision 1416)
@@ -37,7 +37,8 @@
  org.eclipse.ui.views;bundle-version="3.9.0";visibility:=reexport,
  org.txm.groovy.core;visibility:=reexport,
  org.txm.treetagger.core;visibility:=reexport,
- org.eclipse.equinox.p2.discovery.compatibility;bundle-version="1.0.201";visibility:=reexport
+ org.eclipse.equinox.p2.discovery.compatibility;bundle-version="1.0.201";visibility:=reexport,
+ org.eclipse.e4.ui.workbench.renderers.swt
 Export-Package: junit.extensions,
  junit.framework,
  junit.runner,
