How do I get a list of available styles in the current project? They are contained in IStyleSetContainer , but how do I get it?
I asked, I’ll answer
I don’t know if this is the right solution, but it works.
ApplicationManager am = ApplicationManager.instance();
IProject project = am.getProjectManager().getProject();
IStyleSetContainer styleSetContainer = (IStyleSetContainer)project.toAllLevelModelElementArray(IModelElementFactory.MODEL_TYPE_STYLE_SET_CONTAINER);
Yes, you are correct. If you have any questions about the use of IStyleSetContainer, please feel free to let us know.