Révision 3146

tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCEditor.java (revision 3146)
9 9
import org.txm.ahc.core.functions.AHC;
10 10
import org.txm.ahc.core.preferences.AHCPreferences;
11 11
import org.txm.ahc.rcp.messages.AHCUIMessages;
12
import org.txm.ca.core.functions.CA;
12 13
import org.txm.chartsengine.rcp.editors.ChartEditor;
13 14
import org.txm.core.messages.TXMCoreMessages;
14 15
import org.txm.core.preferences.TXMPreferences;
15 16
import org.txm.core.results.Parameter;
17
import org.txm.core.results.TXMResult;
16 18
import org.txm.index.core.functions.PartitionIndex;
19
import org.txm.lexicaltable.core.functions.LexicalTable;
17 20
import org.txm.rcp.IImageKeys;
18 21
import org.txm.rcp.editors.listeners.ComputeKeyListener;
19 22
import org.txm.rcp.editors.listeners.ComputeSelectionListener;
......
24 27
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
25 28
import org.txm.searchengine.cqp.corpus.CQPCorpus;
26 29
import org.txm.searchengine.cqp.corpus.MainCorpus;
30
import org.txm.searchengine.cqp.corpus.Partition;
27 31

  
28 32
/**
29 33
 * AHC chart editor.
......
102 106
		GLComposite mainParametersArea = this.getMainParametersComposite();
103 107
		mainParametersArea.getLayout().numColumns = 4;
104 108
		// parent parameters
105
		if (!this.getResult().getParent().isVisible() // CA parent parent is not visible
106
				&& !(this.getResult().getParent().getParent().getParent() instanceof PartitionIndex)) { // and its 2x parent is not a PartitionIndex
107
			// unit property
108
			new Label(mainParametersArea, SWT.NONE).setText(TXMCoreMessages.common_property);
109
			this.unitPropertyComboViewer = new PropertiesComboViewer(mainParametersArea, this, false,
110
					CQPCorpus.getFirstParentCorpus(this.getResult()).getOrderedProperties(),
111
					this.getResult().getUnitProperty(), false);
109
		
110
		CA ca = this.getResult().getParent();
111
		if (ca.isVisible()) {
112
			// ok the CA shows the unitPropertyComboViewer
113
		} else {
114
			LexicalTable lt = ca.getParent();
115
			if (lt.isVisible()) {
116
				// ok the LT shows the unitPropertyComboViewer
117
			} else {
118
				TXMResult parent = lt.getParent();
119
				if (parent instanceof PartitionIndex) {
120
					// ok the LT shows the unitPropertyComboViewer
121
				} else if (parent instanceof Partition) {
122
					new Label(mainParametersArea, SWT.NONE).setText(TXMCoreMessages.common_property);
123
					this.unitPropertyComboViewer = new PropertiesComboViewer(mainParametersArea, this, false,
124
							CQPCorpus.getFirstParentCorpus(this.getResult()).getOrderedProperties(),
125
							this.getResult().getUnitProperty(), false);
126
				}
127
			}
112 128
		}
129
//		if (!this.getResult().getParent().isVisible() // CA parent parent is not visible
130
//				&& !(this.getResult().getParent().getParent().getParent() instanceof PartitionIndex)) { // and its 2x parent is not a PartitionIndex
131
//			// unit property
132
//			
133
//		}
113 134
		
114 135
		// Extend the chart editor tool bar
115 136
		new ToolItem(this.chartToolBar, SWT.SEPARATOR);

Formats disponibles : Unified diff