@Override public boolean tryAddDefinition(ModifiableIndexedClass target, ModifiableIndexedClassExpression definition, ElkAxiom reason) { if (!incrementalMode) return super.tryAddDefinition(target, definition, reason); // for incremental mode: IndexedClassExpression removedDefintion = removedDefinitions_ .get(target); ElkAxiom removedDefinitionReason = removedDefinitionReasons_ .get(target); if (target.getDefinition() != removedDefintion || addedDefinitions_.get(target) != null) { // the existing definition was not removed or some definition has // been added return false; } // else removing if (removedDefintion == definition && removedDefinitionReason.equals(reason)) { removedDefinitions_.remove(target); removedDefinitionReasons_.remove(target); target.setDefinition(definition, reason); } else { addedDefinitions_.put(target, definition); addedDefinitionReasons_.put(target, reason); } return true; }
@Override public boolean tryAddDefinition(ModifiableIndexedClass target, ModifiableIndexedClassExpression definition, ElkAxiom reason) { if (!incrementalMode) return super.tryAddDefinition(target, definition, reason); // for incremental mode: IndexedClassExpression removedDefintion = removedDefinitions_ .get(target); ElkAxiom removedDefinitionReason = removedDefinitionReasons_ .get(target); if (target.getDefinition() != removedDefintion || addedDefinitions_.get(target) != null) { // the existing definition was not removed or some definition has // been added return false; } // else removing if (removedDefintion == definition && removedDefinitionReason.equals(reason)) { removedDefinitions_.remove(target); removedDefinitionReasons_.remove(target); target.setDefinition(definition, reason); } else { addedDefinitions_.put(target, definition); addedDefinitionReasons_.put(target, reason); } return true; }
@Override public boolean tryAddDefinition(ModifiableIndexedClass target, ModifiableIndexedClassExpression definition, ElkAxiom reason) { if (!incrementalMode) return super.tryAddDefinition(target, definition, reason); // for incremental mode: IndexedClassExpression removedDefintion = removedDefinitions_ .get(target); ElkAxiom removedDefinitionReason = removedDefinitionReasons_ .get(target); if (target.getDefinition() != removedDefintion || addedDefinitions_.get(target) != null) { // the existing definition was not removed or some definition has // been added return false; } // else removing if (removedDefintion == definition && removedDefinitionReason.equals(reason)) { removedDefinitions_.remove(target); removedDefinitionReasons_.remove(target); target.setDefinition(definition, reason); } else { addedDefinitions_.put(target, definition); addedDefinitionReasons_.put(target, reason); } return true; }