Because of many problems I experienced with Darcs, I converted the EclipseFP repository to Git. I really like the clean and simple model and UI of Darcs, and I’m sorry to see it go, but it was simply too slow and too unreliable. Also, I removed all dependencies on Cohatoe. Without further ado, here are the new and improved instructions in case anyone wants to test-drive my current work.
As usual, this assumes that you have GHC, cabal-install, and git. I tested only on Ubuntu 9.4, but there is no reason why it shouldn’t work on other Unix platforms. There may still be some issues on Windows.
- Get Eclipse Galileo (3.5), the distribution named “Eclipse for RCP/Plug-in Developers”. Extraction equals installation.
- Get the Scion source:
git clone git://github.com/ttencate/scion.git
(Mymaster
branch corresponds to nominolo’smulti_proto_server
branch.) - Build and install Scion, the library as well as the server program:
cd scion/lib
cabal install
cd ../server
cabal install - Get the EclipseFP source:
git clone git://github.com/ttencate/eclipsefp.git
- Import all Eclipse projects from these repositories into Eclipse. There are 26, so the Multi Project Import/Export plugin might come in handy.
- Wait for the build to fail. Yes, that’s right. It will complain about missing files, because ANTLR generated some that Eclipse doesn’t yet know about. Select all projects, right-click and click Refresh, then wait for the build to succeed. (Thanks to Björn Peemöller for pointing this out!)
- Hit Run, Run Configurations. Add a new launch “Eclipse Application” launch configuration. The default settings for this launch configuration should work, so just click Run. (Previous instructions were wrong; thanks to Axeman6 for pointing this out!)
- In the new Eclipse window that (hopefully) pops up, set the location of the Scion server via Window, Preferences, Haskell, Scion. If you installed it in a fairly standard location, the Autodetect button should do the trick; otherwise, just Browse.
- If something doesn’t work, turn on tracing. In the Run Configurations dialog, on the Tracing tab, you can enable tracing options for various plug-ins. These will output to the Console at the bottom of the host Eclipse window. To see the traffic between the Scion client and server, turn on the logs for
net.sf.eclipsefp.haskell.scion.client
.
A known issue is that you have to save a file before it gets loaded into Scion, so you don’t get type tooltips and go-to-definition until then. This will be resolved in the near future, maybe tomorrow. After nine consecutive days of work, I’m taking a day off now.
Again, please let me know if you tried this. Also let me know if something didn’t work, so I can improve it!
July 6, 2009 at 04:55
Thank you for revisiting eclipseFP. I used this a couple years ago whilst learning Haskell. I really liked it until I started doing a lot with .lhs files in the 2.0 version where things got all butched.
I am wondering though, is there support to run GHCi REPL from the console in eclipse, or is the console solely for reporting GHC errors?
July 13, 2009 at 04:01
First of all, many thanks for this project. Since Haskell lacks good IDE.
But it is not working for me. Until the item 7 it was fine but when I try to set the location of the Scion I got:
“Unable to create the selected preference page.
net.sf.eclipsefp.haskell.ui.internal.preferences.NewHaskellProjectPP”
July 13, 2009 at 08:04
Edgar, thanks for trying! I’ll look into this ASAP and post back here once it’s fixed.
July 21, 2009 at 14:28
I’m sorry, I can’t reproduce this error. But there should be a button “View error log” or something. Could you maybe double-click the error entry in the error log, then post the stack trace (hopefully) reported there? Thanks!
July 23, 2009 at 18:28
Thomas I’m having the same trouble on Ubuntu 9.04. Here is the Error from the Stack Trace.
java.lang.ClassNotFoundException: net.sf.eclipsefp.haskell.ui.internal.preferences.scion.ScionPP
Also, I noticed that there are only 25 plug-in’s imported into eclipse not 26? net.sf.eclipsefp.haskell-feature is not imported.
July 23, 2009 at 22:29
Steven, WordPress won’t let me reply to your post, so I’ll reply to this one.
My Eclipse does import net.sf.eclipsefp.haskell-feature. It’s second in the project list. If the Multi Project plugin somehow overlooks it, could you try importing it separately?
As to the exception, I tried once more to replicate this, even on a completely clean Eclipse install and EclipseFP source tree, but cannot reproduce it.
Note that the error message you’re getting is different from the one Edgar reported. (More sensible too, luckily.) However, I’m at a loss what could cause it. Maybe I can say more if you post the full stack trace, not just the error message. Please put it on pastebin if the comment box doesn’t like it. Thanks a lot!
July 22, 2009 at 02:44
I was wondering if perhaps these build instructions could be updated to give more detailed explanations, mainly about how to install and import the eclipse related things.
I was fine up to step 5, but I have no idea how to import the projects in the way that they’re needed (I tried importing each project separately, and importing the base directory, neither of which worked), nor could i figure out how to install the Multi Project Import/Export plugin (the website has absolutely no instructions).
I’m also not sure what file was supposed to be selected when performing step 7, since you need to have something selected to use the Run As… stuff.
I don’t know if it makes a difference, but I’m on OS X.
I hope I hear from you soon.
July 22, 2009 at 11:58
Sorry, you’re right, the instructions currently assume some familiarity with Eclipse. I’ll see if I can write up a more detailed version soon.
To answer your particular questions:
– Importing each project separately should be fine. Select the net.sf.eclipsefp.* directories.
– You can install the Multi Project Import/Export plugin by adding its update site, http://eclipse-tools.sourceforge.net/updates/, via Help / Add New Software.
– As to the Run As stuff, that was my mistake. See the updated instructions above.
Hope this helps, and thanks!
September 5, 2009 at 07:23
[…] 後は、作者のHPを見ながらやれば大丈夫でしょう。EclipseからEclipseを起動してDebugする醍醐味が味わえるので、お試しあれ。 […]
September 7, 2009 at 15:47
Thomas, thanks for your comment.
Following your comment, I tried JP Moresmau’s git branch.
Auto building and GHCI work correctly. (Eclipse 3.5 + MacOSX Leopard)
I’m going to study haskell with eclipsefp.
Thank you for developing COOL eclipse plugin !
September 7, 2009 at 21:51
I can’t take the credit for that; I just did a small portion. But you’re welcome :)
October 6, 2009 at 22:50
git gave me just 21 plug-in instead of 26. Any ideas why?
October 7, 2009 at 18:45
Yes: this post is outdated :) Concretely, I removed some platform-specific plug-ins that were only used for Cohatoe.
But you are probably better off now using the new version by JP Moresmau, who has taken over the project. See his Github at http://github.com/JPMoresmau/eclipsefp
October 7, 2009 at 23:24
Thanks a lot Thomas!
October 6, 2009 at 23:23
Sorry, forgot to say thanks a lot for a good job!
May 23, 2010 at 01:52
Hi,
Regarding:
7. Hit Run, Run Configurations. Add a new launch “Eclipse Application” launch configuration. The default settings for this launch configuration should work, so just click Run. …
I’m adding new launch configuration for Java Application, but [Run] is disabled because there is no Main class specified. What should I specify there?
May 23, 2010 at 12:02
You chose Java Application, not Eclipse Application. If that option does not show up, you may have the wrong Eclipse distribution; you need “Eclipse for RCP/Plug-in Developers”.
Either way, these instructions are probably a bit dated by now; see the homepage http://eclipsefp.sourceforge.net/ for more up-to-date stuff.