Index: TXM/trunk/bundles/org.txm.queryindex.rcp/plugin.xml
===================================================================
--- TXM/trunk/bundles/org.txm.queryindex.rcp/plugin.xml	(revision 3952)
+++ TXM/trunk/bundles/org.txm.queryindex.rcp/plugin.xml	(revision 3953)
@@ -30,7 +30,7 @@
          point="org.eclipse.ui.commands">
           <command
             categoryId="org.txm.rcp.category.txm"
-            defaultHandler="org.txm.queryindex.rcp.commands.function.ComputeQueryIndex"
+            defaultHandler="org.txm.queryindex.rcp.commands.ComputeQueryIndex"
             id="org.txm.rcp.commands.function.ComputeQueryIndex"
             name="%command.name">
       </command>
Index: TXM/trunk/bundles/org.txm.queryindex.rcp/META-INF/MANIFEST.MF
===================================================================
--- TXM/trunk/bundles/org.txm.queryindex.rcp/META-INF/MANIFEST.MF	(revision 3952)
+++ TXM/trunk/bundles/org.txm.queryindex.rcp/META-INF/MANIFEST.MF	(revision 3953)
@@ -1,8 +1,9 @@
 Manifest-Version: 1.0
-Export-Package: org.txm.queryindex.core.functions,org.txm.queryindex.r
- cp.commands.function,org.txm.queryindex.rcp.commands.link,org.txm.que
- ryindex.rcp.editors,queryindexrcp,queryindexrcp.actions,queryindexrcp
- .adapters
+Export-Package: org.txm.queryindex.core.functions,
+ org.txm.queryindex.rcp.commands,
+ org.txm.queryindex.rcp.editors,
+ queryindexrcp,
+ queryindexrcp.adapters
 Bundle-SymbolicName: org.txm.queryindex.rcp;singleton:=true
 Bundle-Version: 1.0.0.qualifier
 Bundle-Name: %Bundle-Name
Index: TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/editors/QueryIndexEditor.java
===================================================================
--- TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/editors/QueryIndexEditor.java	(revision 3952)
+++ TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/editors/QueryIndexEditor.java	(revision 3953)
@@ -330,22 +330,22 @@
 							return Status.CANCEL_STATUS;
 						}
 						
-						if (monitor.isCanceled())
+						if (monitor.isCanceled()) {
 							return Status.CANCEL_STATUS;
-						
+						}
 						queryindex.sortLines(SortMode.FREQUNIT, true);
 						
-						if (monitor.isCanceled())
+						if (monitor.isCanceled()) {
 							return Status.CANCEL_STATUS;
-						
+						}
 						this.acquireSemaphore();
 						this.releaseSemaphore();
 						
 						final String message = Messages.QueryIndexEditor_3;
 						
-						if (monitor.isCanceled())
+						if (monitor.isCanceled()) {
 							return Status.CANCEL_STATUS;
-						
+						}
 						monitor.worked(95);
 						// refresh ui
 						syncExec(new Runnable() {
@@ -364,11 +364,9 @@
 								setPartName(title);
 								
 								queryWidget.memorize();
-								nblinesperpage = NLignePPageSpinner
-										.getSelection();
+								nblinesperpage = NLignePPageSpinner.getSelection();
 								
-								fillDisplayArea(0,
-										NLignePPageSpinner.getSelection());
+								fillDisplayArea(0, NLignePPageSpinner.getSelection());
 								
 								if (line != null) {
 									queryWidget.setText(""); //$NON-NLS-1$
@@ -418,7 +416,6 @@
 		
 		final Group paramArea = getExtendedParametersGroup();
 		
-		
 		GLComposite resultArea = getResultArea();
 		
 		// on créé une Query, ici le pivot de la concordance est "[]"
@@ -436,8 +433,7 @@
 		// true));
 		
 		// [ (v)]
-		queryWidget = new NamedAssistedQueryWidget(queryArea, SWT.DROP_DOWN,
-				this.corpus);
+		queryWidget = new NamedAssistedQueryWidget(queryArea, SWT.DROP_DOWN, this.corpus);
 		GridData layoutData = new GridData(GridData.FILL);
 		layoutData.horizontalAlignment = GridData.FILL;
 		layoutData.grabExcessHorizontalSpace = true;
@@ -462,15 +458,15 @@
 		loadFromFile.setEnabled(true);
 		loadFromFile.setText(Messages.QueryIndexEditor_4);
 		loadFromFile
-				.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
+		.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER));
 		loadFromFile.addSelectionListener(new SelectionListener() {
 			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				File propFile = null;
-				if (LastOpened.getFile(ID) != null)
+				if (LastOpened.getFile(ID) != null) {
 					propFile = new File(LastOpened.getFolder(ID));
-				
+				}
 				FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
 				String[] exts = { "*.properties" }; // $NON-NLS //$NON-NLS-1$
 				dialog.setFilterExtensions(exts);
@@ -560,8 +556,7 @@
 		NLignePPageSpinner.setSelection(100);
 		NLignePPageSpinner.setIncrement(1);
 		NLignePPageSpinner.setPageIncrement(100);
-		NLignePPageSpinner.setLayoutData(new GridData(
-				GridData.VERTICAL_ALIGN_END));
+		NLignePPageSpinner.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_END));
 		NLignePPageSpinner.addSelectionListener(new SelectionListener() {
 			
 			@Override
@@ -579,8 +574,7 @@
 		// infosArea.setLayout(new GridLayout(6, false));
 		
 		navigationArea = new NavigationWidget(filtercontrols, SWT.NONE);
-		navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true,
-				false));
+		navigationArea.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false));
 		
 		navigationArea.addFirstListener(new SelectionListener() {
 			
@@ -601,8 +595,7 @@
 			
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				int top = (queryindex.getV() / NLignePPageSpinner
-						.getSelection()) * NLignePPageSpinner.getSelection();
+				int top = (queryindex.getV() / NLignePPageSpinner.getSelection()) * NLignePPageSpinner.getSelection();
 				int bottom = top + NLignePPageSpinner.getSelection();
 				fillDisplayArea(top, bottom);
 				viewer.getTable().select(0);
@@ -631,8 +624,9 @@
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				int top = topLine - NLignePPageSpinner.getSelection();
-				if (top < 0)
+				if (top < 0) {
 					top = 0;
+				}
 				int bottom = top + NLignePPageSpinner.getSelection();
 				fillDisplayArea(top, bottom);
 				viewer.getTable().select(0);
@@ -652,12 +646,12 @@
 		lFminInfo = new Label(filtercontrols, SWT.NONE);
 		lFminInfo.setText(""); //$NON-NLS-1$
 		lFminInfo
-				.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+		.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
 		
 		lFmaxInfo = new Label(filtercontrols, SWT.NONE);
 		lFmaxInfo.setText(""); //$NON-NLS-1$
 		lFmaxInfo
-				.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+		.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
 		
 		// results
 		viewer = new TableViewer(resultArea, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.VIRTUAL);
@@ -665,12 +659,10 @@
 		viewer.getTable().setHeaderVisible(true);
 		viewer.getTable().addKeyListener(new TableKeyListener(viewer));
 		viewer.getTable().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
-		if (corpus != null && corpus.getProject().getFont() != null
-				&& corpus.getProject().getFont().length() > 0) {
+		if (corpus != null && corpus.getProject().getFont() != null && corpus.getProject().getFont().length() > 0) {
 			Font old = viewer.getTable().getFont();
 			FontData fD = old.getFontData()[0];
-			Font font = new Font(Display.getCurrent(), corpus.getProject().getFont(),
-					fD.getHeight(), fD.getStyle());
+			Font font = new Font(Display.getCurrent(), corpus.getProject().getFont(), fD.getHeight(), fD.getStyle());
 			viewer.getTable().setFont(font);
 		}
 		
@@ -682,9 +674,7 @@
 			
 			@Override
 			public void mouseDoubleClick(MouseEvent e) {
-				Point mouseposition = new Point(e.x
-						+ viewer.getTable().getHorizontalBar().getSelection(),
-						e.y);
+				Point mouseposition = new Point(e.x + viewer.getTable().getHorizontalBar().getSelection(), e.y);
 				int col = getPointedColumn(mouseposition);
 				if (col == 1) {
 					// IndexToConcordance.link(self,
@@ -802,47 +792,47 @@
 		// rmv/creates parts columns if needed
 		if (this.partition != null) {
 			List<String> partnames = this.partition.getPartNames();
-			if (partnames.size() > 1)
+			if (partnames.size() > 1) {
 				if (viewer.getTable().getColumnCount() < partnames.size() + 3) {
-				for (int i = 0; i < partnames.size(); i++) {
-				final TableColumn partColumn = new TableColumn(
-						viewer.getTable(), SWT.RIGHT);
-				try {
-				partColumn.setText(partnames.get(i) + " t=" + partition.getParts().get(i).getSize()); //$NON-NLS-1$
-				}
-				catch (CqiClientException e1) {
-				Log.printStackTrace(e1);
-				return;
-				}
-				partColumn.setToolTipText(partnames.get(i));
-				partColumn.setWidth(100);
-				partColumn.addSelectionListener(new SelectionListener() {
-					
-					@Override
-					public void widgetSelected(SelectionEvent e) {
-						if (viewer.getTable().getSortColumn() != partColumn) {
-							viewer.getTable().setSortColumn(partColumn);
-							viewer.getTable().setSortDirection(SWT.UP);
-							queryindex.sortLines(SortMode.FREQUNIT, false);
+					for (int i = 0; i < partnames.size(); i++) {
+						final TableColumn partColumn = new TableColumn(viewer.getTable(), SWT.RIGHT);
+						try {
+							partColumn.setText(partnames.get(i) + " t=" + partition.getParts().get(i).getSize()); //$NON-NLS-1$
 						}
-						else {
-							if (viewer.getTable().getSortDirection() == SWT.UP) {
-								viewer.getTable().setSortDirection(SWT.DOWN);
-								queryindex.sortLines(SortMode.FREQUNIT, true);
-							}
-							else {
-								viewer.getTable().setSortDirection(SWT.UP);
-								queryindex.sortLines(SortMode.FREQUNIT, false);
-							}
+						catch (CqiClientException e1) {
+							Log.printStackTrace(e1);
+							return;
 						}
-						fillDisplayArea(topLine, bottomLine);
+						partColumn.setToolTipText(partnames.get(i));
+						partColumn.setWidth(100);
+						partColumn.addSelectionListener(new SelectionListener() {
+							
+							@Override
+							public void widgetSelected(SelectionEvent e) {
+								if (viewer.getTable().getSortColumn() != partColumn) {
+									viewer.getTable().setSortColumn(partColumn);
+									viewer.getTable().setSortDirection(SWT.UP);
+									queryindex.sortLines(SortMode.FREQUNIT, false);
+								}
+								else {
+									if (viewer.getTable().getSortDirection() == SWT.UP) {
+										viewer.getTable().setSortDirection(SWT.DOWN);
+										queryindex.sortLines(SortMode.FREQUNIT, true);
+									}
+									else {
+										viewer.getTable().setSortDirection(SWT.UP);
+										queryindex.sortLines(SortMode.FREQUNIT, false);
+									}
+								}
+								fillDisplayArea(topLine, bottomLine);
+							}
+							
+							@Override
+							public void widgetDefaultSelected(SelectionEvent e) {}
+						});
 					}
-					
-					@Override
-					public void widgetDefaultSelected(SelectionEvent e) {}
-				});
 				}
-				}
+			}
 		}
 		separatorColumn = new TableColumn(viewer.getTable(), SWT.LEFT);
 		separatorColumn.setText(""); //$NON-NLS-1$
@@ -856,8 +846,8 @@
 	/**
 	 * Gets the pointed column.
 	 * 
-	 * @param mouseposition
-	 *            the mouseposition
+	 * @param mouseposition the mouseposition
+	 * 
 	 * @return the pointed column
 	 */
 	public int getPointedColumn(Point mouseposition) {
@@ -880,10 +870,10 @@
 	/**
 	 * Creates the context menu.
 	 * 
-	 * @param tableViewer
-	 *            the table viewer
+	 * @param tableViewer the table viewer
 	 */
 	private void createContextMenu(TableViewer tableViewer) {
+		
 		MenuManager menuManager = new MenuManager();
 		Menu menu = menuManager.createContextMenu(tableViewer.getTable());
 		
@@ -898,6 +888,7 @@
 	 * Initialize fields.
 	 */
 	public void initializeFields() {
+		
 		if (this.queryindex != null) {
 			
 			if (queryindex.getPartition() != null)
@@ -930,10 +921,8 @@
 	/**
 	 * Fill display area.
 	 * 
-	 * @param from
-	 *            the from
-	 * @param to
-	 *            the to
+	 * @param from the from
+	 * @param to the to
 	 */
 	public void fillDisplayArea(int from, int to) {
 		// System.out.println("call fill from "+from+" to "+to);
@@ -943,9 +932,9 @@
 		if (queryindex.getV() > 0) {
 			lines = queryindex.getLines(from, to);
 		}
-		else
+		else {
 			lines = new ArrayList<>();
-		
+		}
 		navigationArea.setInfoLineText("" + (from + 1), //$NON-NLS-1$
 				"-" + (to) + " / " + queryindex.getV()); //$NON-NLS-1$ //$NON-NLS-2$
 		navigationArea.setPreviousEnabled(from > 0);
@@ -978,9 +967,10 @@
 	 */
 	@Override
 	public String getTitleToolTip() {
+		
 		if (queryindex != null) {
-			String str = Messages.QueryIndexEditor_11;
 			
+			String str = Messages.QueryIndexEditor_11;
 			return str;
 		}
 		return ""; //$NON-NLS-1$
@@ -993,6 +983,7 @@
 	 */
 	@Override
 	public void _setFocus() {
+		
 		this.queryWidget.setFocus();
 		StatusLine.setMessage(IndexUIMessages.openingTheIndexResults);
 	}
@@ -1003,6 +994,7 @@
 	 * @return the corpus
 	 */
 	public CQPCorpus getCorpus() {
+		
 		return this.corpus;
 	}
 	
@@ -1012,16 +1004,17 @@
 	 * @return the partition
 	 */
 	public Partition getPartition() {
+		
 		return this.partition;
 	}
 	
 	/**
 	 * Sets the focus.
 	 * 
-	 * @param query
-	 *            the new focus
+	 * @param query the new focus
 	 */
 	public void setFocus(String query) {
+		
 		this.queryWidget.setText(query);
 	}
 	
@@ -1031,6 +1024,7 @@
 	 * @return the index
 	 */
 	public Object getIndex() {
+		
 		return this.queryindex;
 	}
 }
Index: TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/ComputeQueryIndex.java
===================================================================
--- TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/ComputeQueryIndex.java	(revision 0)
+++ TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/ComputeQueryIndex.java	(revision 3953)
@@ -0,0 +1,110 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// 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.queryindex.rcp.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.queryindex.core.functions.QueryIndex;
+import org.txm.queryindex.rcp.editors.QueryIndexEditor;
+import org.txm.index.rcp.messages.IndexUIMessages;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+import org.txm.rcp.editors.TXMResultEditorInput;
+import org.txm.rcp.handlers.BaseAbstractHandler;
+import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.utils.logger.Log;
+
+/**
+ * Open the Query Index Editor
+ * 
+ * @author mdecorde.
+ */
+public class ComputeQueryIndex extends BaseAbstractHandler {
+
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.function.ComputeQueryIndex"; //$NON-NLS-1$
+
+	/** The selection. */
+	private IStructuredSelection selection;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		Log.info("Compute QueryIndex: start");
+		selection = this.getCorporaViewSelection(event);
+
+		Object s = selection.getFirstElement();
+		if (s instanceof CQPCorpus) {
+			final CQPCorpus corpus = (CQPCorpus) s;
+			openEditor(corpus);
+		} else if (s instanceof Partition) {
+			final Partition partition = (Partition) s;
+			openEditor(partition);
+		} else {
+			Log.severe("Can not compute QueryIndex with: "+s);
+		}
+
+		return null;
+	}
+	
+	public static void openEditor(CQPCorpus corpus) {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		TXMResultEditorInput<QueryIndex> editorInput = new TXMResultEditorInput<QueryIndex>(new QueryIndex(corpus));
+		try {
+			StatusLine.setMessage(IndexUIMessages.openingIndexResults);
+			IEditorPart editor =  page.openEditor(editorInput,QueryIndexEditor.ID);
+			if (editor instanceof QueryIndexEditor) {
+				QueryIndexEditor voceditor = (QueryIndexEditor)editor;
+				voceditor.initializeFields();
+			}
+		} catch (Exception e) {
+			Log.printStackTrace(e);
+		}
+	}
+	
+	public static void openEditor(Partition partition) {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		TXMResultEditorInput<QueryIndex> editorInput = new TXMResultEditorInput<QueryIndex>(new QueryIndex(partition));
+		try {
+			StatusLine.setMessage(IndexUIMessages.openingIndexResults);
+			QueryIndexEditor voceditor = (QueryIndexEditor) page
+					.openEditor(editorInput, QueryIndexEditor.ID);
+			voceditor.initializeFields();
+		} catch (Exception e) {
+			Log.printStackTrace(e);
+		}
+	}
+}
\ No newline at end of file

Property changes on: TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/ComputeQueryIndex.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/QueryIndexToLexicalTable.java
===================================================================
--- TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/QueryIndexToLexicalTable.java	(revision 0)
+++ TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/QueryIndexToLexicalTable.java	(revision 3953)
@@ -0,0 +1,138 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// 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.queryindex.rcp.commands;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.lexicaltable.rcp.messages.LexicalTableUIMessages;
+import org.txm.queryindex.core.functions.QueryIndex;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.messages.TXMUIMessages;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.utils.logger.Log;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class IndexToLexicalTable.
+ */
+public class QueryIndexToLexicalTable extends AbstractHandler {
+
+	/** The window. */
+	private IWorkbenchWindow window;
+	
+	/** The selection. */
+	private IStructuredSelection selection;
+	private static Shell shell;
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// TODO Auto-generated method stub
+		window = HandlerUtil.getActiveWorkbenchWindow(event);
+		selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+		shell = HandlerUtil.getActiveWorkbenchWindowChecked(event)
+		.getShell();
+		return null;
+	}
+
+	/**
+	 * Builds the lexical table.
+	 *
+	 * @param qindex the voc
+	 * @param from the from
+	 * @param to the to
+	 * @return true, if successful
+	 */
+	public boolean buildLexicalTable(QueryIndex qindex, int from, int to) {
+		LexicalTable table;
+		Partition partition;
+		Property property;
+
+		if (!qindex.isComputedWithPartition()) {
+			
+			System.out.println(TXMUIMessages.cannotCreateALexicalTableFromAnIndexCreatedWithACorpusMoreThanOneColumnIsNeeded);
+			StatusLine.setMessage(TXMUIMessages.cannotCreateALexicalTableFromAnIndexCreatedWithACorpusMoreThanOneColumnIsNeeded);
+			return false;
+		}
+
+		Log.info(LexicalTableUIMessages.openingMargeConfigurationDialog);
+		ArrayList<String> choices = new ArrayList<String>();
+		choices.add(LexicalTableUIMessages.useAllOccurrences);
+		choices.add(LexicalTableUIMessages.userIndexOccurrences);
+		ListSelectionDialog dialog = new ListSelectionDialog(shell, 
+				choices, new ArrayContentProvider(), new LabelProvider(), 
+				LexicalTableUIMessages.selectWhichMarginsYouWantToUse);
+		
+		int ret = dialog.open();
+		//System.out.println("ret= "+ret);
+		if (ret != dialog.OK) {
+			return false;
+		}
+		
+		// TODO: fix line 119
+//		try {
+//			table = LexicalTableImpl.createLexicalTableImpl(voc, QuantitativeDataStructureImpl
+//					.createSymbole(LexicalTableImpl.class));
+//			partition = voc.getPartition();
+//			property = voc.getCorpus().getProperties().get(0);
+//		} catch (Exception e) {
+//			org.txm.utils.logger.Log.printStackTrace(e);
+//			return false;
+//		}
+//
+//		try {
+//			IWorkbenchWindow window = PlatformUI.getWorkbench()
+//					.getActiveWorkbenchWindow();
+//			IWorkbenchPage page = window.getActivePage();
+//			LexicalTableEditorInput editorInput = new LexicalTableEditorInput(
+//					table, partition, property);
+//			StatusLine.setMessage(RCPMessages.ComputeLexicalTable_10);
+//			page
+//					.openEditor(editorInput,
+//							"org.txm.rcp.editors.lexicaltable.LexicalTableEditor"); //$NON-NLS-1$
+//		} catch (PartInitException e) {
+//			org.txm.utils.logger.Log.printStackTrace(e);
+//		} 
+
+		return false;
+	}
+
+}
\ No newline at end of file

Property changes on: TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/commands/QueryIndexToLexicalTable.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/core/functions/QueryIndex.java
===================================================================
--- TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/core/functions/QueryIndex.java	(revision 3952)
+++ TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/core/functions/QueryIndex.java	(revision 3953)
@@ -20,7 +20,6 @@
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.model.IWorkbenchAdapter;
 import org.txm.core.messages.TXMCoreMessages;
-import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
 import org.txm.index.core.functions.LineComparator.SortMode;
 import org.txm.index.core.messages.IndexCoreMessages;
@@ -45,26 +44,13 @@
 	LinkedHashMap<String, QueryIndexLine> lines = new LinkedHashMap<>();
 	
 	List<String> partnames;
-	// private int FilterFmin;
-	// private int FilterFmax;
-	// private int FilterVmax;
+
 	
-	// public int getFilterFmin() {
-	// return FilterFmin;
-	// }
-	//
-	// public int getFilterFmax() {
-	// return FilterFmax;
-	// }
-	//
-	// public int getFilterVmax() {
-	// return FilterVmax;
-	// }
-	
 	/** The writer. */
 	private OutputStreamWriter writer;
 	
 	public int getT() {
+		
 		int t = 0;
 		for (QueryIndexLine line : lines.values()) {
 			t += line.getFrequency();
@@ -73,6 +59,7 @@
 	}
 	
 	public int getFmin() {
+		
 		int t = Integer.MAX_VALUE;
 		for (QueryIndexLine line : lines.values()) {
 			int f = line.getFrequency();
@@ -82,6 +69,7 @@
 	}
 	
 	public int getFmax() {
+		
 		int t = 0;
 		for (QueryIndexLine line : lines.values()) {
 			int f = line.getFrequency();
@@ -95,6 +83,7 @@
 	}
 	
 	public QueryIndex(CQPCorpus corpus) {
+		
 		super(corpus);
 		this.corpus = corpus;
 		partnames = Arrays.asList(corpus.getName());
@@ -103,12 +92,15 @@
 	
 	@Override
 	public String getName() {
-		if (partition != null)
+		
+		if (partition != null) {
 			return partition.getName();
+		}
 		return corpus.getName();
 	}
 	
 	public QueryIndex(Partition partition) {
+		
 		super(partition);
 		this.corpus = partition.getParent();
 		this.partition = partition;
@@ -117,14 +109,17 @@
 	}
 	
 	public CQPCorpus getCorpus() {
+		
 		return corpus;
 	}
 	
 	public Partition getPartition() {
+		
 		return partition;
 	}
 	
 	public Collection<QueryIndexLine> getLines() {
+		
 		return lines.values();
 	}
 	
@@ -198,19 +193,15 @@
 		lines = sortedMap;
 	}
 	
-	// public void cut(int vmax) {
-	// System.out.println("TODO cut tmax="+vmax );
-	// this.FilterVmax = vmax;
-	// }
-	
 	public boolean isComputedWithPartition() {
+		
 		return partition != null;
 	}
 	
 	public void addLinesFromFile(File propFile) throws CqiClientException, IOException {
-		BufferedReader reader = new BufferedReader(new InputStreamReader(
-				new FileInputStream(propFile), "UTF-8")); //$NON-NLS-1$
 		
+		BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(propFile), "UTF-8")); //$NON-NLS-1$
+		
 		String line = reader.readLine();
 		while (line != null) {
 			String[] split = line.split("=", 2); //$NON-NLS-1$
@@ -240,6 +231,7 @@
 	 */
 	@Override
 	public boolean _toTxt(File outfile, String encoding, String colseparator, String txtseparator) {
+		
 		try {
 			toTxt(outfile, 0, lines.size(), encoding, colseparator, txtseparator);
 		}
@@ -264,6 +256,7 @@
 	 */
 	public void toTxt(File outfile, int from, int to, String encoding, String colseparator, String txtseparator)
 			throws CqiClientException, IOException {
+		
 		// NK: writer declared as class attribute to perform a clean if the operation is interrupted
 		this.writer = new OutputStreamWriter(new FileOutputStream(outfile),
 				encoding);
@@ -291,10 +284,12 @@
 	}
 	
 	public List<String> getPartnames() {
+		
 		return partnames;
 	}
 	
 	public QueryIndexLine addLine(String name, CQLQuery query) throws CqiClientException {
+		
 		if (lines.containsKey(name)) return null;
 		QueryResult[] qresults;
 		if (partition != null) {
@@ -317,6 +312,7 @@
 	}
 	
 	public LexicalTable toLexicalTable() {
+		
 		if (partition == null) return null;
 		
 		int npart = partition.getPartsCount();
@@ -354,6 +350,7 @@
 	}
 	
 	public boolean removeLine(String name) {
+		
 		if (lines.containsKey(name)) {
 			lines.remove(name);
 			return true;
@@ -364,10 +361,12 @@
 	}
 	
 	public boolean hasLine(String name) {
+		
 		return lines.containsKey(name);
 	}
 	
 	public ArrayList<QueryIndexLine> getLines(int from, int to) {
+		
 		if (lines.size() == 0) return new ArrayList<>();
 		
 		if (from < 0) from = 0;
@@ -388,6 +387,7 @@
 	
 	@Override
 	public void clean() {
+		
 		try {
 			this.writer.flush();
 			this.writer.close();
@@ -399,6 +399,7 @@
 	
 	@Override
 	public Object getAdapter(Class adapterType) {
+		
 		if (adapterType == IWorkbenchAdapter.class)
 			return queryindexAdapter;
 		return null;
@@ -437,16 +438,19 @@
 	
 	@Override
 	public String getSimpleName() {
+		
 		return ""; //$NON-NLS-1$
 	}
 	
 	@Override
 	public String getDetails() {
+		
 		return ""; //$NON-NLS-1$
 	}
 	
 	@Override
 	public boolean canCompute() {
+		
 		return corpus != null || partition != null;
 	}
 	
@@ -473,7 +477,8 @@
 	
 	@Override
 	public String getResultType() {
-		return "Query index"; //$NON-NLS-1$
+		
+		return "Query Index"; //$NON-NLS-1$
 	}
 	
 }
Index: TXM/trunk/bundles/org.txm.queryindex.rcp/src/queryindexrcp/actions/SampleAction.java
===================================================================
--- TXM/trunk/bundles/org.txm.queryindex.rcp/src/queryindexrcp/actions/SampleAction.java	(revision 3952)
+++ TXM/trunk/bundles/org.txm.queryindex.rcp/src/queryindexrcp/actions/SampleAction.java	(revision 3953)
@@ -1,64 +0,0 @@
-package queryindexrcp.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * Our sample action implements workbench action delegate.
- * The action proxy will be created by the workbench and
- * shown in the UI. When the user tries to use the action,
- * this delegate will be created and execution will be 
- * delegated to it.
- * @see IWorkbenchWindowActionDelegate
- */
-public class SampleAction implements IWorkbenchWindowActionDelegate {
-	private IWorkbenchWindow window;
-	/**
-	 * The constructor.
-	 */
-	public SampleAction() {
-	}
-
-	/**
-	 * The action has been activated. The argument of the
-	 * method represents the 'real' action sitting
-	 * in the workbench UI.
-	 * @see IWorkbenchWindowActionDelegate#run
-	 */
-	public void run(IAction action) {
-		MessageDialog.openInformation(
-			window.getShell(),
-			"QueryIndexRCP", //$NON-NLS-1$
-			"Hello, Eclipse world"); //$NON-NLS-1$
-	}
-
-	/**
-	 * Selection in the workbench has been changed. We 
-	 * can change the state of the 'real' action here
-	 * if we want, but this can only happen after 
-	 * the delegate has been created.
-	 * @see IWorkbenchWindowActionDelegate#selectionChanged
-	 */
-	public void selectionChanged(IAction action, ISelection selection) {
-	}
-
-	/**
-	 * We can use this method to dispose of any system
-	 * resources we previously allocated.
-	 * @see IWorkbenchWindowActionDelegate#dispose
-	 */
-	public void dispose() {
-	}
-
-	/**
-	 * We will cache window object in order to
-	 * be able to provide parent shell for the message dialog.
-	 * @see IWorkbenchWindowActionDelegate#init
-	 */
-	public void init(IWorkbenchWindow window) {
-		this.window = window;
-	}
-}
\ No newline at end of file
