archi
archi copied to clipboard
[feature request] filter orphans
Hi,
First: Thank you for your time giving us this great tool.
I would like to suggest the following feature: A filter option to filter orphan elements. I consider a element an orphan when it is not used in a view. These are already visible in the model by it's italic font, but filtering would make maintaining the model a lot easier. If it is not to much of a trouble, I would like to request also a filter option for elements that have no relations to other elements.
Thank you for taking this into consideration.
Matthijs
filtering would make maintaining the model a lot easier.
If the aim is to maintain the model by removing "orphan" elements or elements that have no relations to other elements then the following jArchi script is even easier than filtering and manually deleting them.
// jArchi script to delete orphan elements (not in a view) or elements that have no incoming or outgoing relations
$("element").forEach(element => {
if($(element).viewRefs().isEmpty() || $(element).rels().isEmpty()) {
element.delete();
console.log("Deleted: " + element);
}
});
All elements unused in a view are listed in Validator warnings