Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
steghoja opened this issue Apr 23, 2019 · 1 comment
Closed
Milestone

Comments

@steghoja
Copy link

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.

@steghoja steghoja changed the title IllegalArgumentException on startup due to attempted use of multi-language method IllegalArgumentException on startup due to use of multi-language method Apr 23, 2019
@hallvard hallvard added this to the 1.1.24 milestone Apr 23, 2019
@hallvard
Copy link
Owner

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.

Bananeweizen added a commit to Bananeweizen/plantuml that referenced this issue Sep 19, 2019
Use the non-locale variant of the method to avoid the exception.
steghoja pushed a commit to steghoja/plantuml that referenced this issue Mar 27, 2020
As an extension to issue hallvard#93, this commit introduces
changes to allow updating the diagram based on the
view that PlantUML last used (i.e., the currentPart)
instead of the view that is currently in focus. To make
this work, PlantUML now ignores its own view (i.e., does
not set the view in which it renders the diagram as the
current part) and has a new method
updateDiagramTextFromCurrentPart() which updates the
diagram based on the currently set currentPart.
steghoja pushed a commit to steghoja/plantuml that referenced this issue Jun 26, 2020
As an extension to issue hallvard#93, this commit introduces
changes to allow updating the diagram based on the
view that PlantUML last used (i.e., the currentPart)
instead of the view that is currently in focus. To make
this work, PlantUML now ignores its own view (i.e., does
not set the view in which it renders the diagram as the
current part) and has a new method
updateDiagramTextFromCurrentPart() which updates the
diagram based on the currently set currentPart.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants