Revision 1196

tmp/org.txm.index.rcp/plugin.xml (revision 1196)
306 306
                  ifEmpty="false"
307 307
                  operator="and">
308 308
               <instanceof
309
                     value="org.txm.index.core.functions.Index">
309
                     value="org.txm.index.core.functions.PartitionIndex">
310 310
               </instanceof>
311 311
            </iterate>
312 312
         </with>
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 1196)
535 535
			return assistedQueryWidget.getRawString();
536 536
		}
537 537
	}
538
	
539
	@Override
540
	public void setFocus() {
541
		// TODO Auto-generated method stub
542
		if (queryWidget != null && !queryWidget.isDisposed()) {
543
			queryWidget.setFocus();
544
		}
545
	}
538 546

  
539 547
	/**
540 548
	 * Checks if the specified query already exists or not.
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 1196)
104 104
	public LexicalTable(CQPCorpus corpus) throws Exception {
105 105
		//this(corpus, corpus.getDefaultProperty(), null);
106 106
		super(corpus);
107
		this.setUnitProperty(corpus.getDefaultProperty());
107 108
	}
108 109

  
109 110
//	/**
......
124 125
	 */
125 126
	public LexicalTable(PartitionIndex index)	{
126 127
		super(index);
128
		
129
		this.property = index.getProperties().get(0);
130
		this.useAllOccurrences = true;
127 131
	}
128 132

  
129 133
	/**
tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZPager.groovy (revision 1196)
13 13
import org.txm.importer.xtz.*
14 14
import javax.xml.stream.*
15 15
import org.txm.objects.*
16
import org.txm.importer.ApplyXsl2
16 17

  
17 18
class XTZPager extends Pager {
18 19

  
tmp/org.txm.ca.rcp/plugin.xml (revision 1196)
12 12
         point="org.eclipse.ui.menus">
13 13
      <menuContribution
14 14
            allPopups="false"
15
            locationURI="toolbar:org.txm.rcp.toolbartools?after=org.txm.index.rcp.handlers.ComputePartitionIndex">
15
            locationURI="toolbar:org.txm.rcp.toolbartools?after=org.txm.specificities.rcp.handlers.ComputeSpecifities">
16 16
         <command
17 17
               commandId="org.txm.ca.rcp.handlers.ComputeCA"
18 18
               icon="icons/ca.png"
......
29 29
                  <reference
30 30
                        definitionId="OneICAComputableSelected">
31 31
                  </reference>
32
                  <reference
33
                        definitionId="OnePartitionIndexSelected">
34
                  </reference>
32 35
               </or>
33 36
            </visibleWhen>
34 37
         </command>
35 38
      </menuContribution>
36 39
      <menuContribution
37 40
            allPopups="false"
38
            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.rcp.corporaview.tools.stat">
41
            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.specificities.rcp.handlers.ComputeSpecifities">
39 42
         <command
40 43
               commandId="org.txm.ca.rcp.handlers.ComputeCA"
41 44
               icon="icons/ca.png"
......
52 55
                  <reference
53 56
                        definitionId="OneICAComputableSelected">
54 57
                  </reference>
58
                  <reference
59
                        definitionId="OnePartitionIndexSelected">
60
                  </reference>
55 61
               </or>
56 62
            </visibleWhen>
57 63
         </command>
......
74 80
                  <reference
75 81
                        definitionId="OneICAComputableSelected">
76 82
                  </reference>
83
                  <reference
84
                        definitionId="OnePartitionIndexSelected">
85
                  </reference>
77 86
               </or>
78 87
            </visibleWhen>
79 88
         </command>
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java (revision 1196)
41 41
import org.txm.ca.rcp.editors.CAParametersDialog;
42 42
import org.txm.ca.rcp.messages.CAUIMessages;
43 43
import org.txm.core.messages.TXMCoreMessages;
44
import org.txm.index.core.functions.PartitionIndex;
44 45
import org.txm.lexicaltable.core.functions.LexicalTable;
45 46
import org.txm.rcp.StatusLine;
46 47
import org.txm.rcp.TXMWindows;
......
126 127
				// does not work at this time because of some problems in CAEditor (refreshing and components creation + eigenvalues computing)
127 128
//				ca = new CA(new LexicalTable(partition));
128 129
			}
130
			else if (selection instanceof PartitionIndex) {
131
				PartitionIndex index = (PartitionIndex) selection;
132
				Property property = index.getProperties().get(0);
133
				
134
				if (index.getPartition().getPartsCount() < 4) {
135
					// FIXME: remove this swing code that freeze the UI
136
					MessageBox.error(CAUIMessages.ComputeCorrespondanceAnalysis_13);
137
					return null;
138
				}
139
				if (index.hasBeenComputedOnce() && index.getAllLines().size() < 4) {
140
					// FIXME: remove this swing code that freeze the UI
141
					MessageBox.error(CAUIMessages.ComputeCorrespondanceAnalysis_1);
142
					return null;
143
				}
144

  
145
				Log.info(NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_0, index, property));
146
				ca = new CA(new LexicalTable(index));
147
			}
129 148
			// Creating from Lexical Table
130 149
			else if (selection instanceof LexicalTable) {
131 150
				LexicalTable lexicalTable = (LexicalTable) selection;
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java (revision 1196)
44 44
import org.txm.chartsengine.rcp.editors.ChartEditor;
45 45
import org.txm.core.messages.TXMCoreMessages;
46 46
import org.txm.core.preferences.TXMPreferences;
47
import org.txm.index.core.functions.PartitionIndex;
47 48
import org.txm.lexicaltable.core.functions.LexicalTable;
48 49
import org.txm.rcp.handlers.BaseAbstractHandler;
49 50
import org.txm.searchengine.cqp.corpus.Partition;
......
79 80
			ahc = (AHC) selection;
80 81
		}
81 82
		// creates from CA
82
		else if (selection instanceof CA) {
83
		else if (selection instanceof CA) { // the CA is visible only when the selection is a CA
83 84
			ahc = new AHC((CA) selection);
84 85
		}
86
		else if (selection instanceof PartitionIndex) {
87
			PartitionIndex index = (PartitionIndex)selection;
88
			CA ca = new CA(new LexicalTable(index));
89
			ca.setVisible(false);
90
			ahc = new AHC(ca);
91
		}
85 92
		// creates from LexicalTable
86 93
		else if (selection instanceof LexicalTable) {
87 94
			LexicalTable lexicaltable = (LexicalTable) selection;
88
			ahc = new AHC(new CA(lexicaltable));
95
			CA ca = new CA(lexicaltable);
96
			ca.setVisible(false);
97
			ahc = new AHC(ca);
89 98
		}
90 99
		// creates from Partition
91 100
		else if (selection instanceof Partition) {
tmp/org.txm.ahc.rcp/plugin.xml (revision 1196)
33 33
                  <reference
34 34
                        definitionId="OnePartitionSelected">
35 35
                  </reference>
36
                  <reference
37
                        definitionId="OnePartitionIndexSelected">
38
                  </reference>
36 39
               </or>
37 40
            </visibleWhen>
38 41
         </command>
39 42
      </menuContribution>
40 43
      <menuContribution
41 44
            allPopups="false"
42
            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.rcp.corporaview.tools.stat">
45
            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.ca.rcp.handlers.ComputeCA">
43 46
         <command
44 47
               commandId="org.txm.cah.rcp.handlers.ComputeAHC"
45 48
               icon="icons/cah.png"
46
               style="push">
49
               style="push"
50
               tooltip="%command.tooltip">
47 51
            <visibleWhen
48 52
                  checkEnabled="false">
49 53
               <or>
......
56 60
                  <reference
57 61
                        definitionId="OnePartitionSelected">
58 62
                  </reference>
63
                  <reference
64
                        definitionId="OnePartitionIndexSelected">
65
                  </reference>
59 66
               </or>
60 67
            </visibleWhen>
61 68
         </command>
62 69
      </menuContribution>
63 70
      <menuContribution
64
            locationURI="menu:menu.tools">
71
            locationURI="menu:menu.tools?after=org.txm.ca.rcp.handlers.ComputeCA">
65 72
         <command
66 73
               commandId="org.txm.cah.rcp.handlers.ComputeAHC"
67 74
               icon="icons/cah.png"
68
               style="push">
75
               style="push"
76
               tooltip="%command.tooltip">
69 77
            <visibleWhen
70 78
                  checkEnabled="false">
71 79
               <or>
......
78 86
                  <reference
79 87
                        definitionId="OnePartitionSelected">
80 88
                  </reference>
89
                  <reference
90
                        definitionId="OnePartitionIndexSelected">
91
                  </reference>
81 92
               </or>
82 93
            </visibleWhen>
83 94
         </command>
tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ToolboxTester.java (revision 1196)
1 1
package org.txm.rcp.testers;
2 2

  
3
import java.util.ArrayList;
4
import java.util.List;
5

  
3 6
import org.eclipse.core.expressions.PropertyTester;
4 7
import org.txm.Toolbox;
5 8
import org.txm.core.engines.EngineType;
9
import org.txm.core.results.TXMResult;
6 10
import org.txm.searchengine.cqp.CQPSearchEngine;
7 11

  
8 12
/**
......
17 21
	
18 22
	public static final String PROPERTY_STATE_ENGINE_READY = "StateEngineReady"; //$NON-NLS-1$
19 23
	public static final String PROPERTY_SEARCH_ENGINE_READY = "SearchEngineReady"; //$NON-NLS-1$
24
	public static final String PROPERTY_COMPUTABLE = "computable"; //$NON-NLS-1$
25
	public static final String PROPERTY_PERSISTABLE = "persistable"; //$NON-NLS-1$
20 26
 
21 27
	public ToolboxTester() {
22 28
		// TODO Auto-generated constructor stub
......
31 37
		} else if (PROPERTY_SEARCH_ENGINE_READY.equals(property)) {
32 38
			System.out.println("TEST: "+property+" = "+CQPSearchEngine.isInitialized()); //$NON-NLS-1$ //$NON-NLS-2$
33 39
			return CQPSearchEngine.isInitialized();
40
		} else if (PROPERTY_COMPUTABLE.equals(property)) {
41
			System.out.println("TEST: receiver="+receiver+" property="+property+" args="+args+" expectedValue="+expectedValue); //$NON-NLS-1$ //$NON-NLS-2$
42
			return false;
43
		} else if (PROPERTY_PERSISTABLE.equals(property)) {
44
			if (receiver == null) return false;
45
			Class c = receiver.getClass();
46
			if (!(receiver instanceof List)) return false;
47
			
48
			List list = (List) receiver;
49
			if (list.size() == 0) return false;
50
			receiver = list.get(0);
51
			
52
			if (receiver instanceof TXMResult) {
53
				return !((TXMResult)receiver).isInternalPersistable();
54
				//return true;
55
			}
56
			return false;
57
//			System.out.println("TEST: receiver="+receiver+" property="+property+" args="+args+" expectedValue="+expectedValue); //$NON-NLS-1$ //$NON-NLS-2$
34 58
		}
35 59
		
36 60
		return false;
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1196)
362 362
				this.topToolBar.unInstallGroup(COMPUTING_PARAMETERS_GROUP_ID);
363 363
			}
364 364

  
365
		}
366
		catch(Throwable e) {
365
		} catch(Throwable e) {
367 366
			Log.severe("TXMEditor.createPartControl(): can not create the editor for result " + this.getResult() + "."); //$NON-NLS-1$  //$NON-NLS-2$
368 367
			e.printStackTrace();
369 368
			createPartControlDoneSucessfully = false;
......
530 529
	@Override
531 530
	public void setFocus() {
532 531
		// TODO Auto-generated method stub
532
		if (mainParametersComposite != null && !mainParametersComposite.isDisposed()) {
533
			mainParametersComposite.setFocus();
534
		}
533 535
	}
534 536

  
535 537
	@SuppressWarnings("unchecked")
......
725 727
			// computing the result only if the editor wasn't already opened
726 728
			if (!wasAlreadyOpened)	{
727 729
				editor.compute(false);
730
			} else {
731
				editor.setFocus();
728 732
			}
729 733
		}
730 734
		catch (Exception e) {
......
780 784

  
781 785
		// FIXME: debug test to not draw while updating the widgets
782 786
		this.getContainer().setRedraw(true);
787
		
788
		// focus in the main widget 
789
		this.setFocus();
783 790

  
784

  
785 791
		// FIXME: update all open editors of the children result
786 792
		// FIXME: prob here is that updateEditorFromResult() doesn't enough because the compute() method does some other stuff
787 793
		// so the cascade computing may be done here rather than in TXMResult.compute() or we need to move some stuff from TXMEditor.compute() to
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/AssistedChoiceQueryWidget.java (revision 1196)
88 88

  
89 89
		List<SearchEngine> engines = SearchEnginesManager.getAvailableEngines(corpus);
90 90

  
91
		//if (engines.size() > 1) {
91
		if (engines.size() > 1) {
92 92
			ComboViewer combo = new ComboViewer(this);
93 93
			Combo ccombo = combo.getCombo();
94 94
			combo.setContentProvider(new ListContentProvider());
......
113 113
					querywidget.setSearchEngine(se);
114 114
				}
115 115
			});
116
		//}
116
		}
117 117

  
118 118
		magicstick = new Button(this, SWT.PUSH);
119 119
		magicstick.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
tmp/org.txm.rcp/plugin.xml (revision 1196)
955 955
                     checkEnabled="false">
956 956
                  <or>
957 957
                     <reference
958
                           definitionId="OneBaseSelected">
959
                     </reference>
960
                     <reference
961
                           definitionId="OneConcordanceSelected">
962
                     </reference>
963
                     <reference
964
                           definitionId="OneCorpusSelected">
965
                     </reference>
966
                     <reference
967
                           definitionId="OneLexicalTableSelected">
968
                     </reference>
969
                     <reference
970
                           definitionId="OneLexiconSelected">
971
                     </reference>
972
                     <reference
973
                           definitionId="OnePartitionSelected">
974
                     </reference>
975
                     <reference
976
                           definitionId="OneTxmObjectSelected">
977
                     </reference>
978
                     <reference
979 958
                           definitionId="OneTXMResultSelected">
980 959
                     </reference>
981 960
                  </or>
......
1391 1370
                     checkEnabled="false">
1392 1371
                  <or>
1393 1372
                     <reference
1394
                           definitionId="OneBaseSelected">
1395
                     </reference>
1396
                     <reference
1397
                           definitionId="OneConcordanceSelected">
1398
                     </reference>
1399
                     <reference
1400
                           definitionId="OneCorpusSelected">
1401
                     </reference>
1402
                     <reference
1403
                           definitionId="OneLexicalTableSelected">
1404
                     </reference>
1405
                     <reference
1406
                           definitionId="OneLexiconSelected">
1407
                     </reference>
1408
                     <reference
1409
                           definitionId="OnePartitionSelected">
1410
                     </reference>
1411
                     <reference
1412
                           definitionId="OneTxmObjectSelected">
1413
                     </reference>
1414
                     <reference
1415 1373
                           definitionId="OneTXMResultSelected">
1416 1374
                     </reference>
1417 1375
                  </or>
......
1437 1395
                  name="org.txm.rcp.separator1"
1438 1396
                  visible="true">
1439 1397
            </separator>
1398
            <separator
1399
                  name="org.txm.rcp.toolbartools.stats"
1400
                  visible="true">
1401
            </separator>
1440 1402

  
1441 1403
            <command
1442 1404
                  commandId="org.eclipse.ui.window.preferences"
......
1994 1956
                  name="org.txm.rcp.corporaview.corpus.read"
1995 1957
                  visible="true">
1996 1958
            </separator>
1997
            
1998
            <command
1999
                  commandId="org.txm.rcp.handlers.results.DeleteObject"
2000
                  icon="icons/functions/Delete.png"
2001
                  style="push">
2002
               <visibleWhen
2003
                     checkEnabled="false">
2004
                  <or>
2005
                     <reference
2006
                           definitionId="OneBaseSelected">
2007
                     </reference>
2008
                     <reference
2009
                           definitionId="OneConcordanceSelected">
2010
                     </reference>
2011
                     <reference
2012
                           definitionId="OneCorpusSelected">
2013
                     </reference>
2014
                     <reference
2015
                           definitionId="OneLexicalTableSelected">
2016
                     </reference>
2017
                     <reference
2018
                           definitionId="OneLexiconSelected">
2019
                     </reference>
2020
                     <reference
2021
                           definitionId="OnePartitionSelected">
2022
                     </reference>
2023
                     <reference
2024
                           definitionId="OneTxmObjectSelected">
2025
                     </reference>
2026
                     <reference
2027
                           definitionId="OneTXMResultSelected">
2028
                     </reference>
2029
                  </or>
2030
               </visibleWhen>
2031
            </command>
2032 1959
            <separator
2033 1960
                  name="org.txm.rcp.corporaview.corpus.manage"
2034 1961
                  visible="true">
......
2062 1989
               visible="true">
2063 1990
         </separator>
2064 1991
            <command
1992
                  commandId="org.txm.rcp.handlers.results.SetTXMResultPersistentState"
1993
                  mode="FORCE_TEXT"
1994
                  style="toggle">
1995
               <visibleWhen
1996
                     checkEnabled="false">
1997
                  <and>
1998
                     <reference
1999
                           definitionId="OneTXMResultSelected">
2000
                     </reference>
2001
                     <test
2002
                           property="org.txm.rcp.testers.persistable"
2003
                           value="true">
2004
                     </test>
2005
                  </and>
2006
               </visibleWhen>
2007
            </command>
2008
            <command
2065 2009
                  commandId="org.txm.rcp.commands.function.RenameResult"
2066 2010
                  label="%command.label.26"
2067 2011
                  style="push">
......
2072 2016
                  </reference>
2073 2017
               </visibleWhen>
2074 2018
            </command>
2019
            
2075 2020
            <command
2076
                  commandId="org.txm.rcp.handlers.results.SetTXMResultPersistentState"
2077
                  mode="FORCE_TEXT"
2078
                  style="toggle">
2021
                  commandId="org.txm.rcp.handlers.results.DeleteObject"
2022
                  icon="icons/functions/Delete.png"
2023
                  style="push">
2079 2024
               <visibleWhen
2080 2025
                     checkEnabled="false">
2081
                  <and>
2026
                  <or>
2082 2027
                     <reference
2083 2028
                           definitionId="OneTXMResultSelected">
2084 2029
                     </reference>
2085
                     <and>
2086
                        <not>
2087
                           <reference
2088
                                 definitionId="OneTxmObjectSelected">
2089
                           </reference>
2090
                        </not>
2091
                     </and>
2092
                  </and>
2030
                  </or>
2093 2031
               </visibleWhen>
2094 2032
            </command>
2033
            <separator
2034
                  name="org.txm.rcp.corporaview.preferences"
2035
                  visible="true">
2036
            </separator>
2095 2037
            <command
2096 2038
                  commandId="org.eclipse.ui.window.preferences"
2097 2039
                  icon="icons/functions/prefs.png"
......
2961 2903
            class="org.txm.rcp.testers.ToolboxTester"
2962 2904
            id="org.txm.rcp.testers.ToolboxTester"
2963 2905
            namespace="org.txm.rcp.testers"
2964
            properties="StatEngineReady,SearchEngineReady"
2906
            properties="StatEngineReady,SearchEngineReady,computable,persistable"
2965 2907
            type="java.lang.Object">
2966 2908
      </propertyTester>
2967 2909
      <propertyTester
tmp/org.txm.properties.rcp/src/org/txm/properties/rcp/handlers/ComputeProperties.java (revision 1196)
27 27
//
28 28
package org.txm.properties.rcp.handlers;
29 29

  
30
import java.util.List;
31

  
30 32
import org.eclipse.core.commands.ExecutionEvent;
31 33
import org.eclipse.core.commands.ExecutionException;
34
import org.txm.core.results.TXMResult;
32 35
import org.txm.properties.core.functions.Properties;
33 36
import org.txm.properties.rcp.editors.PropertiesEditor;
34 37
import org.txm.rcp.editors.TXMEditor;
......
58 61
		
59 62
		// Creating from Corpus
60 63
		if (selection instanceof CQPCorpus) {
61
			information = new Properties((CQPCorpus) selection);
64
			List<Properties> informations = (List<Properties>) ((CQPCorpus)selection).getChildren(Properties.class);
65
			if (informations.size() > 0) {
66
				information = informations.get(0);
67
			} else {
68
				information = new Properties((CQPCorpus) selection);
69
			}
62 70
		}
63 71
		// Reopening from existing result
64 72
		else if(selection instanceof Properties)	{
tmp/org.txm.specificities.rcp/plugin.xml (revision 1196)
55 55
                  <reference
56 56
                        definitionId="OneLexicalTableSelected">
57 57
                  </reference>
58
                  <reference
59
                        definitionId="OnePartitionIndexSelected">
60
                  </reference>
58 61
               </or>
59 62
            </visibleWhen>
60 63
         </command>
61 64
      </menuContribution>
62 65
      <menuContribution
63
            locationURI="menu:menu.tools">
66
            locationURI="menu:menu.tools?after=menu.tools.separator.stats">
64 67
         <command
65 68
               commandId="org.txm.specificities.rcp.handlers.ComputeSpecifities"
66 69
               icon="icons/functions/specificities.png"
......
77 80
                  <reference
78 81
                        definitionId="OneLexicalTableSelected">
79 82
                  </reference>
83
                  <reference
84
                        definitionId="OnePartitionIndexSelected">
85
                  </reference>
80 86
               </or>
81 87
            </visibleWhen>
82 88
         </command>
83 89
      </menuContribution>
84 90
      <menuContribution
85 91
            allPopups="false"
86
            locationURI="toolbar:org.txm.rcp.toolbartools?after=org.txm.referencer.rcp.handlers.ComputeReferencer">
92
            locationURI="toolbar:org.txm.rcp.toolbartools?after=org.txm.rcp.toolbartools.stats">
87 93
         <command
88 94
               commandId="org.txm.specificities.rcp.handlers.ComputeSpecifities"
89 95
               icon="icons/functions/specificities.png"
90
               style="push"
91
               tooltip="%command.tooltip">
96
               style="push">
92 97
            <visibleWhen
93 98
                  checkEnabled="false">
94 99
               <or>
95 100
                  <reference
101
                        definitionId="OnePartitionSelected">
102
                  </reference>
103
                  <reference
96 104
                        definitionId="OneSubCorpusSelected">
97 105
                  </reference>
98 106
                  <reference
99 107
                        definitionId="OneLexicalTableSelected">
100 108
                  </reference>
101
               </or>
102
            </visibleWhen>
103
         </command>
104
      </menuContribution>
105
      <menuContribution
106
            allPopups="false"
107
            locationURI="toolbar:org.txm.rcp.toolbartools?after=ComputeIndexFromPartition">
108
         <command
109
               commandId="org.txm.specificities.rcp.handlers.ComputeSpecifities"
110
               icon="icons/functions/specificities.png"
111
               style="push"
112
               tooltip="%command.tooltip">
113
            <visibleWhen
114
                  checkEnabled="false">
115
               <or>
116 109
                  <reference
117
                        definitionId="OnePartitionSelected">
110
                        definitionId="OnePartitionIndexSelected">
118 111
                  </reference>
119 112
               </or>
120 113
            </visibleWhen>
tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java (revision 1196)
29 29

  
30 30
import org.eclipse.core.commands.ExecutionEvent;
31 31
import org.eclipse.core.commands.ExecutionException;
32
import org.txm.index.core.functions.PartitionIndex;
32 33
import org.txm.lexicaltable.core.functions.LexicalTable;
33 34
import org.txm.rcp.editors.TXMEditor;
34 35
import org.txm.rcp.handlers.BaseAbstractHandler;
......
72 73
				
73 74
				// creating from Partition
74 75
				if (selection instanceof Partition) {
75
					Partition partition = (Partition) selection;
76
					lexicalTable = new LexicalTable(partition);
76
					lexicalTable = new LexicalTable((Partition) selection);
77 77
				}
78 78
				// creating from Subcorpus
79 79
				else if (selection instanceof Subcorpus) {
80
					Subcorpus corpus = (Subcorpus) selection;
81
					lexicalTable = new LexicalTable(corpus);
82
					lexicalTable.setUnitProperty(corpus.getDefaultProperty());
80
					lexicalTable = new LexicalTable((Subcorpus) selection);
83 81
				}
82
				// creating from Partition index
83
				else if (selection instanceof PartitionIndex) {
84
					lexicalTable = new LexicalTable((PartitionIndex)selection);
85
				}
84 86
				// creating from Lexical Table
85 87
				else if (selection instanceof LexicalTable) {
86 88
					lexicalTable = (LexicalTable) selection;

Also available in: Unified diff