Skip to content

Commit

Permalink
reorganize methods
Browse files Browse the repository at this point in the history
  • Loading branch information
pazi146 authored and azoitl committed May 15, 2024
1 parent 1f6f6b1 commit bf0ac40
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ public void importLibrary(final java.net.URI uri) {
if (isNewVersion) {
// clean up if there was a version before
cleanupOldLibraryVersion();
// show affected elements
showUpdatedElements();
}
} catch (final CoreException | IOException e) {
Display.getDefault().syncExec(() -> MessageDialog.openWarning(null, Messages.Warning,
Expand Down Expand Up @@ -264,6 +266,9 @@ private void cleanupOldLibraryVersion() {
// remove obsolete types
cachedTypes.values().forEach(
typeEntry -> TypeLibraryManager.INSTANCE.getTypeLibrary(selectedProject).removeTypeEntry(typeEntry));
}

private void showUpdatedElements() {
final BlockTypeInstanceSearch search = new BlockTypeInstanceSearch(oldTypes);
final List<FBNetworkElement> elements = search.performSearch().stream()
.filter(FBNetworkElement.class::isInstance).map(FBNetworkElement.class::cast).toList();
Expand All @@ -274,7 +279,6 @@ private void cleanupOldLibraryVersion() {
updateDialog.open();

});

}

@Override
Expand Down

0 comments on commit bf0ac40

Please sign in to comment.