Révision 1008

tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java (revision 1008)
83 83

  
84 84
				// warning to few parts
85 85
				if (partition.getNPart() < 4) {
86
					MessageDialog d = new MessageDialog(window.getShell(), CAUIMessages.ComputeCorrespondanceAnalysis_3, null,
86
					MessageDialog d = new MessageDialog(window.getShell(), TXMCoreMessages.error_error2, null,
87 87
							NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_4, partition.getNPart()), 0, new String[] { TXMCoreMessages.common_ok}, 0);
88 88
					d.open();
89 89
					return null;
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/messages/messages_fr.properties (revision 1008)
18 18
ComputeCorrespondanceAnalysis_14      = Ouverture des résultats de l'analyse factorielle des correspondances
19 19
ComputeCorrespondanceAnalysis_15      = Création de la fenêtre de l'AFC
20 20
ComputeCorrespondanceAnalysis_3       = ** Erreur
21
ComputeCorrespondanceAnalysis_4       = ** Impossible de calculer l'analyse factorielle avec seulement {0} parties (minimum=4).
21
ComputeCorrespondanceAnalysis_4       = ** Impossible de calculer l'analyse factorielle avec seulement {0} parties (minimum = 4).
22 22
ComputeCorrespondanceAnalysis_8       = Chargement des résultats de l'analyse factorielle
23 23

  
24 24
CorrespondanceAnalysisEditorInput_0  = Valeurs propres
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_ru.properties (revision 1008)
6 6

  
7 7
common_metric = Метрика
8 8

  
9
error_canNotComputeAHCWith = 
10

  
9 11
preferences_displayChartIn2D = Показывать графики в 2D
10 12

  
11 13
tooltips_computeColumns = Колонки
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_fr.properties (revision 1008)
6 6

  
7 7
common_metric = Métrique
8 8

  
9
error_canNotComputeAHCWith = Impossible de calculer la classification avec seulement {0} parties (minimum = 4).
10

  
9 11
preferences_displayChartIn2D = Afficher les graphiques en 2D
10 12

  
11 13
toolbars_numberOfClusters = Nombre de clusters :
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/AHCUIMessages.java (revision 1008)
27 27
	
28 28
	public static String toolbars_numberOfClusters;
29 29
	
30
	public static String error_canNotComputeAHCWith;
30 31
	
31
	
32 32
	static {
33 33
		Utf8NLS.initializeMessages(BUNDLE_NAME, AHCUIMessages.class);
34 34
	}
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages.properties (revision 1008)
6 6

  
7 7
common_metric = Metric
8 8

  
9
error_canNotComputeAHCWith = Can not compute classification with only {0} parts (the minimum is 4 parts).
10

  
9 11
preferences_displayChartIn2D = Display charts in 2D
10 12

  
11 13
toolbars_numberOfClusters = Number of clusters:
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java (revision 1008)
101 101
			//System.out.println("Compute CAH with Partition : "+((Partition)selection.getFirstElement()).getName());
102 102
			Partition partition = (Partition)selection;
103 103
			if (partition.getParts().size() < 4) {
104
				MessageDialog d = new MessageDialog(window.getShell(), CAUIMessages.ComputeCorrespondanceAnalysis_3, null,
105
						NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_4, partition.getNPart()), 0, new String[] { TXMCoreMessages.common_ok}, 0);
104
				MessageDialog d = new MessageDialog(window.getShell(), TXMCoreMessages.error_error2, null,
105
						NLS.bind(AHCUIMessages.error_canNotComputeAHCWith, partition.getNPart()), 0, new String[] { TXMCoreMessages.common_ok}, 0);
106 106
				d.open();
107 107
				return null;
108 108
			}
tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 1008)
389 389
	private static void pluginsPostinstallation() {
390 390

  
391 391
		IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(PostInstallationStep.EXTENSION_ID);
392
		
392 393
		Log.warning(TXMCoreMessages.ApplicationWorkbenchAdvisor_15);
393 394
		Log.warning(Arrays.toString(config));
394 395

  
395 396
		for (IConfigurationElement e : config) {
396 397
			try {
397 398
				Log.warning(TXMCoreMessages.ApplicationWorkbenchAdvisor_14 + e.getName() + " from " + e.getContributor().getName());
399
				
398 400
				final Object o = e.createExecutableExtension("class"); //$NON-NLS-1$
399 401
				if (o instanceof PostInstallationStep) {
400 402
					ISafeRunnable runnable = new ISafeRunnable() {
401 403
						@Override
402 404
						public void handleException(Throwable exception) {
403
							System.out.println(TXMCoreMessages.ApplicationWorkbenchAdvisor_6+ exception);
405
							Log.severe(TXMCoreMessages.ApplicationWorkbenchAdvisor_6+ exception);
404 406
						}
405 407

  
406 408
						@Override
......
429 431
		for (IConfigurationElement e : config) {
430 432
			try {
431 433
				Log.warning(TXMCoreMessages.ApplicationWorkbenchAdvisor_14 + e.getName() + " from " + e.getContributor().getName());
434
				
432 435
				final Object o = e.createExecutableExtension("class"); //$NON-NLS-1$
433 436
				if (o instanceof PostInstallationStep) {
434 437
					ISafeRunnable runnable = new ISafeRunnable() {
435 438
						@Override
436 439
						public void handleException(Throwable exception) {
437
							System.out.println(TXMCoreMessages.ApplicationWorkbenchAdvisor_6+ exception);
440
							Log.severe(TXMCoreMessages.ApplicationWorkbenchAdvisor_6+ exception);
438 441
						}
439 442

  
440 443
						@Override
......
494 497
	public static void shutdown() {
495 498

  
496 499
		stopEnginesManagers();
497

  
498 500
		
499 501
		try {
500 502
			// FIXME: tmp solution before IProject: remove all not persistable result nodes
tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java (revision 1008)
174 174
	}
175 175

  
176 176
	/**
177
	 * Save all preferences in the default app directory
177
	 * Saves all preferences and session results in the default app directory.
178 178
	 */
179 179
	public static void saveAll() {
180 180
		
181 181
		Log.info("Saving preferences and session results.");
182
		
182 183
		IPreferencesService service = Platform.getPreferencesService();
183 184
		try {
184 185
			service.getRootNode().flush();
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1008)
977 977
		ArrayList<TXMResult> results = Toolbox.workspace.getDeepChildren();
978 978
		for (int i = 0; i < results.size(); i++) {
979 979
			if(!results.get(i).mustBePersisted())	{ 
980
				Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + results.get(i).getSimpleName());
980
				Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + results.get(i).getSimpleName() + " of type " + results.get(i).getClass().getSimpleName() + ".");
981 981
			}
982 982
		}
983 983
	}
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages.properties (revision 1008)
1 1

  
2 2
ProgressionDialog_1  = Chart type:
3 3
ProgressionDialog_11 = Bandewidth multiplier:
4
ProgressionDialog_14 = Multiple line styles
5 4
ProgressionDialog_15 = Repeat same values
6 5
ProgressionDialog_17 = Strip multiplier error:
7 6
ProgressionDialog_2  = cumulative
......
12 11
ProgressionPreferencePage_6 = Repeat the values of the structure properties
13 12
ProgressionPreferencePage_7 = Bande size multiplier
14 13

  
15
error_thatQueryIsAlreadyRepresentedByACurveInTheGraphic = That query is already represented by a curve in the graphic. Please use another query.
14
error_theQueryIsAlreadyRepresentedByACurveInTheGraphic = The query {0} is already represented by a curve in the graphic. Please use another query.
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages_ru.properties (revision 1008)
1 1

  
2 2
ProgressionDialog_1  = Тип графа: 
3 3
ProgressionDialog_11 = Масштаб полос
4
ProgressionDialog_14 = Различные стили строк
5 4
ProgressionDialog_15 = Повторять идентичные значения
6 5
ProgressionDialog_17 = Ошибка: мультипликатор полосы: 
7 6
ProgressionDialog_2  = кумулятивный
......
12 11
ProgressionPreferencePage_6 = Повторять значения с свойств структур
13 12
ProgressionPreferencePage_7 = Масштаб границ структур
14 13

  
15
error_thatQueryIsAlreadyRepresentedByACurveInTheGraphic = 
14
error_theQueryIsAlreadyRepresentedByACurveInTheGraphic = 
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/messages_fr.properties (revision 1008)
1 1

  
2 2
ProgressionDialog_1  = Type de graphique : 
3 3
ProgressionDialog_11 = Échelle des bandeaux
4
ProgressionDialog_14 = Styles de ligne multiples
5 4
ProgressionDialog_15 = Répéter les valeurs identiques
6 5
ProgressionDialog_17 = Erreur : multiplicateur de bande : 
7 6
ProgressionDialog_2  = cumulatif
......
12 11
ProgressionPreferencePage_6 = Répéter les valeurs de propriétés de structures
13 12
ProgressionPreferencePage_7 = Échelle des limites de structures
14 13

  
15
error_thatQueryIsAlreadyRepresentedByACurveInTheGraphic = Cette requête est déjà présente dans le graphique.
14
error_theQueryIsAlreadyRepresentedByACurveInTheGraphic = La requête {0} est déjà présente dans le graphique.
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/messages/ProgressionUIMessages.java (revision 1008)
20 20

  
21 21
	public static String ProgressionDialog_1;
22 22
	public static String ProgressionDialog_11;
23
	public static String ProgressionDialog_14;
24 23
	public static String ProgressionDialog_15;
25 24
	public static String ProgressionDialog_17;
26 25
	public static String ProgressionDialog_2;
......
28 27
	public static String ProgressionDialog_7;
29 28
	
30 29
	
31
	public static String error_thatQueryIsAlreadyRepresentedByACurveInTheGraphic;
30
	public static String error_theQueryIsAlreadyRepresentedByACurveInTheGraphic;
32 31
	
33 32
	static {
34 33
		// initializes resource bundle
tmp/org.txm.progression.rcp/src/org/txm/progression/rcp/editors/ProgressionEditor.java (revision 1008)
9 9
import java.util.Properties;
10 10

  
11 11
import org.eclipse.jface.dialogs.MessageDialog;
12
import org.eclipse.osgi.util.NLS;
12 13
import org.eclipse.swt.SWT;
13 14
import org.eclipse.swt.custom.ScrolledComposite;
14 15
import org.eclipse.swt.events.KeyEvent;
......
26 27
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
27 28
import org.txm.chartsengine.r.core.themes.DefaultTheme;
28 29
import org.txm.chartsengine.rcp.editors.ChartEditor;
30
import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
29 31
import org.txm.core.messages.TXMCoreMessages;
30 32
import org.txm.core.results.Parameter;
31 33
import org.txm.core.results.TXMResult;
......
308 310

  
309 311
			// Lines styles
310 312
			multipleLineStrokes = new Button(paramPanel, SWT.CHECK);
311
			multipleLineStrokes.setText(ProgressionUIMessages.ProgressionDialog_14);
313
			multipleLineStrokes.setText(SWTComponentsProviderMessages.preferences_multipleLineStrokeStyles);
312 314
			multipleLineStrokes.addSelectionListener(new ComputeSelectionListener(this));
313 315

  
314 316

  
......
523 525
		}
524 526
		
525 527
		if(count > maxCount)	{
526
			Log.info("The query already exists: " + query);
527 528
			MessageDialog d = new MessageDialog(getShell(), TXMCoreMessages.error_error2, null,
528
					ProgressionUIMessages.error_thatQueryIsAlreadyRepresentedByACurveInTheGraphic, 0, new String[] { TXMCoreMessages.common_ok}, 0);
529
					NLS.bind(ProgressionUIMessages.error_theQueryIsAlreadyRepresentedByACurveInTheGraphic, query), 0, new String[] { TXMCoreMessages.common_ok}, 0);
529 530
			d.open();
530 531
			return true;
531 532
		}
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1008)
223 223
			}
224 224

  
225 225
			@Override
226
			public void partActivated(IWorkbenchPartReference partRef) { }
226
			public void partActivated(IWorkbenchPartReference partRef) {
227
				CorporaView.refresh();
228
			}
227 229

  
228 230
			@Override
229 231
			public void partBroughtToTop(IWorkbenchPartReference partRef) { }
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/StructuralUnitPropertiesComboViewer.java (revision 1008)
3 3
 */
4 4
package org.txm.rcp.swt.widget.structures;
5 5

  
6
import java.util.ArrayList;
7
import java.util.List;
8

  
6 9
import org.eclipse.swt.SWT;
7 10
import org.eclipse.swt.widgets.Composite;
8 11
import org.txm.core.results.TXMResult;
......
72 75
	 * @param su
73 76
	 */
74 77
	public void updateFromStructuralUnit(StructuralUnit su)	{
75
		this.updateFromList(su.getUserDefinedProperties(), null);
78
		List<StructuralUnitProperty> properties;
79
		if(su != null)	{
80
			properties = su.getUserDefinedProperties();
81
		}
82
		else	{
83
			properties = new ArrayList<StructuralUnitProperty>(0);
84
		}
85
		this.updateFromList(properties, null);
76 86
	}
77 87

  
78 88
	/**
tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/BaseAbstractHandler.java (revision 1008)
125 125
	 * @param event
126 126
	 * @return
127 127
	 */
128
	public TXMResult getActiveEditorResult(ExecutionEvent event)	{
129
		return this.getActiveEditor(event).getResult();
128
	public static TXMResult getActiveEditorResult(ExecutionEvent event)	{
129
		try {
130
			return getActiveEditor(event).getResult();
131
		}
132
		catch (Exception e) {
133
			return null;
134
		}
130 135
	}
131 136

  
132 137
	/**
......
134 139
	 * @param event
135 140
	 * @return
136 141
	 */
137
	public TXMEditor getActiveEditor(ExecutionEvent event)	{
138
		return (TXMEditor) HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActivePart();
142
	public static TXMEditor getActiveEditor(ExecutionEvent event)	{
143
		if(event != null)	{
144
			return (TXMEditor) HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getActivePart();
145
		}
146
		else	{
147
			return (TXMEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
148
		}
139 149
	}
140 150
	
141 151
	/**
......
146 156
	 * @return
147 157
	 */
148 158
	public TXMResult getResultParent(ExecutionEvent event)	{
149
		return this.getActiveEditorResult(event).getParent();
159
		return getActiveEditorResult(event).getParent();
150 160
	}
151 161
	
152 162
	
tmp/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapter.java (revision 1008)
15 15
import org.eclipse.ui.model.WorkbenchAdapter;
16 16
import org.txm.core.preferences.TBXPreferences;
17 17
import org.txm.core.results.TXMResult;
18
import org.txm.rcp.handlers.BaseAbstractHandler;
18 19

  
19 20
/**
20 21
 * Base adapter for TXM result objects.
......
54 55

  
55 56
	@Override
56 57
	public FontData getFont(Object element) {
57
//		PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_ELEMENT);
58
//		FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0];
59
//		fontData.setStyle(SWT.BOLD);
60
//		return fontData;
58
		// FIXME: font tests
59
		if(element instanceof TXMResult && element == BaseAbstractHandler.getActiveEditorResult(null))	{
60
			FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0];
61
			fontData.setStyle(SWT.ITALIC);
62
			return fontData;
63
		}
61 64
		return null;
62 65
	}
63 66

  
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java (revision 1008)
464 464

  
465 465
		// Same lines stroke
466 466
		if(!TXMPreferences.isEmpty(commandNodeQualifier, ChartsEnginePreferences.MULTIPLE_LINE_STROKES))	{
467
			page.addField(new BooleanFieldEditor(ChartsEnginePreferences.MULTIPLE_LINE_STROKES, "Multiple lines stroke", composite));
467
			page.addField(new BooleanFieldEditor(ChartsEnginePreferences.MULTIPLE_LINE_STROKES, SWTComponentsProviderMessages.preferences_multipleLineStrokeStyles, composite));
468 468
		}
469 469

  
470 470
		
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/SWTComponentsProviderMessages.java (revision 1008)
35 35

  
36 36
	public static String toolbar_showHideRenderingParameters;
37 37

  
38
	public static String preferences_multipleLineStrokeStyles;
38 39
	
39 40
	
41
	
40 42
	static {
41 43
		// initialize resource bundle
42 44
		Utf8NLS.initializeMessages(BUNDLE_NAME, SWTComponentsProviderMessages.class);
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages_ru.properties (revision 1008)
1 1

  
2 2
ChartsEnginePreferencePage_RenderingModeGrayscale = Ч/Б линии
3

  
4
preferences_multipleLineStrokeStyles = Различные стили строк
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages_fr.properties (revision 1008)
19 19
SWTChartsComponentProvider_SHOW_LEGEND      = Afficher la légende
20 20
SWTChartsComponentProvider_SHOW_TITLE       = Afficher le titre
21 21

  
22
preferences_multipleLineStrokeStyles = Styles de ligne multiples
23

  
22 24
toolbar_rendering                   = Rendu
23 25
toolbar_showHideRenderingParameters = Afficher/Masquer les paramètres de rendu
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/messages/messages.properties (revision 1008)
19 19
SWTChartsComponentProvider_SHOW_HIDE_TITLE  = Show/hide title
20 20
SWTChartsComponentProvider_SHOW_LEGEND      = Show legend
21 21
SWTChartsComponentProvider_SHOW_TITLE       = Show title
22
toolbar_rendering=Rendering
23
toolbar_showHideRenderingParameters=Show/Hide rendering parameters
22

  
23
preferences_multipleLineStrokeStyles = Multiple line stroke styles
24

  
25
toolbar_rendering                   = Rendering
26
toolbar_showHideRenderingParameters = Show/Hide rendering parameters

Formats disponibles : Unified diff