New build instructions

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.

  1. Get Eclipse Galileo (3.5), the distribution named “Eclipse for RCP/Plug-in Developers”. Extraction equals installation.
  2. Get the Scion source:
    git clone git://github.com/ttencate/scion.git
    (My master branch corresponds to nominolo’s multi_proto_server branch.)
  3. Build and install Scion, the library as well as the server program:
    cd scion/lib
    cabal install
    cd ../server
    cabal install
  4. Get the EclipseFP source:
    git clone git://github.com/ttencate/eclipsefp.git
  5. Import all Eclipse projects from these repositories into Eclipse. There are 26, so the Multi Project Import/Export plugin might come in handy.
  6. 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!)
  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. (Previous instructions were wrong; thanks to Axeman6 for pointing this out!)
  8. 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.
  9. 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!

17 Responses to “New build instructions”

  1. Jonathan G. Says:

    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?

  2. Edgar Says:

    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”

    • Thomas ten Cate Says:

      Edgar, thanks for trying! I’ll look into this ASAP and post back here once it’s fixed.

    • Thomas ten Cate Says:

      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!

      • Steven Says:

        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.

      • Thomas ten Cate Says:

        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!

  3. Axman6 Says:

    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.

    • Thomas ten Cate Says:

      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!

  4. [Eclipse日記:02] Eclipsefp – 蜉蝣 〜 一瞬の輝き Says:

    […] 後は、作者のHPを見ながらやれば大丈夫でしょう。EclipseからEclipseを起動してDebugする醍醐味が味わえるので、お試しあれ。 […]

    • ykato Says:

      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 !

  5. Thomas Says:

    I can’t take the credit for that; I just did a small portion. But you’re welcome :)

  6. h Says:

    git gave me just 21 plug-in instead of 26. Any ideas why?

  7. h Says:

    Sorry, forgot to say thanks a lot for a good job!

  8. Exim Says:

    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?

  9. Thomas Says:

    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.


Leave a reply to Exim Cancel reply