mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-09 21:05:46 -04:00
removes genericCode from generated concrete circuits
This commit is contained in:
parent
fed6329dce
commit
17b6b904e8
@ -318,4 +318,16 @@ public class ElementAttributes implements HGSMap {
|
|||||||
return null;
|
return null;
|
||||||
return cache.get(key);
|
return cache.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes an entry from the cache.
|
||||||
|
*
|
||||||
|
* @param key the key to remove
|
||||||
|
* @return the previous value associated with key, or null if there was no mapping for key.
|
||||||
|
*/
|
||||||
|
public Object removeFromCache(String key) {
|
||||||
|
if (cache == null)
|
||||||
|
return null;
|
||||||
|
return cache.remove(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,9 @@ public class ResolveGenerics {
|
|||||||
* @return this for chained calls
|
* @return this for chained calls
|
||||||
*/
|
*/
|
||||||
public CircuitHolder cleanupConcreteCircuit() {
|
public CircuitHolder cleanupConcreteCircuit() {
|
||||||
for (VisualElement gic : circuit.getElements(v -> v.equalsDescription(GenericInitCode.DESCRIPTION)))
|
for (VisualElement gic : circuit.getElements(v ->
|
||||||
|
v.equalsDescription(GenericInitCode.DESCRIPTION)
|
||||||
|
|| v.equalsDescription(GenericCode.DESCRIPTION)))
|
||||||
circuit.delete(gic);
|
circuit.delete(gic);
|
||||||
for (VisualElement v : circuit.getElements()) {
|
for (VisualElement v : circuit.getElements()) {
|
||||||
try {
|
try {
|
||||||
@ -266,7 +268,7 @@ public class ResolveGenerics {
|
|||||||
// can not happen
|
// can not happen
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
v.getElementAttributes().putToCache(GEN_ARGS_KEY, null);
|
v.getElementAttributes().removeFromCache(GEN_ARGS_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
circuit.getAttributes().set(Keys.IS_GENERIC, false);
|
circuit.getAttributes().set(Keys.IS_GENERIC, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user