Skip to content

The default implementation of the Property View should not try to handle a multi valuated EStructuralFeature of type String #1431

Closed
@adaussy

Description

@adaussy
  • I have checked that this bug has not yet been reported by someone else
  • I have checked that this bug appears on Chrome
  • I have specified the version : 2022.9.8
  • I have specified my environment : - All

Screenshots

java.util.concurrent.ExecutionException: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap')
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[na:na]
	at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessor.handle(EditingContextEventProcessor.java:217) ~[classes/:na]
	at org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessorRegistry.lambda$1(EditingContextEventProcessorRegistry.java:76) ~[classes/:na]
Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap')
	at org.eclipse.uml2.uml.internal.impl.OpaqueBehaviorImpl.eSet(OpaqueBehaviorImpl.java:522) ~[org.eclipse.uml2.uml_5.5.0.v20210228-1829.jar:na]
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1110) ~[org.eclipse.emf.ecore_2.28.0.v20220817-1401.jar:na]
	at org.eclipse.sirius.components.compatibility.emf.properties.EStringIfDescriptionProvider.lambda$3(EStringIfDescriptionProvider.java:118) ~[classes/:na]
	at org.eclipse.sirius.components.forms.components.TextareaComponent.lambda$0(TextareaComponent.java:52) ~[classes/:na]
	at org.eclipse.sirius.components.collaborative.forms.handlers.EditTextfieldEventHandler.lambda$1(EditTextfieldEventHandler.java:94) ~[classes/:na]
	at java.base/java.util.Optional.map(Optional.java:265) ~[na:na]
	at org.eclipse.sirius.components.collaborative.forms.handlers.EditTextfieldEventHandler.handle(EditTextfieldEventHandler.java:94) ~[classes/:na]

Steps to reproduce

  • Use a Metamodel with a EClass that contains a EAttribute with an upper bounds superior to 1 of type EString
  • Display the element in the property view
  • Try to edit the value

Expected behavior

Do not display the String widget on those cases

Actual behavior

The widget is displayed

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions