Révision 1396

tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java (revision 1396)
55 55

  
56 56
	/**
57 57
	 * 
58
	 * the parent layout must be a GridLayout
58
	 * The parent layout must be a GridLayout.
59 59
	 * 
60 60
	 * @param parent where the Toolbar will be located
61 61
	 * @param subWidgetComposite OPTIONAL: where the installed Widgets (Groups) will be installed
......
68 68
		
69 69
		this.editorPart = editor;
70 70
		this.subWidgetComposite = subWidgetComposite;
71
		// permit to contribute via plugin.xml menu extension
71
		// permit to contribute via RCP plugin.xml menu extension
72 72
		ToolBarManager manager = new ToolBarManager(this);
73 73
		IMenuService menuService = (IMenuService) this.editorPart.getSite().getService(IMenuService.class);
74 74
		menuService.populateContributionManager(manager, "toolbar:" + toolbarId); //$NON-NLS-1$
......
287 287
	public ToolItem getGroupButton(String groupTitle) {
288 288
		return this.buttons.get(groupTitle);
289 289
	}
290
	
291
	@Override
292
	public void setEnabled(boolean enabled) {
293
		super.setEnabled(enabled);
294
		for(Control c: this.getChildren()) {
295
		    c.setEnabled(enabled);
296
		}
297
	}
298
	
290 299
}
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/ThresholdsGroup.java (revision 1396)
81 81
	/**
82 82
	 * 
83 83
	 * @param parent
84
	 * @param editor
85
	 * @param displayFMax
86
	 */
87
	public ThresholdsGroup(Composite parent, TXMEditor editor, boolean displayFMax) {
88
		this(parent, SWT.NONE, editor, true, displayFMax);
89
	}
90
	
91
	/**
92
	 * 
93
	 * @param parent
84 94
	 * @param style
85 95
	 * @param editor
86 96
	 */
tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java (revision 1396)
4 4
import java.util.List;
5 5

  
6 6
import org.txm.chartsengine.core.results.ChartResult;
7
import org.txm.core.preferences.TXMPreferences;
7 8
import org.txm.core.results.Parameter;
8 9
import org.txm.core.results.TXMParameters;
9 10
import org.txm.index.core.functions.Index;
......
30 31
	/**
31 32
	 * Minimum frequency.
32 33
	 */
33
	@Parameter(key=WordCloudPreferences.F_MIN)
34
	@Parameter(key=TXMPreferences.F_MIN)
34 35
	protected int fMin;
35 36
	
36 37
	/**
37 38
	 * 
38 39
	 */
39
	@Parameter(key=WordCloudPreferences.MAX_WORDS_COUNT)
40
	@Parameter(key=TXMPreferences.V_MAX)
40 41
	protected int maxWordsCount;
41 42

  
42 43
	/**
......
258 259
	@Override
259 260
	public boolean setParameters(TXMParameters parameters) {
260 261
		
261
		if (parameters.containsKey(WordCloudPreferences.F_MIN)) {
262
			Object value = parameters.get(WordCloudPreferences.F_MIN);
262
		if (parameters.containsKey(TXMPreferences.F_MIN)) {
263
			Object value = parameters.get(TXMPreferences.F_MIN);
263 264
			if (value instanceof String) {
264 265
				this.fMin = Integer.parseInt(value.toString());
265 266
			} else if (value instanceof Integer) {
......
267 268
			}
268 269
		}
269 270
		
270
		if (parameters.containsKey(WordCloudPreferences.MAX_WORDS_COUNT)) {
271
			Object value = parameters.get(WordCloudPreferences.MAX_WORDS_COUNT);
271
		if (parameters.containsKey(TXMPreferences.V_MAX)) {
272
			Object value = parameters.get(TXMPreferences.V_MAX);
272 273
			if (value instanceof String) {
273 274
				this.maxWordsCount = Integer.parseInt(value.toString());
274 275
			} else if (value instanceof Integer) {
tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/preferences/WordCloudPreferences.java (revision 1396)
1 1
package org.txm.wordcloud.core.preferences;
2 2

  
3 3

  
4
import org.eclipse.core.runtime.preferences.DefaultScope;
5
import org.osgi.framework.FrameworkUtil;
6 4
import org.osgi.service.prefs.Preferences;
7 5
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
8 6
import org.txm.core.preferences.TXMPreferences;
......
15 13
 */
16 14
public class WordCloudPreferences extends ChartsEnginePreferences {
17 15

  
18
	public static final String PREFERENCES_PREFIX = "wordcloud_";
19
	
20
	public static final String MAX_WORDS_COUNT = PREFERENCES_PREFIX + "max_words"; //$NON-NLS-1$
21
	public static final String F_MIN = PREFERENCES_PREFIX + "f_min"; //$NON-NLS-1$
22
	public static final String ROTATION_PERCENT = PREFERENCES_PREFIX + "rotation_percent"; //$NON-NLS-1$
23
	public static final String RANDOM_POSITIONS = PREFERENCES_PREFIX + "random_positions"; //$NON-NLS-1$
16
	public static final String ROTATION_PERCENT = "rotation_percent"; //$NON-NLS-1$
17
	public static final String RANDOM_POSITIONS = "random_positions"; //$NON-NLS-1$
24 18

  
25 19
	@Override
26 20
	public void initializeDefaultPreferences() {
27 21
		super.initializeDefaultPreferences();
28 22
		Preferences preferences = getDefaultPreferencesNode();
29
		preferences.putInt(MAX_WORDS_COUNT, 50);
23
		preferences.putInt(V_MAX, 50);
30 24
		preferences.putInt(F_MIN, 20);
31 25
		preferences.putInt(ROTATION_PERCENT, 10);
32 26
		preferences.putBoolean(RANDOM_POSITIONS, false);
27
		
28
		// disable unavailable functionalities
29
		TXMPreferences.setEmpty(this.getPreferencesNodeQualifier(), ChartsEnginePreferences.SHOW_TITLE);
30
		TXMPreferences.setEmpty(this.getPreferencesNodeQualifier(), ChartsEnginePreferences.SHOW_LEGEND);
31
		TXMPreferences.setEmpty(this.getPreferencesNodeQualifier(), ChartsEnginePreferences.SHOW_GRID);
32
		TXMPreferences.setEmpty(this.getPreferencesNodeQualifier(), ChartsEnginePreferences.RENDERING_COLORS_MODE);
33 33
	}
34 34
	
35 35
	/**
tmp/org.txm.progression.core/src/org/txm/progression/core/messages/messages.properties (revision 1396)
1
#TXM messages generated by the PluginMessagesManager class
2
#Wed Nov 14 14:12:59 CET 2018
3
density=(density)
4
doneColonNoMatchFound=Done\: no match found.
5
errorColonSubcorpusWithSize0=Error\: subcorpus with size 0
6
filteringREGEXColon=, filtering REGEX\: 
7
inP0=in
8
occurrences=Occurrences
9
progressionOf=Progression of 
10
propertyColon=, property\: 
11
RESULT_TYPE=Progression
12
structureColon=structure\: 
13
tEqualsP0=T \= {0}
14
theProgressionCommandIsNotYetAvailableForDiscontinuousSubcorpora=The Progression command is not yet available for discontinuous sub-corpora.
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
2
#TXM messages generated by the PluginMessagesManager class
3
#Wed Nov 14 14:12:59 CET 2018
4

  
5
RESULT_TYPE = Progression
6

  
7
density = (density)
8

  
9
doneColonNoMatchFound = Done: no match found.
10

  
11
errorColonSubcorpusWithSize0 = Error: subcorpus with size 0
12

  
13
filteringREGEXColon = , filtering REGEX: 
14

  
15
inP0 = in {0}
16

  
17
occurrences = Occurrences
18

  
19
progressionOf = Progression of 
20

  
21
propertyColon = , property: 
22

  
23
structureColon = structure: 
24

  
25
tEqualsP0 = T = {0}
26

  
27
theProgressionCommandIsNotYetAvailableForDiscontinuousSubcorpora = The Progression command is not yet available for discontinuous sub-corpora.
tmp/org.txm.progression.core/src/org/txm/progression/core/messages/messages_fr.properties (revision 1396)
1
#TXM messages generated by the PluginMessagesManager class
2
#Wed Nov 14 14:12:59 CET 2018
3
density=(densité)
4
doneColonNoMatchFound=Terminé\: pas de match trouvé.
5
errorColonSubcorpusWithSize0=Erreur la taille du sous-corpus est 0
6
filteringREGEXColon=, filtrage REGEX\: 
7
occurrences=Occurrences
8
progressionOf=Progression de 
9
propertyColon=, propriété \:  
10
RESULT_TYPE=Progression
11
structureColon=structure \:  
12
tEqualsP0=T \= {0}
13
theProgressionCommandIsNotYetAvailableForDiscontinuousSubcorpora=La fonctionnalité Progression n'est pas encore disponible pour les sous-corpus discontinus.
1
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
2
#TXM messages generated by the PluginMessagesManager class
3
#Wed Nov 14 14:12:59 CET 2018
4

  
5
RESULT_TYPE = Progression
6

  
7
density = (densité)
8

  
9
doneColonNoMatchFound = Terminé: pas de match trouvé.
10

  
11
errorColonSubcorpusWithSize0 = Erreur la taille du sous-corpus est 0
12

  
13
filteringREGEXColon = , filtrage REGEX: 
14

  
15
inP0 = dans {0}
16

  
17
occurrences = Occurrences
18

  
19
progressionOf = Progression de 
20

  
21
propertyColon = , propriété :  
22

  
23
structureColon = structure :  
24

  
25
tEqualsP0 = T = {0}
26

  
27
theProgressionCommandIsNotYetAvailableForDiscontinuousSubcorpora = La fonctionnalité Progression n'est pas encore disponible pour les sous-corpus discontinus.
tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/base/Utils.java (revision 1396)
24 24
	 */
25 25
	public static String createProgressionChartTitle(Progression progression, boolean doCumulative)	{
26 26

  
27
		String title = ProgressionCoreMessages.progressionOf; //$NON-NLS-1$
27
		String title = ProgressionCoreMessages.progressionOf;
28 28

  
29 29
		// Put queries in title
30 30
		for(int i = 0; i < progression.getQueries().size(); i++) {
......
35 35
		}
36 36

  
37 37

  
38
		title += " " + NLS.bind(ProgressionCoreMessages.inP0, progression.getCorpus().getName()); //$NON-NLS-1$ //$NON-NLS-2$
38
		title += " " + NLS.bind(ProgressionCoreMessages.inP0, progression.getCorpus().getName());
39 39

  
40 40
		if(!doCumulative)	{
41 41
			title += " " + ProgressionCoreMessages.density; //$NON-NLS-1$
tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/JFCProgressionCumulativeChartCreator.java (revision 1396)
120 120
		
121 121
		
122 122
		// Fill the data set from the result
123
		if(progression.hasParameterChanged(TXMPreferences.QUERIES, true))	{
123
		// FIXME: Debug
124
//		boolean t1 = progression.hasParameterChanged(TXMPreferences.QUERIES);
125
//		boolean t2 = progression.hasParameterChanged(TXMPreferences.QUERIES, true);
126
//		System.err.println("*******************************JFCProgressionCumulativeChartCreator.updateChart(): has query parameter change = " + t1 + " / older = " + t2);
127
		if(
128
				progression.hasParameterChanged(TXMPreferences.QUERIES)
129
				||
130
				progression.hasParameterChanged(TXMPreferences.QUERIES, true)
131
				)	{
124 132
			XYSeriesCollection dataset = (XYSeriesCollection) chart.getXYPlot().getDataset();
125 133
			dataset.removeAllSeries();
126 134
			
tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java (revision 1396)
3 3
import org.eclipse.swt.SWT;
4 4
import org.eclipse.swt.widgets.Button;
5 5
import org.eclipse.swt.widgets.Composite;
6
import org.eclipse.swt.widgets.Control;
6 7
import org.eclipse.swt.widgets.Label;
7 8
import org.eclipse.swt.widgets.Spinner;
8 9
import org.txm.chartsengine.rcp.editors.ChartEditor;
9 10
import org.txm.core.results.Parameter;
10 11
import org.txm.rcp.swt.widget.FloatSpinner;
12
import org.txm.rcp.swt.widget.ThresholdsGroup;
11 13
import org.txm.utils.logger.Log;
12 14
import org.txm.wordcloud.core.functions.WordCloud;
13 15
import org.txm.wordcloud.core.preferences.WordCloudPreferences;
......
24 26

  
25 27
	
26 28
	@Parameter(key=WordCloudPreferences.F_MIN)
27
	protected Spinner minFreq;
29
	protected Spinner fMinSpinner;
28 30

  
29
	@Parameter(key=WordCloudPreferences.MAX_WORDS_COUNT)
30
	protected Spinner maxWordsCount; 
31
	@Parameter(key=WordCloudPreferences.V_MAX)
32
	protected Spinner vMaxSpinner; 
31 33
	
32 34
	@Parameter(key=WordCloudPreferences.ROTATION_PERCENT)
33 35
	protected FloatSpinner rotationPercent; 
......
40 42
	@Override
41 43
	public void __createPartControl() {
42 44

  
43
		// for group tests
44
		Composite parametersArea = this.getExtendedParametersGroup();
45
		Composite extendedParametersGroup = this.getExtendedParametersGroup();
45 46

  
47
		// extended parameters
48
		
49
		// Filters
50
		ThresholdsGroup thresholdsGroup = new ThresholdsGroup(extendedParametersGroup, this, false);
51
		this.fMinSpinner = thresholdsGroup.getFMinSpinner();
52
		this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
53
		
46 54
		// fmin
47
		new Label(parametersArea, SWT.NONE).setText(WordCloudUIMessages.fmin);
48
		minFreq = new Spinner(parametersArea, SWT.BORDER);
49
		minFreq.setMinimum(1);
50
		minFreq.setIncrement(1);
51
		minFreq.setMaximum(100000000);
55
		this.fMinSpinner.setMinimum(1);
56
		this.fMinSpinner.setMaximum(100000000);
52 57

  
53 58
		// max words / vmax
54
		new Label(parametersArea, SWT.NONE).setText(WordCloudUIMessages.vmax);
55
		maxWordsCount = new Spinner(parametersArea, SWT.BORDER);
56
		maxWordsCount.setMinimum(10);
57
		maxWordsCount.setIncrement(1);
58
		maxWordsCount.setMaximum(100000);
59
		this.vMaxSpinner.setMinimum(10);
60
		this.vMaxSpinner.setMaximum(100000);
59 61

  
60 62
		// rotation percent
61
		new Label(parametersArea, SWT.NONE).setText(WordCloudUIMessages.percentOfRotatedLabelsColon);
62
		rotationPercent = new FloatSpinner(parametersArea, SWT.BORDER);
63
		new Label(extendedParametersGroup, SWT.NONE).setText(WordCloudUIMessages.percentOfRotatedLabelsColon);
64
		rotationPercent = new FloatSpinner(extendedParametersGroup, SWT.BORDER);
63 65
		rotationPercent.setMaximumAsFloat(100);
64 66

  
65 67
		// random positions
66
		randomPositions = new Button(parametersArea, SWT.CHECK);
68
		randomPositions = new Button(extendedParametersGroup, SWT.CHECK);
67 69
		randomPositions.setText(WordCloudUIMessages.randomizePositions);
68 70
		
69 71

  
70
		parametersArea.pack();
72
		// FIXME: temporary fix, later must will to enable the font, rendering mode, etc. in WordCloud R calls
73
		// disable all component of the rendering tool bar
74
		this.advancedChartToolBar.setEnabled(false);
75
		
76
		extendedParametersGroup.pack();
71 77

  
72 78
		Log.info(WordCloudUIMessages.wordCloudReadyColon + this.getResult());
73 79

  
tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/preferences/WordCloudPreferencePage.java (revision 1396)
55 55
		// Charts rendering
56 56
		Composite chartsTab = SWTChartsComponentsProvider.createChartsRenderingPreferencesTabFolderComposite(this.getFieldEditorParent());
57 57
		
58
		this.addField(new IntegerFieldEditor(WordCloudPreferences.MAX_WORDS_COUNT, WordCloudUIMessages.numberOfUsedWords, chartsTab));
58
		this.addField(new IntegerFieldEditor(WordCloudPreferences.V_MAX, WordCloudUIMessages.numberOfUsedWords, chartsTab));
59 59
		this.addField(new IntegerFieldEditor(WordCloudPreferences.F_MIN, WordCloudUIMessages.minimalFrequencyForUsedWords, chartsTab));
60 60
		this.addField(new IntegerFieldEditor(WordCloudPreferences.ROTATION_PERCENT, WordCloudUIMessages.percentOfRotatedWords, chartsTab));
61 61
		this.addField(new BooleanFieldEditor(WordCloudPreferences.RANDOM_POSITIONS, WordCloudUIMessages.randomWordPositions, chartsTab));
tmp/org.txm.internalview.core/src/org/txm/internalview/core/functions/InternalView.java (revision 1396)
111 111
	@Override
112 112
	protected boolean _compute() throws Exception {
113 113

  
114
		//if(this.hasParameterChanged(InternalViewPreferences.STRUCTURAL_UNIT))	{
115
		this.pCurrentPage = 0;
116
		//find struct start-end
117
		CQLQuery query = new CQLQuery("<" + pStructuralUnit.getName() + "> [] expand to " + pStructuralUnit); //$NON-NLS-1$ //$NON-NLS-2$
118
		//System.out.println(query);
119
		QueryResult result = getCorpus().query(query, "test", false); //$NON-NLS-1$
120
		nmatches = result.getNMatch();
121
		if (nmatches > 0) {
122
			matches = result.getMatches();
114
		if(this.hasParameterChanged(InternalViewPreferences.STRUCTURAL_UNIT))	{
115
			this.pCurrentPage = 0;
116
			//find struct start-end
117
			CQLQuery query = new CQLQuery("<" + pStructuralUnit.getName() + "> [] expand to " + pStructuralUnit); //$NON-NLS-1$ //$NON-NLS-2$
118
			//System.out.println(query);
119
			QueryResult result = getCorpus().query(query, "test", false); //$NON-NLS-1$
120
			nmatches = result.getNMatch();
121
			if (nmatches > 0) {
122
				matches = result.getMatches();
123
			}
124
			result.drop();
125
			//System.out.println(matches);
126
			dirty = false;
127
			return (nmatches > 0);
123 128
		}
124
		result.drop();
125
		//System.out.println(matches);
126
		dirty = false;
127
		return (nmatches > 0);
128
		//}
129

  
129
		return true;
130 130
	}
131 131

  
132 132

  
tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java (revision 1396)
106 106
		if(map != null)	{
107 107
			chartCreator = map.get(chartType);
108 108
			// if chart type was null
109
			if(chartCreator == null)	{
110
				chartCreator = map.get(ChartsEnginePreferences.DEFAULT_CHART_TYPE);
111
			}
109
//			if(chartCreator == null)	{
110
//				chartCreator = map.get(ChartsEnginePreferences.DEFAULT_CHART_TYPE);
111
//			}
112 112
		}
113 113
		
114 114
		if(chartCreator == null && showLogWarning)	{
......
118 118
	}
119 119
	
120 120
	
121
	public ChartCreator getChartCreator(ChartResult result, String chartType)	{
122
		return this.getChartCreator(result, true);
123
	}
124
	
125
	/**
126
	 * Gets a chart creator for the specified result.
127
	 * @param resultDataType
128
	 * @return A chart creator if it exists otherwise <code>null</code>
129
	 */
130 121
	public ChartCreator getChartCreator(ChartResult result, boolean showLogWarning)	{
131 122
		return this.getChartCreator(result, result.getChartType(), showLogWarning);
132 123
	}
124
	
125
	public ChartCreator getChartCreator(ChartResult result, String chartType)	{
126
		return this.getChartCreator(result, chartType, true);
127
	}
128
	
133 129

  
134 130
	/**
135 131
	 * Gets a chart creator for the specified result.
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1396)
560 560
	 * @return
561 561
	 */
562 562
	public boolean hasParameterChanged(String key, boolean older) {
563
		return this.hasParameterChanged(key, this.parametersHistory.get(this.parametersHistory.size() - 2));
563
		if(older)	{
564
			return this.hasParameterChanged(key, this.parametersHistory.get(this.parametersHistory.size() - 2));	
565
		}
566
		else	{
567
			return this.hasParameterChanged(key);
568
		}
564 569
	}
565 570

  
566 571
	/**
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartEditorToolBar.java (revision 1396)
13 13
 * @author sjacquot
14 14
 *
15 15
 */
16
// FIXME: became useless, can directly use TXMEditorToolBar
16
// FIXME: became useless? could now directly use TXMEditorToolBar
17 17
public class ChartEditorToolBar extends TXMEditorToolBar {
18 18

  
19 19

  
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java (revision 1396)
19 19
import org.txm.chartsengine.rcp.editors.ChartEditor;
20 20
import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
21 21
import org.txm.core.engines.EngineType;
22
import org.txm.core.preferences.TBXPreferences;
23
import org.txm.core.preferences.TXMPreferences;
22 24
import org.txm.rcp.IImageKeys;
23 25
import org.txm.rcp.swt.GLComposite;
24 26

  
......
157 159
		
158 160
		// Chart types from installed chart creators in all installed charts engines
159 161
		final Combo chartTypeCombo = new Combo(this, SWT.READ_ONLY);
160
		ArrayList<String> chartsEngineNames = new ArrayList<String>();
161
		ArrayList<ChartCreator> allChartCreators = new ArrayList<ChartCreator>();
162
		
163
		for (int i = 0; i < ChartsEngine.getChartsEngines().size(); i++) {
164
			ArrayList<ChartCreator> chartCreators = ChartsEngine.getChartsEngines().get(i).getChartCreators(this.getEditorPart().getResult());
165
			for (int j = 0; j < chartCreators.size(); j++) {
166
				chartsEngineNames.add(ChartsEngine.getChartsEngines().get(i).getName());
167
				allChartCreators.add(chartCreators.get(j));
168
			}
169
		}
170
		
171
		
172
		String chartTypes[] = new String[allChartCreators.size()];
173
		int currentChartCreatorIndex = 0;
174
		
175
		for(int i = 0; i < allChartCreators.size(); i++) {
162
		if(TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER))	{
163
	
164
			ArrayList<String> chartsEngineNames = new ArrayList<String>();
165
			ArrayList<ChartCreator> allChartCreators = new ArrayList<ChartCreator>();
176 166
			
177
			chartTypes[i] = allChartCreators.get(i).getChartType();
178
			if(chartTypes[i] == null)	{
179
				chartTypes[i] = ChartsEnginePreferences.DEFAULT_CHART_TYPE;
167
			for (int i = 0; i < ChartsEngine.getChartsEngines().size(); i++) {
168
				ArrayList<ChartCreator> chartCreators = ChartsEngine.getChartsEngines().get(i).getChartCreators(this.getEditorPart().getResult());
169
				for (int j = 0; j < chartCreators.size(); j++) {
170
					chartsEngineNames.add(ChartsEngine.getChartsEngines().get(i).getName());
171
					allChartCreators.add(chartCreators.get(j));
172
				}
180 173
			}
181 174
			
182
			// preselected combo index
183
			if(this.getEditorPart().getChartType() != null && this.getEditorPart().getChartType().equals(chartTypes[i])
184
					&& this.getEditorPart().getResult().getChartsEngine().getName().equals(chartsEngineNames.get(i))) {
185
				currentChartCreatorIndex = i;
175
			
176
			String chartTypes[] = new String[allChartCreators.size()];
177
			int currentChartCreatorIndex = 0;
178
			
179
			for(int i = 0; i < allChartCreators.size(); i++) {
180
				
181
				chartTypes[i] = allChartCreators.get(i).getChartType();
182
				if(chartTypes[i] == null)	{
183
					chartTypes[i] = ChartsEnginePreferences.DEFAULT_CHART_TYPE;
184
				}
185
				
186
				// preselected combo index
187
				if(this.getEditorPart().getChartType() != null && this.getEditorPart().getChartType().equals(chartTypes[i])
188
						&& this.getEditorPart().getResult().getChartsEngine().getName().equals(chartsEngineNames.get(i))) {
189
					currentChartCreatorIndex = i;
190
				}
191
				
192
				chartTypes[i] = chartsEngineNames.get(i) + " / " + chartTypes[i]; //$NON-NLS-1$
193
				
186 194
			}
195
			chartTypeCombo.setItems(chartTypes);
187 196
			
188
			chartTypes[i] = chartsEngineNames.get(i) + " / " + chartTypes[i]; //$NON-NLS-1$
197
			ToolItem chartTypeComboItem = new ToolItem(this, SWT.SEPARATOR);
198
			chartTypeComboItem.setControl(chartTypeCombo);
199
			chartTypeCombo.pack();
200
			chartTypeComboItem.setWidth(chartTypeCombo.getBounds().width);
189 201
			
202
			chartTypeCombo.select(currentChartCreatorIndex);
203
			
204
			
205
			if(allChartCreators.size() < 2)	{
206
				chartTypeCombo.setVisible(false);
207
			}
190 208
		}
191
		chartTypeCombo.setItems(chartTypes);
192 209
		
193
		ToolItem chartTypeComboItem = new ToolItem(this, SWT.SEPARATOR);
194
		chartTypeComboItem.setControl(chartTypeCombo);
195
		chartTypeCombo.pack();
196
		chartTypeComboItem.setWidth(chartTypeCombo.getBounds().width);
197 210
		
198
		chartTypeCombo.select(currentChartCreatorIndex);
199
		
200
		
201
		if(allChartCreators.size() < 2)	{
202
			chartTypeCombo.setVisible(false);
203
		}
204
		
205
		
206 211
		// Listeners
207 212
		SelectionListener listener = new SelectionListener() {
208 213
			
tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/renderers/MouseOverItemSelector.java (revision 1396)
218 218
		this.result = result;
219 219
		
220 220
		// FIXME: test to recycle the existing chart panel to fix a null pointer exception in the renderer
221
		if(result.getChart() != null)	{
221
		if(result.getChart() != null && result.getChart() instanceof JFreeChart)	{
222 222
			JFreeChart existingChart = (JFreeChart) result.getChart();
223 223
			if(existingChart.getPlot() instanceof XYPlot && existingChart.getXYPlot().getRenderer() instanceof IRendererWithItemSelection)	{
224 224
				this.setChartPanel(((IRendererWithItemSelection) existingChart.getXYPlot().getRenderer()).getItemsSelector().getChartPanel());
tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/editors/InternalViewEditor.java (revision 1396)
149 149
		// Navigation widget
150 150
		navigation = new NewNavigationWidget(navigationPanel);
151 151
		navigation.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, true));
152
//		navigation.addGoToKeyListener(computeKeyListener);
152
		navigation.addGoToKeyListener(computeKeyListener);
153 153

  
154 154
		
155 155
		// Listeners
156
//		navigation.addFirstListener(computeSelectionListener);
157
//		navigation.addPreviousListener(computeSelectionListener);
158
//		navigation.addNextListener(computeSelectionListener);
159
//		navigation.addLastListener(computeSelectionListener);
156
		navigation.addFirstListener(computeSelectionListener);
157
		navigation.addPreviousListener(computeSelectionListener);
158
		navigation.addNextListener(computeSelectionListener);
159
		navigation.addLastListener(computeSelectionListener);
160 160

  
161 161
		
162 162
		structInfos = new Label(navigationPanel, SWT.NONE);
......
210 210
	
211 211
	// FIXME: to remove later
212 212
	protected boolean goToPage(int page) throws CqiClientException {
213
		internalView.setCurrentPage(page);;
213
		internalView.setCurrentPage(page);
214 214
		fillResultArea(); // one segment at time
215 215

  
216 216
		if (page == 0) {

Formats disponibles : Unified diff