Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Model changed during edition warning for numeric attributes
Model changed during edition warning for numeric attributes [message #1848008] Wed, 17 November 2021 11:34 Go to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 334
Registered: August 2013
Senior Member
Hi

I edit a numeric attribute in a model using property editor. For example the type of attribute is Double. And I input value "1". After that I get the following message:

index.php/fa/41328/0/

I understand why I get it. String "1" is converted into double 1. The double 1 is converted to string "1.0". "1" doesn't equal "1.0", so I get this warning. Maybe the right way is to define and use custom widgets for numeric attributes, but it seems a too complicated solution. The simpler way is to add the following lines to my Eclipse product activator:

import org.eclipse.eef.ide.ui.internal.preferences.EEFPreferences;
import org.eclipse.eef.ide.ui.internal.widgets.EEFTextLifecycleManager.ConflictResolutionMode;
// ..
EEFPreferences.setTextConflictResolutionMode(ConflictResolutionMode.USE_MODEL_VERSION);

But this API is internal and it looks like a hack. What is a right approach?
Re: Model changed during edition warning for numeric attributes [message #1848009 is a reply to message #1848008] Wed, 17 November 2021 11:56 Go to previous message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 334
Registered: August 2013
Senior Member
Oops. Sory for spam. It seems that the right solution is to add the following line to plugin_customization.ini for my Eclipse product:
org.eclipse.eef.ide.ui/TEXT_CONFLICT_RESOLUTION_MODE=USE_MODEL_VERSION
Previous Topic:SiriusTabDescriptorProvider performance
Next Topic:How to call own Java Method in Sirius
Goto Forum:
  


Current Time: Sun Nov 27 00:04:30 GMT 2022

Powered by FUDForum. Page generated in 0.02241 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top