NsLock issue [message #663925] |
Wed, 06 April 2011 16:11  |
Eclipse User |
|
|
|
Dear all,
I'm developing an editor and I have the need of set a property of an object when I insert it in an instance of the model. This property is a String and I have built a Dialog in order to define it.
I open this JDialog in the doExecuteWithResult method but unfortunately it block the entire application. This is the code:
protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
IAdaptable info) throws ExecutionException {
featureModel.Constraint newElement = featureModel.featureModelFactory.eINSTANCE
.createConstraint();
featureModel.FeatureModel model = (featureModel.FeatureModel) getElementToEdit();
model.getConstraints().add(newElement);
ArrayList<featureModel.Feature> features = model.getAllFeatures();
ArrayList<String> featuresName = new ArrayList<String>();
for (Iterator<featureModel.Feature> iterator = features.iterator(); iterator.hasNext();) {
featuresName.add(iterator.next().getName());
}
ConstraintRuleDialog dialog = new ConstraintRuleDialog(featuresName);
// It is a modal JDialog
String rule = dialog.getRule();
newElement.setRule(rule);
doConfigure(newElement, monitor, info);
((CreateElementRequest) getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
The console returns an exception regarding a NsConditionLock.
2011-04-06 21:36:41.097 java[54761:17d03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1200096f0> '(null)') unlocked when not locked
2011-04-06 21:36:41.097 java[54761:17d03] *** Break on _NSLockError() to debug.
Does anyone know how can i sOlve this problem?
Regards,
Luca
[Updated on: Wed, 06 April 2011 19:06] by Moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04327 seconds