Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • af3/kernel
  • diewald/kernel
2 results
Show changes
Commits on Source (6)
AnnotationInstSpec.java 7a6cb55bfa9cafa9ead1f72089e554ee8142e8bf GREEN
DerivedAnnotationValueProviderBase.java afedd21d3469127bbb20adb34c191b5c9c980f6c GREEN
EStructuralFeatureDescriptor.java 0c4b8037481b4f20c5492b68be7096273645a912 GREEN
EStructuralFeatureValueProviderBase.java 8dcecac16f8f654732ee0af7098443fe13ce1c85 GREEN
EStructuralFeatureValueProviderBase.java 2c96bbfa622aa09bb2512475f393c28318a7e685 GREEN
IAnnotationValueProvider.java 08e0e5f66dc97865e9ac03e1ac646af332845e14 GREEN
ValueProviderBase.java e4e866840845346ec99a4304048f5327c4890996 GREEN
......@@ -223,14 +223,15 @@ public abstract class EStructuralFeatureValueProviderBase<T extends IAnnotatedSp
// In case the last occurrence of a value choice has been removed, it will no longer
// be offered in the combo box.
if(((String)value).isEmpty()) {
String rval = determineCurrentAnnotationValueAndUpdateInputChoice((String)value,
value = (U)determineCurrentAnnotationValueAndUpdateInputChoice((String)value,
specification);
if(rval != null) {
value = (U)rval;
}
}
setAnnotationValueFromString((String)value, specification);
if(value != null) {
setAnnotationValueFromString((String)value, specification);
} else {
specification.eUnset(eStructuralFeature);
}
} else {
if(eStructuralFeature.isMany()) {
Collection<?> collection = (value instanceof Collection<?>) ? (Collection<?>)value
......
AutoUndoCommandStack.java fc326adf66c6cea2354884cdc240da5f2f82689a GREEN
EMFTransactionalCommand.java ba4b5bead9768b6ce6c955b9238cd96cb722533c GREEN
EclipseResourceStorageService.java 5e60ef7628ea2ad4113cfebde939341e1b1f6cf2 GREEN
ModelContext.java 76eeaef7f56da5f0e288cf96792850be606b7757 GREEN
ModelContext.java 484298fe527a4b83a6dceaef5dd459f874f8b737 GREEN
NonDirtyingEMFTransactionalCommand.java d288ebe35d22442c603496b0c917fb99a8febeea GREEN
......@@ -20,6 +20,7 @@ import static org.eclipse.core.resources.IResource.DEPTH_ZERO;
import static org.eclipse.emf.common.util.URI.createPlatformResourceURI;
import static org.fortiss.tooling.kernel.utils.EMFResourceUtils.buildOptionsMap;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.showError;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.warning;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.generateMissingIDs;
......@@ -55,6 +56,8 @@ import org.eclipse.emf.ecore.util.Diagnostician;
import org.eclipse.emf.ecore.util.EContentAdapter;
import org.eclipse.emf.ecore.xmi.XMIResource;
import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.emf.transaction.ExceptionHandler;
import org.eclipse.emf.transaction.RollbackException;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.fortiss.tooling.kernel.ToolingKernelActivator;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
......@@ -123,6 +126,18 @@ class ModelContext implements ITopLevelElement, CommandStackListener {
transactionalCommandStack = new AutoUndoCommandStack(editingDomain);
transactionalCommandStack.addCommandStackListener(this);
transactionalCommandStack.setExceptionHandler(new ExceptionHandler() {
@Override
public void handleException(Exception e) {
// Each original exception results into a RollbackException that undoes the changes
// of the failed command
if(!(e instanceof RollbackException)) {
showError(e.getMessage());
error(ToolingKernelActivator.getDefault(), e.getMessage(), e);
}
}
});
// Install adapter to maintain XMI IDs
resource.eAdapters().add(new EContentAdapter() {
......