hallvard / plantuml

Embed UML diagrams in files and view them in Eclipse
http://plantuml.sourceforge.net/
209 stars 57 forks source link

IllegalArgumentException on startup due to use of multi-language method #93

Closed steghoja closed 4 years ago

steghoja commented 5 years ago

When starting Eclipse with PlantUML 1.1.23, I receive the following error and stacktrace:

!ENTRY org.eclipse.equinox.registry 4 0 2019-04-23 11:47:41.213
!MESSAGE The requested multi-language operation is not enabled. See runtime option "-registryMultiLanguage".  
!STACK 0
java.lang.IllegalArgumentException
    at org.eclipse.core.internal.registry.ExtensionRegistry.logMultiLangError(ExtensionRegistry.java:1388)
    at org.eclipse.core.internal.registry.ConfigurationElement.getAttribute(ConfigurationElement.java:268)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.getAttribute(ConfigurationElementHandle.java:38)
    at net.sourceforge.plantuml.eclipse.Activator.processDiagramTextProviders(Activator.java:181)
    at net.sourceforge.plantuml.eclipse.Activator.getDiagramTextProviders(Activator.java:121)
    at net.sourceforge.plantuml.eclipse.views.AbstractDiagramSourceView.registerListeners(AbstractDiagramSourceView.java:216)
    at net.sourceforge.plantuml.eclipse.views.AbstractDiagramSourceView.createPartControl(AbstractDiagramSourceView.java:90)
    at net.sourceforge.plantuml.eclipse.views.PlantUmlView.createPartControl(PlantUmlView.java:85)

The offending statement in Activator.java is

info.id = ces.getAttribute("id", null);

where ces is of type IConfigurationElement. According to the JavaDoc, this could be replaced with ces.getAttribute("id") to use a non-localised version, in particular since the locale is null anyway.

hallvard commented 5 years ago

I think I assumed the second argument was the default value of the attribute, not the locale. But still it seemed to worked without problems when I tried it myself... I'll add this issue to the next milestone.