Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 1466)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java	(revision 1467)
@@ -169,6 +169,8 @@
 	 */
 	public static final String N_LINES_PER_PAGE = "n_lines_per_page"; //$NON-NLS-1$
 
+	public static final String LOCK = "locked_result";
+
 	/**
 	 * Preferences node qualifier of the instance. 
 	 */
@@ -187,6 +189,7 @@
 
 		Preferences preferences = this.getDefaultPreferencesNode();
 		preferences.putBoolean(TBXPreferences.VISIBLE, true);
+		preferences.putBoolean(TBXPreferences.LOCK, false);
 	}
 
 	/**
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1466)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1467)
@@ -97,7 +97,8 @@
 	/**
 	 * if frozen, the result is not updated when computed
 	 */
-	protected boolean frozen = false;
+	@Parameter(key=TXMPreferences.LOCK, type=Parameter.INTERNAL)
+	protected boolean locked = false;
 	
 	/**
 	 * if a method changed the internal data without **recomputing** the result, the result must be marked "altered"
@@ -333,29 +334,29 @@
 	/**
 	 * Freezes the result -> cannot be recomputed.
 	 */
-	public void freeze() {
-		this.frozen = true;
+	public void lock() {
+		this.locked = true;
 	}
 	
 	/**
 	 * Unfreezes the result -> can be recomputed.
 	 */
-	public void unfreeze() {
-		this.frozen = false;
+	public void unLock() {
+		this.locked = false;
 	}
 
 	/**
 	 * Freezes/unfreezes the result.
 	 */
-	public void setFrozen(boolean frozen) {
-		this.frozen = frozen;
+	public void setLocked(boolean state) {
+		this.locked = state;
 	}
 	
 	/**
 	 * @return true if the resutl is frozen
 	 */
-	public boolean isFrozen() {
-		return this.frozen;
+	public boolean isLocked() {
+		return this.locked;
 	}
 	
 	/**
@@ -2024,7 +2025,7 @@
 		// no changes to do
 		// FIXME: SJ: we need to do do some actions even if the object is frozen, eg. updating parameters, saving parameters, etc.
 		// FIXME MD: nope the parameters must not move and will be saved in the current state
-		if (hasBeenComputedOnce && frozen) {
+		if (hasBeenComputedOnce && locked) {
 			return true;
 		}
 		
Index: tmp/org.txm.rcp/icons/decorators/lock.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.rcp/icons/decorators/lock.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.rcp/icons/decorators/bullet_red.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.rcp/icons/decorators/bullet_red.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/SetTXMResultLockState.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/SetTXMResultLockState.java	(revision 0)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/SetTXMResultLockState.java	(revision 1467)
@@ -0,0 +1,77 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.rcp.handlers.results;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.commands.IElementUpdater;
+import org.eclipse.ui.menus.UIElement;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.core.results.TXMResult;
+import org.txm.rcp.handlers.BaseAbstractHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+
+/**
+ * Swaps the persistence state of the selected TXM result nodes.
+ * 
+ * @author sjacquot
+ * 
+ */
+public class SetTXMResultLockState extends BaseAbstractHandler implements IElementUpdater {
+
+
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		Object object = this.getCorporaViewSelectedObject(event);
+		if(object instanceof TXMResult)	{
+			TXMResult result = ((TXMResult)object);
+			result.setLocked(!result.isLocked());
+			
+			CorporaView.refreshObject(result);
+			return null;
+		}
+		else	{
+			return super.logCanNotExecuteCommand(object);
+		}
+	}
+
+	/**
+	 * Display the checked mark in the menu item when the menu is created
+	 */
+	@Override
+	public void updateElement(UIElement element, Map parameters) {
+		Object object = CorporaView.getFirstSelectedObject();
+		//element.
+		if(object != null && object instanceof TXMResult)	{
+			element.setChecked(((TXMResult)object).isLocked());
+		}
+	}
+}

Property changes on: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/SetTXMResultLockState.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapter.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapter.java	(revision 1466)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapter.java	(revision 1467)
@@ -25,7 +25,6 @@
  */
 public abstract class TXMResultAdapter extends WorkbenchAdapter {
 
-	
 	/**
 	 * Default constructor. 
 	 */
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ToolboxTester.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ToolboxTester.java	(revision 1466)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ToolboxTester.java	(revision 1467)
@@ -23,6 +23,7 @@
 	public static final String PROPERTY_SEARCH_ENGINE_READY = "SearchEngineReady"; //$NON-NLS-1$
 	public static final String PROPERTY_COMPUTABLE = "computable"; //$NON-NLS-1$
 	public static final String PROPERTY_PERSISTABLE = "persistable"; //$NON-NLS-1$
+	public static final String PROPERTY_LOCK = "lock"; //$NON-NLS-1$
  
 	public ToolboxTester() {
 		// TODO Auto-generated constructor stub
@@ -55,6 +56,21 @@
 			}
 			return false;
 //			System.out.println("TEST: receiver="+receiver+" property="+property+" args="+args+" expectedValue="+expectedValue); //$NON-NLS-1$ //$NON-NLS-2$
+		} else if (PROPERTY_LOCK.equals(property)) {
+			if (receiver == null) return false;
+			Class c = receiver.getClass();
+			if (!(receiver instanceof List)) return false;
+			
+			List list = (List) receiver;
+			if (list.size() == 0) return false;
+			receiver = list.get(0);
+			
+			if (receiver instanceof TXMResult) {
+				return !((TXMResult)receiver).isLocked();
+				//return true;
+			}
+			return false;
+//			System.out.println("TEST: receiver="+receiver+" property="+property+" args="+args+" expectedValue="+expectedValue); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		
 		return false;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 1466)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/corpora/CorporaView.java	(revision 1467)
@@ -398,6 +398,7 @@
 
 		final int IMAGE_MARGIN = 2;
 		final Image icon = IImageKeys.getImage("icons/decorators/bullet_green.png");
+		final Image icon_lock = IImageKeys.getImage("icons/decorators/lock.png");
 		//		    final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.gef","platform:/plugin/org.eclipse.gef/org/eclipse/gef/internal/icons/pinned.gif").createImage();
 		//		    final Image icon = AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.team.svn.help","platform:/plugin/org.eclipse.team.svn.help/images/lock.gif").createImage();
 
@@ -412,29 +413,23 @@
 		//		 	      }
 		//		 	   }
 		//		 	});
-		//		 	treeViewer.getTree().addListener(SWT.PaintItem, new Listener() {
-		//		 	   public void handleEvent(Event event) {
-		//		 		   if(event.item.getData() instanceof TXMResult && ((TXMResult)event.item.getData()).isUserPersistable())	{
-		//			 	      TreeItem item = (TreeItem)event.item;
-		//			 	      Image trailingImage = (Image)item.getImage();
-		//			 	      if (trailingImage != null) {
-		//			 	         //int x = event.x + event.width + IMAGE_MARGIN;
-		//			 	        int x = event.x + event.width;
-		//			 	        //int x = event.x - 20;
-		//			 	       //int x = event.x - 5;
-		//			 	         int itemHeight = treeViewer.getTree().getItemHeight();
-		//			 	         int imageHeight = trailingImage.getBounds().height;
-		//			 	         int y = event.y + (itemHeight - imageHeight) / 2;
-		//			 	        //int y = event.y + 5;
-		//			 	        
-		//			 	       event.gc.drawImage(icon, x, y); 
-		//			 	        //event.gc.drawImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED), x, y);
-		//			 	      }
-		//		 		   }
-		//		 	   }
-		//		 	});
+		treeViewer.getTree().addListener(SWT.PaintItem, new Listener() {
+			public void handleEvent(Event event) {
+				if (event.item.getData() instanceof TXMResult && ((TXMResult)event.item.getData()).isLocked())	{
+					TreeItem item = (TreeItem)event.item;
+					Image trailingImage = (Image)item.getImage();
+					if (trailingImage != null) {
+						int x = 3 + event.x + event.width;
+						int itemHeight = treeViewer.getTree().getItemHeight();
+						int imageHeight = trailingImage.getBounds().height;
+						int y = 2+event.y + (itemHeight - imageHeight) / 2;
+						
+						event.gc.drawImage(icon_lock, x, y); 
+					}
+				}
+			}
+		});
 
-
 		MenuManager menuManager = new MenuManager();
 		Menu menu = menuManager.createContextMenu(treeViewer.getTree());
 
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 1466)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1467)
@@ -430,6 +430,10 @@
 				this.topToolBar.unInstallGroup(COMPUTING_PARAMETERS_GROUP_ID);
 			}
 
+			if (getResult().isLocked()) {
+				this.firstLineComposite.setEnabled(false);
+				System.out.println("LOCKED!!!");
+			}
 
 			// disable the compute button, it will be re-enable or not later when the UI will check if the editor is dirty or not
 			ToolItem computeButton = this.topToolBar.getItemByContributionId(TOP_TOOLBAR_COMPUTE_BUTTON_ID);
@@ -611,7 +615,7 @@
 
 		// enable/disable the compute button according to dirty state of the editor
 		if (this.computeButton != null && !this.computeButton.isDisposed()) {
-			this.computeButton.setEnabled(dirty);
+			this.computeButton.setEnabled(dirty && !getResult().isLocked());
 		}
 
 		firePropertyChange(IEditorPart.PROP_DIRTY);
Index: tmp/org.txm.rcp/plugin.xml
===================================================================
--- tmp/org.txm.rcp/plugin.xml	(revision 1466)
+++ tmp/org.txm.rcp/plugin.xml	(revision 1467)
@@ -2001,6 +2001,19 @@
                </visibleWhen>
             </command>
             <command
+                  commandId="org.txm.rcp.handlers.results.SetTXMResultLockState"
+                  mode="FORCE_TEXT"
+                  style="toggle">
+               <visibleWhen
+                     checkEnabled="false">
+                  <and>
+                     <reference
+                           definitionId="OneTXMResultSelected">
+                     </reference>
+                  </and>
+               </visibleWhen>
+            </command>
+            <command
                   commandId="org.txm.rcp.commands.function.RenameResult"
                   label="%command.label.26"
                   style="push">
@@ -2614,6 +2627,12 @@
             id="org.txm.rcp.handlers.results.SetTXMResultPersistentState"
             name="%command.name.33">
       </command>
+            <command
+            categoryId="org.txm.rcp.categories.results"
+            defaultHandler="org.txm.rcp.handlers.results.SetTXMResultLockState"
+            id="org.txm.rcp.handlers.results.SetTXMResultLockState"
+            name="Lock">
+      </command>
       <command
             defaultHandler="org.txm.rcp.handlers.results.CloneTXMResult"
             id="org.txm.rcp.handlers.results.CloneTXMResult"
@@ -3073,6 +3092,12 @@
             schemeId="org.txm.rcp.scheme"
             sequence="M1+S">
       </key>
+            <key
+            commandId="org.txm.rcp.handlers.results.SetTXMResultLockState"
+            contextId="org.txm.rcp.views.corpora.CorporaView"
+            schemeId="org.txm.rcp.scheme"
+            sequence="M1+L">
+      </key>
    </extension>
 <!--   <extension
          point="org.eclipse.e4.ui.css.swt.theme">
