Eclipse plugin

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

Eclipse plugin

Postby lawrie » Fri Mar 14, 2014 9:13 am

There is a version of the Eclipse plugin for leJOS EV3 at http://lejos.sourceforge.net/tools/eclipse/plugin/ev3 for anyone brave enough to try it.

It is incomplete and still being developed.

You will need to import the latest version of the ev3snapshot project if you want to use the plugin.

The steps are:

1. Import ev3snapshot. Probably a good idea to build it with its build.xml file.
2. Install the plugin from the update site. This is done from Help > Install New Software and then Add... to add the update site, and then select and install leJOS EV3 Support.
3. Go to Windows > Preferences > Lejos EV3 and set EV3_HOME to the directory of ev3snapshot in your Eclipse workspace, and check "Run program after upload".
4. Create a LeJOS EV3 project, by File > New > Projects ... > Lejos EV3 > LeJOS EV3 Project.
5. Add a main method.
6. Make sure your EV3 is running the menu.
7. Right-click on the main menu, and select Run As > leJOS EV3 Program

The plugin, should then create a runnable jar file, upload it and run it.

It is probably worth checking that EV3Control and its search button work for you as if that doesn't work, the plugin probably won't either as it uses the same device discovery and Java RMI as EV£Control and the other tools use.

The main program I used to test it, is:

Code: Select all
import lejos.hardware.lcd.LCD;
import lejos.utility.Delay;

public class PlugTest {
   public static void main(String[] args) {
      LCD.drawString("Plugin Test", 0, 4);
      Delay.msDelay(5000);
   }
}


You can also convert existing projects to leJOS EV3 plugin projects by right-clicking on them and using the LeJOS EV3 context menu.

You can also upload files from any project using the LeJOS EV3 context menu.

The main feature that I still need to add is remote debugging.
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Re: Eclipse plugin

Postby floydbloke » Sun Mar 16, 2014 6:55 am

Apologies for my ignorance, but please can you tell me what the plug-in does? (I had a scout around the Wiki but couldn't find any reference to it.)
floydbloke
New User
 
Posts: 16
Joined: Mon Nov 04, 2013 7:04 pm

Re: Eclipse plugin

Postby lawrie » Sun Mar 16, 2014 9:48 am

It is not in the Wiki yet, as it designed to be used with a future release that is not out yet, but it can be used with the ev3snapshot project.

The idea of the plugin is to make it very easy to develop and run leJOS EV3 programs from Eclipse without using ant build files. You can create new leJOS EV3 projects and have everything set up correctly for you without having to add projects or libraries to your classpath. You can then run the main programs in those projects using Run As > leJOS EV3 projects (or using the run program icon) and have the upload and run on the EV3 done automatically.

A future version of the plugin will also support remote debugging in a much easier way than is currently possible.

The plugin also supports various other functions like importing the sample programs.

When we have a proper release of leJOS that does not require use of git, the plugin should make everything simpler.

Of course it won't be any use if you don't use Eclipse, so we will continue to support ant build files.
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Re: Eclipse plugin

Postby floydbloke » Sun Mar 16, 2014 7:37 pm

Thanks Lawrie. Sounds really useful. I'll give it a crack.
floydbloke
New User
 
Posts: 16
Joined: Mon Nov 04, 2013 7:04 pm

Re: Eclipse plugin

Postby RapunzelLover » Thu Mar 20, 2014 2:01 pm

When this plugin come to life in Eclipse Marketplace !!!
Ideas are beautiful, but their implementations some time failure.
User avatar
RapunzelLover
New User
 
Posts: 10
Joined: Thu Mar 20, 2014 1:57 pm
Location: Poland

Re: Eclipse plugin

Postby skoehler » Thu Mar 20, 2014 6:38 pm

RapunzelLover wrote:When this plugin come to life in Eclipse Marketplace !!!

Why are you shouting? Anyhow, I will add it to the Marketplace now.
skoehler
leJOS Team Member
 
Posts: 1422
Joined: Thu Oct 30, 2008 4:54 pm

Re: Eclipse plugin

Postby RapunzelLover » Thu Mar 20, 2014 9:41 pm

Thank man. I shouting because i like have everything in one place.
Ideas are beautiful, but their implementations some time failure.
User avatar
RapunzelLover
New User
 
Posts: 10
Joined: Thu Mar 20, 2014 1:57 pm
Location: Poland

Re: Eclipse plugin

Postby floydbloke » Fri Mar 21, 2014 4:34 am

Only just got around to trying this. It works a treat. Thanks Lawrie, good job. :D
floydbloke
New User
 
Posts: 16
Joined: Mon Nov 04, 2013 7:04 pm

Re: Eclipse plugin

Postby roger » Fri Apr 04, 2014 11:45 pm

Hi Lawrie,
Thanks for the plugin. It is easy to use, but unfortunately it does not copy the jar file to the EV3, but throws the exception EV3 Not found.
The brick is plugged into the USB port, and it is connected to WI FI. When I used the xml file, I could specify 10.0.1.1 to use USB and 10.0.0.3 to use WIFI. How does the plugin know how to find the brick?
I am using the latest SD card thanks to Andy.
Problem 2. The ev3snapshot build failed because it failed to generate Javadocs.
Workaround: So I ran the build in the ev3classes, and added ev3classes.jar to my project libraries.
But how can I build the snapshot?
Thanks,
Roger
roger
Moderator
 
Posts: 363
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Re: Eclipse plugin

Postby lawrie » Sat Apr 05, 2014 8:04 pm

Hi Roger, The plugin uses device discovery so it is similar to EV3Control search. Does that work for you? You should not need to build the snapshot as all you need is in the repository. You could try the "Use ssh and scp" option. If you use that, you need to specify the IP address of your brick in the preferences. As that method does not use the menu to run the program, you need to suspend the menu. What error do you get building ev3snapshot? Can you post the error. Lawrie
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Re: Eclipse plugin

Postby roger » Sun Apr 06, 2014 12:18 am

Hi Lawrie,
No, EV3Control search does not find my EV3 (it never has). But it will connect to 10.0.0.3 (the wi fi address) and also to 10.0.1.1 the USB address. Using the ssh and scp option, I can download a jar file to the EV3 and run it.
Displaying System.out on the EV3Control console is a very nice way to debug. (better than the tiny LCD on the brick)
Thanks.
The error from the ev3snapshot build is
BUILD FAILED
C:\Users\owner.GLASSEY\git\ev3\ev3snapshot\build.xml:10: The following error occurred while executing this line:
C:\Users\owner.GLASSEY\git\ev3\ev3classes\build.xml:60: Javadoc failed: java.io.IOException: Cannot run program "javadoc.exe": CreateProcess error=2, The system cannot find the file specified

So what variable (environmental?) do I need to set? javadoc.exe is in JAVA_HOME, which has been set.
roger
Moderator
 
Posts: 363
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Re: Eclipse plugin

Postby lawrie » Sun Apr 06, 2014 7:45 pm

roger wrote: Cannot run program "javadoc.exe"


Hi Roger, You seem to have issues with your Eclipse environment. The ant build files for the NXT used javadoc, so your Eclipse system probably wouldn't work for that either. I seem to remember you had a previous problem with ant builds. I have never had problems with ant builds, so I don't know what the best solution is. Possibilities are ensuring javadoc is available from the command line, by adding JAVA_HOME/bin to the system path, or changing the default installed Java system from a JRE to a JDK. Lawrie
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Re: Eclipse plugin

Postby lawrie » Thu Apr 10, 2014 11:26 am

Roger, I have removed the javadoc call from the ev3snapshot build as it was not really necessary. Also your problem with device discovery (e.g. search in EV3Control) not working might be your Windows firewall, as java.exe (or javaw.exe from Eclipse) needs to be able to receive UDP packets for this. If you have ever refused permissions for these process to act as a network server, the Windows firewall might be blocking this. Lawrie
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Re: Eclipse plugin

Postby brickinthecloud » Mon Sep 22, 2014 1:23 pm

I just asked a question in a new thread about this excellent plugin, basically can we configure the manifest it generates to add new classpath entires?
brickinthecloud
Novice
 
Posts: 28
Joined: Thu Nov 07, 2013 1:56 am


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 4 guests

more stuff