Révision 1583

tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1583)
830 830
									&& !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMCoreMessages.bind(TXMUIMessages.warning_popup_theP0HasBeenEditedItsChangesWillBeLost, TXMEditor.this.getResult().getResulType()))) {
831 831
										setCanceled(true);
832 832
								}
833
								else	{
833
								// popup alert to inform user that children results will be recomputed
834
								if(!TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER)
835
										&& TXMEditor.this.getResult().hasVisibleChild() && !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMUIMessages.warning_popup_allDescendantResultsWillBeUpdated))	{
836
									setCanceled(true);
837
								}
838
								
834 839

  
835
									// FIXME: SJ: this code doesn't work well, commented because a rendering parameter change in CA display the popup because of the Eigenvalues children
836
									// FIXME: SJ: to fix that, temporarily or not, I had finally this test on the visibility state of the children. Actually this test may be useful for any result type
837
									// popup alert to inform user that children results will be recomputed
838
									if(!TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER)
839
											&& TXMEditor.this.getResult().hasVisibleChild() && !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMUIMessages.warning_popup_allDescendantResultsWillBeUpdated))	{
840
										setCanceled(true);
841
									}
842
									
840
								
841
								// subclasses manual result updating from editor fields
842
								Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": manually updating result from editor."); //$NON-NLS-1$
843
								updateResultFromEditor();
843 844

  
844
									
845
									// subclasses manual result updating from editor fields
846
									Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": manually updating result from editor."); //$NON-NLS-1$
847
									updateResultFromEditor();
845
								// auto updating result from Parameter annotations in result <=> editor
846
								Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$
847
								autoUpdateResultFromEditorParameters();
848
	
848 849

  
849
									// auto updating result from Parameter annotations in result <=> editor
850
									Log.finer("TXMEditor.compute(): " + TXMEditor.this.getClass().getSimpleName() + ": auto updating result from editor."); //$NON-NLS-1$
851
									autoUpdateResultFromEditorParameters();
852
		
853

  
854
									
855
									// FIXME: SJ: useless at this time?
856
									// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed 
857
									//setLastComputingParameters(TXMEditor.this.getResult().getLastParametersFromHistory());
850
								
851
								// FIXME: SJ: useless at this time?
852
								// Stores the last parameters before the computing to later auto-update the Widgets only if some parameters have changed 
853
								//setLastComputingParameters(TXMEditor.this.getResult().getLastParametersFromHistory());
854
							}
855
							else	 {
856
								// popup alert to inform user that children results will be recomputed
857
								if(!TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER)
858
										&& TXMEditor.this.getResult().hasVisibleChild() && !MessageDialog.openQuestion(getShell(), TXMCoreMessages.common_warning, TXMUIMessages.warning_popup_allDescendantResultsWillBeUpdated))	{
859
									setCanceled(true);
858 860
								}
859 861

  
860 862
							}
......
1221 1223
				else	{
1222 1224
					try {
1223 1225
						f.set(this, value);
1224
					} catch(Exception e) {
1225
						Log.fine(NLS.bind("Warning: can't assignate value={0} to editor member={1}.", value, f));
1226 1226
					}
1227
					catch(Exception e) {
1228
						Log.fine(TXMCoreMessages.bind("Warning: can't assignate new value={0} to editor member={1} which have current value={2}.", value, f, object));
1229
					}
1227 1230
				}
1228 1231

  
1229 1232
				// FIXME: debug
......
1346 1349
			}
1347 1350
			catch (IllegalArgumentException e) {
1348 1351
				// TODO Auto-generated catch block
1349
				System.err.println("TXMEditor.autoUpdateResultFromEditorParameters(): Error with field " + parameter.key()); //$NON-NLS-1$
1352
				Log.severe("TXMEditor.autoUpdateResultFromEditorParameters(): Error with field " + parameter.key()); //$NON-NLS-1$
1350 1353
				e.printStackTrace();
1351 1354
			}
1352 1355
			catch (IllegalAccessException e) {

Formats disponibles : Unified diff