3

When I want to run my .mas2j file in Eclipse, I always have to right click the file and then select "Run as Jason application". Is there a way to add a shortcut to do this?

Cleber Jorge Amaral
  • 1,316
  • 13
  • 26
  • Are there any _Jason_ commands in _Window > Preferences: General > Keys_ which can be bound to a shortcut? If selecting the file to run and hitting Alt+Shift+X, what commands shows the dialog that pops up? – howlger Nov 08 '18 at 14:01
  • No Jason commands there, Alt+Shift+X show commands to run as Java, Ant, JUnit and Maven. – George Burslem Nov 08 '18 at 18:59
  • Too bad. You could report this as a feature request to the development team of the Jason Eclipse plugin. – howlger Nov 09 '18 at 00:02

2 Answers2

0

Jason's "Run" button should be added to eclipse toolbar ("Step 14" of jason eclipse-plugin installation guide) and it is supposed to work. Anyway, you can save some time using shell, following instructions in jason's github page:

git clone https://github.com/jason-lang/jason.git
cd jason
gradle config

And run a project using a command like bellow:

jason examples/gold-miners-II/miners.mas2j

Another way, and actually my recommendation is moving to JaCaMo (which has Jason embedded). JaCaMo offers a gradle script for your projects. You can easily download JaCaMo from the repository and create a project from zero in one shot (first, go to your project root folder and then type):

curl -s -O http://jacamo.sourceforge.net/nps/np07.gradle
gradle -b np07.gradle --console=plain

After downloading JaCaMo, the script will ask you to type a name for your project, for instance, "test". So, go to "test" folder and type:

gradle run

The just created JaCaMo project should launch after this command. Besides good compiling performance, another advantage is that gradle will manage package dependencies.

Cleber Jorge Amaral
  • 1,316
  • 13
  • 26
0

This is usually the issue with uncategorized commands in Eclipse. I had the same issue with the Run JaCaMo Application option. In order to see all your plugin commands:

Go to Preferences -> General -> Keys. Click on Filters... and de-select Filter uncategorized commands then Ok.

Then you should be able to find the desired command in the Command list and add a preferred Binding.

Note: If Eclipse offers a command, it should be listed in the pop-up window that appears when hitting the Show a table of all available commands button of the Oomph toolbar. The table shows all the available commands, where you can find them, and all the defined shortcut keys.

stln
  • 23
  • 4