Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » User Enum Promt EOL
User Enum Promt EOL [message #1051779] Mon, 29 April 2013 08:06 Go to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 240
Registered: January 2013
Location: Izmir
Senior Member
Hi all,

I want to create a prompt which want Enum Literal from User.

I have Enum on my metamodel(ecore) like;


ENUM EXT
   EMPTY 0
   PNG 1
   TXT 2



i write this for choose but it throws error

var targetEXT := UserInput.choose('Select target', EXT);


is anyone can help me to solve this problem ?

Eror;

Undefined variable, type or model: 'EXT' (bundleentry://943.fwk144050306/wizards/filesystem.ewl@112:20)
	at org.eclipse.epsilon.eol.execute.NameExecutor.execute(NameExecutor.java:84)
	at org.eclipse.epsilon.eol.execute.NameExecutor.execute(NameExecutor.java:97)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.ParametersExecutor.execute(ParametersExecutor.java:29)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.PointExecutor.executeOperation(PointExecutor.java:131)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:75)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:44)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:90)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.AssignExecutor.execute(AssignExecutor.java:48)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:196)
	at org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execute(StatementBlockExecutor.java:26)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:196)
	at org.eclipse.epsilon.eol.execute.IfStatementExecutor.execute(IfStatementExecutor.java:43)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:196)
	at org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execute(StatementBlockExecutor.java:26)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.ewl.EwlWizard.process(EwlWizard.java:78)
	at org.eclipse.epsilon.ewl.EwlWizardInstance.process(EwlWizardInstance.java:66)
	at org.eclipse.epsilon.ewl.emf.ExecuteWizardInstanceCommand.execute(ExecuteWizardInstanceCommand.java:42)
	at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at org.eclipse.epsilon.ewl.emf.AbstractContributeWizardsAction.execute(AbstractContributeWizardsAction.java:135)
	at org.eclipse.epsilon.ewl.emf.AbstractContributeWizardsAction$1.widgetSelected(AbstractContributeWizardsAction.java:260)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	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.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.jface.action.ActionContributionItem$9.handleEvent(ActionContributionItem.java:1284)
	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)



Regards

[Updated on: Mon, 29 April 2013 08:13]

Report message to a moderator

Re: User Enum Promt EOL [message #1051819 is a reply to message #1051779] Mon, 29 April 2013 08:57 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 913
Registered: July 2009
Senior Member
Off the top of my head, the following should work

UserInput.choose('Select target', Sequence{EXT#EMPTY, EXT#PNG, EXT#TXT});

Cheers,
Dimitris
Re: User Enum Promt EOL [message #1053030 is a reply to message #1051819] Thu, 02 May 2013 06:39 Go to previous message
serhat gezgin is currently offline serhat gezginFriend
Messages: 240
Registered: January 2013
Location: Izmir
Senior Member
yes it works

thanks
Previous Topic:Collapseble nodes?
Next Topic:GMF integration with Xtext
Goto Forum:
  


Current Time: Fri Nov 28 13:49:28 GMT 2014

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

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