nbros / ocaide Goto Github PK
View Code? Open in Web Editor NEWAn OCaml plug-in for Eclipse
Home Page: www.algo-prog.info/ocaide/
An OCaml plug-in for Eclipse
Home Page: www.algo-prog.info/ocaide/
Yesterday I coded something. When I started typing List.rev
, exactly after typing the dot, a drop down list of all functions exposed by the interface appeared, with the documentation of each method.
Today I get no drop down list for the module.
I cannot read an integer using the read_int
function from the Ocaml Toplevel
view. Entering the expression read_int ()
and then entering an integer raises the exception Failure "int_of_string"
:
# read_int ();;
34;;
Exception: Failure "int_of_string".
#
So how can an integer be read from the Ocaml Toplevel
view?
the debugger cannot find the values defined in an included module in the same directory.
let sq x = x * x;;
open Main
open Printf
let _ =
let _ = print_endline (sprintf "the square of 3 is not %d" (sq 4)) in
print_endline "something else"
now compile main.d.byte, run.d.byte, start a debug run of run.d.byte, place a breakpoint in the last line of run.ml and hover the mouse over the "sq" call.
result: "Cannot find module Main. "
was this supposed to be fixed recently?
I'm trying to use the OcaIde plugin for Eclipse with js_of_ocaml. Unfortunately the '##' syntax that js_of_ocaml uses for calling n-ary methods is upsetting the code completion.
I added the following comment to the top of the code to attempt to get OcaIde to run the preprocessor:
(* pp: -parser o -parser op -printer a -I /usr/lib/ocaml/js_of_ocaml/ pa_js.cmo *)
This seems to be doing something because I can see some rewritten variable names in the 'outline' view. Unfortunately it completely breaks the intellisense and I no longer get error markers (red squiggles) in the code.
The error logs fills up with the following error:
error creating error markers
org.eclipse.jface.text.BadLocationException
at org.eclipse.jface.text.TreeLineTracker.fail(TreeLineTracker.java:1055)
at org.eclipse.jface.text.TreeLineTracker.offsetByLine(TreeLineTracker.java:334)
at org.eclipse.jface.text.TreeLineTracker.getLineOffset(TreeLineTracker.java:1122)
at org.eclipse.jface.text.AbstractLineTracker.getLineOffset(AbstractLineTracker.java:169)
at org.eclipse.jface.text.AbstractDocument.getLineOffset(AbstractDocument.java:922)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.getLineOffset(SynchronizableDocument.java:382)
at ocaml.views.outline.OutlineJob$1.run(OutlineJob.java:373)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
When using OcaIDE with OCaml-4.02.0, it seems that parsing mli files stops at the first [@@ocaml.deprecated] annotation. None of the exported names defined after the first [@@ocaml.deprecated] are known to OcaIDE.
For instance, completing on String. gives only 3 options: length, get and set. set has the [@@ocaml.deprecated] annotation and no name coming after set in string.mli is known to OcaIDE.
When I installed ocaIDE from url http://www.algo-prog.info/ocaide/ via regular Eclipse installation help was missing. I had to copy help plugin manually from repository.
Eclipse Version: Kepler Service Release 2
when i run *.byte file ,
the console says "Cannot exec ocamlrun"
or
the Custom Toplevel says "Cannot exec ocamlrun
Process ended with exit value 2"
what should i do ?
i use ocaml version 4.01.0, windows 10 (by cygwin) eclipse version:LUNA
i follow "https://fdopen.github.io/opam-repository-mingw/installation/", install my ocaml.
I enter my OCaml project's properties. There are multiple entries, such as Resource, Builders, Makefile, but the OCaml build flags entry is missing. I'm using a Makefile with a OCamlMakefile, Eclipse 3.8.1 and OcaIDE 1.2.21
Thank you for developing this IDE.
The "put breakpoint" does not work on my system and it turns out the problem is at Ocaml/src/ocaml/debugging/OcamlDebugger.java line 1024
Pattern patternBreakpoint = Pattern
.compile("Breakpoint\\s+(\\d+)\\s+at\\s+(\\d+):\\s+file\\s+(.*?),\\s+line\\s+(\\d+),\\s+characters\\s+(\\d+)-(\\d+)");
It should be
Pattern patternBreakpoint = Pattern
.compile("Breakpoint\\s+(\\d+)\\s+at\\s+(\\d+)\\s+:\\s+file\\s+(.*?),\\s+line\\s+(\\d+),\\s+characters\\s+(\\d+)-(\\d+)");
There are spaces before and after the ":" on my system.
Thanks.
In order to make OcalIDE more accessible to Eclipse IDE user, it would be nice to add the file associations on Marketplace so marketplace client in Eclipse IDE can suggest installation of OcalIDE for Caml file. That can be done by simply adding fileExtension_ml
, fileExtension_mli
... tags to the marketplace entry.
Eclipse does this only for Java
Commit e01081d breaks "Script file to execute in the debugger" feature (state == State.Starting3a).
When I try ctrl+space on "print" or "print_" I do not get any suggestions from content assist. In the same time it works for some other modules (like List)
I use Eclipse Mars on Linux Mint with /usr/lib/ocaml mentioned in the Path of the project.
I set up OcaIDE to replace tabs with spaces. This happens when I indent a single line. However, when I select several lines and press tab, tab character is inserted instead.
i'm using opam with the "system" compiler, in my case this is Ocaml 4.00.1 installed in /usr/local via homebrew. The ocaml standard library is in /usr/local/lib/ocaml, whereas several opam installed extra libraries are in ~/.opam/system/lib
in OcaIDE, i can only specify a single lib path (right?) there seems no way to pick up libraries from both locations for autocomplete etc...
Please, add support for the latest OCaml releases.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.