These are chat archives for ceylon/ceylon-ide-eclipse

10th
Jun 2016
David Festal
@davidfestal
Jun 10 2016 08:59
@gavinking why do you say that Ceylon editors have their own typechecker ?
it's only the case for Ceyon code that is outside a Cylon-enabled project
"working set" ? did you mean "working copies" ?
In fact I don't understand what you're speaking of :-/ Sorry...
The only elements that are not shared with the other editors, and not part of the global model, are the declarations of the edited unit, that are iolated in a SingleSourceUnitPackage so that they do not replace global model declarations before a save event
Gavin King
@gavinking
Jun 10 2016 09:11
Yes, I mean “working copy”. Where all editors see each others changes. Currently we have a mini-working copy per editor.
David Festal
@davidfestal
Jun 10 2016 09:12
we already discussed this point in a issue
Gavin King
@gavinking
Jun 10 2016 09:13
we did?
David Festal
@davidfestal
Jun 10 2016 09:13
it's not easy, according to how to the Ceylon model is designed and also the way it is updated (with dependency calculation, etc ...)
Gavin King
@gavinking
Jun 10 2016 09:14
i thought at the time we did it this way because it was easier
and because we think that anyway everyone saves their changes immediately
that they don’t actually use the working copy model of Eclispe
David Festal
@davidfestal
Jun 10 2016 09:14
even in the IntelliJ plugin where there is no "save" event, I had the limit the triggering of the global model update
Gavin King
@gavinking
Jun 10 2016 09:14
but is that still the case?
sure, I know that … but I wondered how much harder it would be to have all the editors share a “forked” model instead of each having their own forked model
it’s just a question
David Festal
@davidfestal
Jun 10 2016 09:15
it seemed to me that working copies were mainly for searches, etc ...
but not for compilation and error reporting, even in Java editors
a shared "forked" is what I had thought of in the issue I mentioned
but it seems it would be quite hard
let me find the issue
Gavin King
@gavinking
Jun 10 2016 09:17
ok
David Festal
@davidfestal
Jun 10 2016 09:17
Ans I'll be able to look into the Eclipse plugin code because now I have both Intelij and Eclipse plugin projects opened in my main Eclipse
due to a memory upgrade I did yesterday : 16 GO innstead of 8 !
what a pleasure to work now on a laptop with nearly no swap !
let me have a look then
Gavin King
@gavinking
Jun 10 2016 09:18
haha
I still have just 8
David Festal
@davidfestal
Jun 10 2016 09:19
I should be able to work a bit faster :-)
really ?
Gavin King
@gavinking
Jun 10 2016 09:19
but I’ve ordered a new one with 16
David Festal
@davidfestal
Jun 10 2016 09:19
haha !
this is the club of the IDE developers that have to use both Idea and Eclipse on big Ceylon projects !
Gavin King
@gavinking
Jun 10 2016 09:20
someone has to tell me how to set of the intellij project for development
it does not work to just import the project into either eclipse or intellij
which is, well, rubbish, frankly
David Festal
@davidfestal
Jun 10 2016 09:21
I have setup this locally
Gavin King
@gavinking
Jun 10 2016 09:21
well please push it then
David Festal
@davidfestal
Jun 10 2016 09:21
but will try to clean it up a bit and share it on github
this is to be able to have IntelliJ plugin projects inside Eclipse and debug Idea from Eclipse
is it what you want ?
Gavin King
@gavinking
Jun 10 2016 09:23
well yeah, though for now it would be a step forward to just be able to edit the intellij plugin code w/o lots of not exists errors
Bastien Jansen
@bjansen
Jun 10 2016 09:23
@gavinking RTFREADME
Gavin King
@gavinking
Jun 10 2016 09:23
debugging would be like a dream
Bastien Jansen
@bjansen
Jun 10 2016 09:23
there's nothing to push
David Festal
@davidfestal
Jun 10 2016 09:23
really
ah, @bjansen I didn't know you had added this in the readme :-)
Gavin King
@gavinking
Jun 10 2016 09:24
@bjansen the readme is 18 steps long WTF!
Bastien Jansen
@bjansen
Jun 10 2016 09:24
it's always been in the readme
David Festal
@davidfestal
Jun 10 2016 09:24
the IntelliJ readme ?
Gavin King
@gavinking
Jun 10 2016 09:24
you expect me to be able to perform an 18 step readme w/o fucking it up?
that’s unreasonable
Bastien Jansen
@bjansen
Jun 10 2016 09:25
well if you can't follow detailed instructions, I can't do anything for you
you can skip some of the steps because you already have a local distribution
and the other steps depend on you local environment, so I can't push a generic config
Gavin King
@gavinking
Jun 10 2016 09:36
I mean, I tried, but I have lots of errors like these:
module name does not match descriptor location: 'com.example.withmodule' should be 'dist.samples.with-module.source.com.example.withmodule'
I have a node in the project structure for my Ceylon dist dir
Bastien Jansen
@bjansen
Jun 10 2016 09:38
what does git status say?
it looks like you added source roots in dist
Gavin King
@gavinking
Jun 10 2016 09:38
well I didn’t, but IntelliJ might have
[gavin@Gavins-New-MacBook-Pro ceylon (master)]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
well that’s a generated dir anyway
ignored by git
Bastien Jansen
@bjansen
Jun 10 2016 09:39
no I mean git status in ceylon-ide-intellij
Gavin King
@gavinking
Jun 10 2016 09:40
.ceylon/ide-config~
.idea/libraries/Ceylon_dependencies.xml
modules/
plugin-ceylon-code/.ceylon/ide-config~
modified:   .ceylon/ide-config
modified:   .idea/artifacts/Installation_Packages.xml
modified:   CeylonIDEA.iml
modified:   plugin-ceylon-code/build.properties
Bastien Jansen
@bjansen
Jun 10 2016 09:41
git checkout CeylonIDEA.iml and reopen the project
Gavin King
@gavinking
Jun 10 2016 09:42
I get a “Frameworks Detected” message
asking me to configure ceylon
Ceylon framework is detected in the project Configure
but now the errors are gone
Bastien Jansen
@bjansen
Jun 10 2016 09:43
ignore that
it's because there's Ceylon files in a test-resources folder
Gavin King
@gavinking
Jun 10 2016 09:45
ok, so last time I let it configure the project, which I think was the source of my prpblems
Bastien Jansen
@bjansen
Jun 10 2016 09:45
yeah, maybe it also took the sources in dist
Gavin King
@gavinking
Jun 10 2016 09:48
So i think I should push:
Bastien Jansen
@bjansen
Jun 10 2016 09:48
I just updated the .gitignore
Gavin King
@gavinking
Jun 10 2016 09:48
  • .idea/artifacts/Installation_Packages.xml
  • .ceylon/ide-config
Bastien Jansen
@bjansen
Jun 10 2016 09:48
I just removed Installation_Packages.xml, it isn't used
Gavin King
@gavinking
Jun 10 2016 09:49
  • plugin-ceylon-code/build.properties
ok
Bastien Jansen
@bjansen
Jun 10 2016 09:49
don't push build.properties, the change is specific to your local env
Gavin King
@gavinking
Jun 10 2016 09:49
and add modules/ to .gitignore as well
Bastien Jansen
@bjansen
Jun 10 2016 09:49
and what changed in .ceylon/ide-config?
I already did it
Gavin King
@gavinking
Jun 10 2016 09:50
compile-jvm=true
Bastien Jansen
@bjansen
Jun 10 2016 09:50
you can revert that
Gavin King
@gavinking
Jun 10 2016 09:50
it is false in git
revert it?
you don’t want to compile?
also there is a huge .idea/libraries/Ceylon_dependencies.xml file
Bastien Jansen
@bjansen
Jun 10 2016 09:51
in fact I could even remove .ceylon, because the ceylon compiler only builds what's in plugin-ceylon-code, which has its own .ceylon
Gavin King
@gavinking
Jun 10 2016 09:51
we should either push or irgnore it
Bastien Jansen
@bjansen
Jun 10 2016 09:51
:point_up: 10 juin 2016 11:48
I already did that
Gavin King
@gavinking
Jun 10 2016 09:54
hrm, but when i run the plugin project
i can create a ceylon project
but new ceylon module is greyed ou
Bastien Jansen
@bjansen
Jun 10 2016 09:55
are you right-clicking on the source folder?
Gavin King
@gavinking
Jun 10 2016 09:55
yes
Bastien Jansen
@bjansen
Jun 10 2016 09:55
it might be a bug
Gavin King
@gavinking
Jun 10 2016 09:55
oh, now, suddenly, it’s fixed
Bastien Jansen
@bjansen
Jun 10 2016 09:55
does it work if you reopen the project, then try to add a module?
ok
Gavin King
@gavinking
Jun 10 2016 09:55
after opening and closing project structure
Great:
"Default documentation for module `test`."
native ("jvm")
        module test "0" {}
Bastien Jansen
@bjansen
Jun 10 2016 09:56
:D
Gavin King
@gavinking
Jun 10 2016 09:56
hooray for indents after annotations
@bjansen why do I have to explicitly open the Ceylon Problems tool window
Bastien Jansen
@bjansen
Jun 10 2016 10:00
because I don't really want it to pop up automatically when I'm editing files
Gavin King
@gavinking
Jun 10 2016 10:01
but i want to at least see it in the bottom bar when i have a new ceylon project
Bastien Jansen
@bjansen
Jun 10 2016 10:01
that's why I change the icon when errors appears, it indicates there are errors, and if you want to see them you just have to open the thing
well it's added to the bottom bar as soon as the global model is ready IIRC
Gavin King
@gavinking
Jun 10 2016 10:02
wait, perhaps this is something that only affects the test IDE
I do Reset Ceylon model
and the problems tool window disappears and doesn’t come back
even though there are errors in my code
that’s not normal is it?
Bastien Jansen
@bjansen
Jun 10 2016 10:03
no
Gavin King
@gavinking
Jun 10 2016 10:21
@bjansen at CeylonProblemsList:89
what does builder.queueUpdate(); do?
Second question: is there some way to get the source code for these intelliJ APIs?
This JTree is so hidden behind intellij stuff
that I can’t tell when I’m supposed to expand nodes
Bastien Jansen
@bjansen
Jun 10 2016 10:31
clone https://github.com/JetBrains/intellij-community and go to the projects settings > SDKs > add the clone in the Sourcepath tab
builder.queueUpdate(); is supposed to redraw the tree after we changed its model
Gavin King
@gavinking
Jun 10 2016 10:32
is it async?
Bastien Jansen
@bjansen
Jun 10 2016 10:32
I suppose you should expand nodes right after this
dunno
is returns a ActionCallback
so yes
Gavin King
@gavinking
Jun 10 2016 10:33
and am i supposed to expand before or after calling it?
so I call callback.doWhenDone()?
Bastien Jansen
@bjansen
Jun 10 2016 10:34
I think you can do
value cb = builder.queueUpdate();
cb.doWhenDone(runnableThatExpandsNodes);
I haven't tried that but it looks like a good candidate
David Festal
@davidfestal
Jun 10 2016 10:39
why don't you discuss this on the ceylon-ide-intellij room ?
Bastien Jansen
@bjansen
Jun 10 2016 10:40
we're too lazy, and the other channel is too far
David Festal
@davidfestal
Jun 10 2016 10:41
ah yes, I should have thought to it :-)
David Festal
@davidfestal
Jun 10 2016 14:04
@bjansen I don't know exactly when this was and who this was, but in ceylon-ide-eclipse now we have many places where ceylon java code calls Ceylon code, and as soon as one real error is in the code, many files get red only because the existing ceylon declarations are not found by the backend compiler. This makes development hard again. We used to put all this case behind Java2Ceylon proxies no?
Bastien Jansen
@bjansen
Jun 10 2016 14:05
yes
Gavin King
@gavinking
Jun 10 2016 14:26
@davidfestal I don’t experience that
David Festal
@davidfestal
Jun 10 2016 14:27
lucky you :-) Probably you never have errors in the code you write ;-)
Gavin King
@gavinking
Jun 10 2016 14:28
maybe
anyway, I’ve no idea what the rules are for what we’re allowed to call directly from Ceylon code
from Java code
it’s not clear at all
Bastien Jansen
@bjansen
Jun 10 2016 14:29
if you call Ceylon code from Java code in the same module, as soon as a Ceylon unit contains an error, every Java file that calls Ceylon code will have errors
David Festal
@davidfestal
Jun 10 2016 14:30
it's related to some limitation due to the way Javac is designed
but @FroMage recently said to have removed this limitation, however it's not reflected in the IDE
I have to work on it also