Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL][EOL] Method not found(Why EOL operations are not found?)
icon9.gif  [EVL][EOL] Method not found [message #1572057] Mon, 19 January 2015 01:08 Go to next message
Felipe Lopes is currently offline Felipe LopesFriend
Messages: 1
Registered: January 2015
Junior Member
Hi,

I'm creating a validation plugin (based on the "Live validation and quick-fixes in GMF-based editors with EVL" article). My EVL file has the following content:
context NetworkNode {
	constraint hasCapitalName {
	 		
		check : self.name.toUpperCase() = self.name
		
		message : 'Name ' + self.eClass().name + ' is not in capital.'
	
	}	
} 


However, when I try to validate my model, the following exception occurs:

Method 'toUpperCase' not found
at (bundleresource://1002.fwk13905225:1/src/mdn/validation/validation.evl@4:10-4:33)
at (bundleresource://1002.fwk13905225:1/src/mdn/validation/validation.evl@4:10-4:45)

at org.eclipse.epsilon.eol.dom.OperationCallExpression.execute(OperationCallExpression.java:133)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:109)
at org.eclipse.epsilon.eol.dom.OperatorExpression.execute(OperatorExpression.java:60)
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:109)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.executeBlockOrExpressionAst(ExecutableBlock.java:75)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:86)
at org.eclipse.epsilon.eol.dom.ExecutableBlock.execute(ExecutableBlock.java:115)
at org.eclipse.epsilon.evl.dom.Constraint.check(Constraint.java:88)
at org.eclipse.epsilon.evl.dom.ConstraintContext.checkAll(ConstraintContext.java:101)
at org.eclipse.epsilon.evl.EvlModule.execute(EvlModule.java:147)
at org.eclipse.epsilon.evl.emf.validation.EvlValidator.validate(EvlValidator.java:252)
at org.eclipse.epsilon.evl.emf.validation.EvlValidator.validate(EvlValidator.java:155)
at org.eclipse.epsilon.evl.emf.validation.CompositeEValidator.validate(CompositeEValidator.java:47)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:159)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:108)
at mdn.diagram.part.ValidateAction.runEMFValidator(ValidateAction.java:146)
at mdn.diagram.part.ValidateAction.validate(ValidateAction.java:160)
at mdn.diagram.part.ValidateAction.access$0(ValidateAction.java:154)
at mdn.diagram.part.ValidateAction$2.run(ValidateAction.java:131)
at mdn.diagram.providers.MdnValidationProvider$1.run(MdnValidationProvider.java:40)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at mdn.diagram.providers.MdnValidationProvider.runWithConstraints(MdnValidationProvider.java:48)
at mdn.diagram.part.ValidateAction.runValidation(ValidateAction.java:128)
at mdn.diagram.part.ValidateAction$1.run(ValidateAction.java:76)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at mdn.diagram.part.ValidateAction.run(ValidateAction.java:79)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Am I missing something?
Re: [EVL][EOL] Method not found [message #1582416 is a reply to message #1572057] Sat, 24 January 2015 16:12 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1590
Registered: July 2009
Location: York, UK
Senior Member

Hi Felipe,

Apologies for the slow response - this somehow slipped past the radar. Is there any chance that self.name is returning null?

Cheers,
Dimitris
Re: [EVL][EOL] Method not found [message #1752678 is a reply to message #1582416] Thu, 26 January 2017 01:57 Go to previous messageGo to next message
Lina Ochoa is currently offline Lina OchoaFriend
Messages: 8
Registered: January 2017
Junior Member
Hi,

Currently I am working with ETL files and when I execute them everything works fine.

In addition, I wanted to made some control modifications to a model with an EOL program. I have the following code structure:

operation1();

operation operation1(){
 //calls operation2
 operation2();
}

operation operation2(){
 //does something
}


When I execute the EOL program I obtained a "Method 'operation2' not found". The model is being read but the operations are not found. I don't understand why this is happening. Do you have any clue?
Re: [EVL][EOL] Method not found [message #1752691 is a reply to message #1752678] Thu, 26 January 2017 08:26 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1590
Registered: July 2009
Location: York, UK
Senior Member

Hi Lina,

Could you please provide a minimal example [1] we can use to reproduce this?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: [EVL][EOL] Method not found [message #1752808 is a reply to message #1752691] Fri, 27 January 2017 14:27 Go to previous message
Lina Ochoa is currently offline Lina OchoaFriend
Messages: 8
Registered: January 2017
Junior Member
Hi Dimitris,

Sorry, It was my fault. I was declaring operations like:

operation Integer method1() {
 ...
}


Instead of:

operation method1() : Integer {
 ...
}


Everything is fine now. Thank you.
Previous Topic:Nesting doesnt work
Next Topic:Solution for exceeding the 65535 bytes limit error
Goto Forum:
  


Current Time: Wed Sep 26 00:44:03 GMT 2018

Powered by FUDForum. Page generated in 0.01927 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top