Evaluate dot expression

Hi all,

 

I would like to evaluate the following expression in MPS:

 

model/<modelname>/ in global repository.rootsIncludingImported(RequirementChunk).first.name.equals("reqChunk")

 

i used the eval() method on this and got the following exception:

java.lang.UnsupportedOperationException: [operand] DotExpression null[2753953272795704121]

 

Could anyone tell me which method would be best for evaluating the expression?

 

 

2 comments
Comment actions Permalink

Is it possible for you to share the complete stack trace?

0
Comment actions Permalink

Hi Sanjit,

 

Thhank you so much :)Here is the stack:

 

java.lang.UnsupportedOperationException: [operand] DotExpression null[6189568934964309244] in org.iets3.flow.core.instance.model
at jetbrains.mps.baseLanguage.behavior.Expression__BehaviorDescriptor.eval_idhEwJgmp(Expression__BehaviorDescriptor.java:46)
at jetbrains.mps.baseLanguage.behavior.Expression__BehaviorDescriptor.invokeSpecial0(Expression__BehaviorDescriptor.java:96)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invokeSpecial(BaseBHDescriptor.java:358)
at jetbrains.mps.core.aspects.behaviour.SMethodImpl.invokeSpecial(SMethodImpl.java:157)
at jetbrains.mps.baseLanguage.behavior.DotExpression__BehaviorDescriptor.eval_idhEwJgmp(DotExpression__BehaviorDescriptor.java:77)
at jetbrains.mps.baseLanguage.behavior.DotExpression__BehaviorDescriptor.invokeSpecial0(DotExpression__BehaviorDescriptor.java:120)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invokeSpecial(BaseBHDescriptor.java:358)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invokeVirtual(BaseBHDescriptor.java:330)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invoke(BaseBHDescriptor.java:220)
at jetbrains.mps.core.aspects.behaviour.SMethodImpl.invoke(SMethodImpl.java:132)
at jetbrains.mps.baseLanguage.behavior.DotExpression__BehaviorDescriptor.eval_idhEwJgmp(DotExpression__BehaviorDescriptor.java:71)
at jetbrains.mps.baseLanguage.behavior.DotExpression__BehaviorDescriptor.invokeSpecial0(DotExpression__BehaviorDescriptor.java:120)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invokeSpecial(BaseBHDescriptor.java:358)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invokeVirtual(BaseBHDescriptor.java:330)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invoke(BaseBHDescriptor.java:220)
at jetbrains.mps.core.aspects.behaviour.SMethodImpl.invoke(SMethodImpl.java:132)
at org.iets3.flow.core.intentions.populateDataModel_Intention$IntentionImplementation.execute(populateDataModel_Intention.java:138)
at com.mbeddr.mpsutil.intentions.runtime.OriginalIntentionMenu$3.doExecute(OriginalIntentionMenu.java:116)
at jetbrains.mps.editor.runtime.commands.EditorCommand.run(EditorCommand.java:54)
at jetbrains.mps.smodel.WorkbenchModelAccess$CommandRunnable$1.run(WorkbenchModelAccess.java:632)
at jetbrains.mps.smodel.WorkbenchModelAccess.runWriteAction(WorkbenchModelAccess.java:126)
at jetbrains.mps.smodel.WorkbenchModelAccess$CommandRunnable.run(WorkbenchModelAccess.java:627)
at jetbrains.mps.smodel.WriteActionDispatcher.run(WriteActionDispatcher.java:39)
at jetbrains.mps.smodel.WorkbenchModelAccess$7.run(WorkbenchModelAccess.java:363)
at jetbrains.mps.smodel.WorkbenchModelAccess$TryWriteActionRunnable$1.run(WorkbenchModelAccess.java:660)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:898)
at jetbrains.mps.smodel.WorkbenchModelAccess$TryWriteActionRunnable.run(WorkbenchModelAccess.java:656)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:129)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:100)
at jetbrains.mps.smodel.WorkbenchModelAccess.tryWriteInCommand(WorkbenchModelAccess.java:375)
at jetbrains.mps.smodel.EDTExecutor$3.tryRun(EDTExecutor.java:101)
at jetbrains.mps.smodel.EDTExecutor$Executor.worker(EDTExecutor.java:205)
at jetbrains.mps.smodel.EDTExecutor$Executor.access$300(EDTExecutor.java:130)
at jetbrains.mps.smodel.EDTExecutor$Executor$1.run(EDTExecutor.java:136)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:326)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:310)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:631)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
[4212293] INFO - xtapi.model.EditableSModelBase - Saving model FlowModel
[4212324] INFO - mps.smodel.MPSModuleRepository - Saving of the repository took 0.040 s

0

Please sign in to leave a comment.