Best way to edit another plugin's preferences

 I have an internal plugin that wants to change links to our issue system to be clickable. Today on plugin load I invoke:

List<IssueNavigationLink> currentLinks = IssueNavigationConfiguration.getInstance(myProject).getLinks();
Set<IssueNavigationLink> linkSet = new HashSet<>(currentLinks);

linkSet.add(new IssueNavigationLink("", ""));

IssueNavigationConfiguration.getInstance(myProject).setLinks(new ArrayList<>(linkSet))

Is there a better way than this since this changes the internal state of the IssueNavigationConfiguration which is persisted using @State?

Please sign in to leave a comment.