Skip to content

Instantly share code, notes, and snippets.

@keiono
Created December 17, 2013 17:56
Show Gist options
  • Save keiono/8009543 to your computer and use it in GitHub Desktop.
Save keiono/8009543 to your computer and use it in GitHub Desktop.
// VMM is VisualMappingManager
VisualStyle psiStyle = null;
for (VisualStyle style : vmm.getAllVisualStyles()) {
if (style.getTitle().equals(PSIMI25VisualStyleBuilder.DEF_VS_NAME)) {
psiStyle = style;
break;
}
}
if (psiStyle == null) {
psiStyle = vsBuilder.getVisualStyle();
vmm.addVisualStyle(psiStyle);
}
vmm.setCurrentVisualStyle(psiStyle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment