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

20th
Apr 2016
Stéphane Épardaud
@FroMage
Apr 20 2016 14:18
@davidfestal yt
?
David Festal
@davidfestal
Apr 20 2016 14:20
Still on vacation
Stéphane Épardaud
@FroMage
Apr 20 2016 14:20
damn
until when?
David Festal
@davidfestal
Apr 20 2016 14:20
Hi !
Until the end of the week. But is there anything urgent or critical ?
Stéphane Épardaud
@FroMage
Apr 20 2016 14:21
no, I had a question but it can wait until you're back, have fun ;)
Bastien Jansen
@bjansen
Apr 20 2016 14:22
maybe someone else can answer it?
unless it's related to that obscure OSGi stuff ;)
Stéphane Épardaud
@FroMage
Apr 20 2016 14:23
if you know what JDTModuleManager.moduleFileInProject is supposed to do…
then perhaps ;)
Bastien Jansen
@bjansen
Apr 20 2016 14:24
it tells if there's a module descriptor for the given module name in the given project, I think
well actually it checks if there's a corresponding package (folder structure), not a module descriptor
Stéphane Épardaud
@FroMage
Apr 20 2016 14:27
right, and I'm adding support for jdkProvider in the IDE
David Festal
@davidfestal
Apr 20 2016 14:27
Ah OK
Stéphane Épardaud
@FroMage
Apr 20 2016 14:27
and so on Android, in build/generated/source/r/debug/android I get:
build/generated/source/r/debug/android/support/v7/appcompat/R.java
build/generated/source/r/debug/android/support/v7/recyclerview/R.java
build/generated/source/r/debug/android/support/design/R.java
resource files for Android
not really my code
Bastien Jansen
@bjansen
Apr 20 2016 14:28
yeah
Stéphane Épardaud
@FroMage
Apr 20 2016 14:28
but my own resource Java files are there too
to it has to be a source folder
well…
yes it has
the CLI compiles them
so anyway
the IDE will find the android package part in there
and pretend that it contains the android/23 module
so it doesn't work
obviously it doesn't contain any module descriptor for android, and arguably it doesn't even contain the android package since those are Java files belonging to android-support-v7 modules
Bastien Jansen
@bjansen
Apr 20 2016 14:30
maybe we should improve moduleFileInProject() and make it look for module/name/module.ceylon instead of just module/name
Stéphane Épardaud
@FroMage
Apr 20 2016 14:30
totally unrelated
but it does contain files from other modules
so yeah I thought of changing it to detect module.ceylon
but not sure it'd be more correct
looks like it'd be differently wrong
granted, perhaps more correctly wrong in my case
Bastien Jansen
@bjansen
Apr 20 2016 14:31
is it the same R that contains all the IDs you define in your app?
Stéphane Épardaud
@FroMage
Apr 20 2016 14:31
yes, except those are not for my modules
lemme check, perhaps they're even in my imported modules
yeah
they're in the respective jars
such as build/intermediates/ceylon-android/mlib/com.android.support.appcompat-v7-23.1.1.jar
so frankly we could ignore those files for all we care
except it's in the source path
and the IDE thinks it means something
the CLI doesn't care since it won't compile them
Bastien Jansen
@bjansen
Apr 20 2016 14:34
how did it come in the source path?
Stéphane Épardaud
@FroMage
Apr 20 2016 14:34
during project creation
and the CLI requires that source path to be added
since it also_ contains _my module's R.java
Bastien Jansen
@bjansen
Apr 20 2016 14:35
and this one is needed
Stéphane Épardaud
@FroMage
Apr 20 2016 14:35
yes
Bastien Jansen
@bjansen
Apr 20 2016 14:35
so we can't just ignore build/generated/source/
Stéphane Épardaud
@FroMage
Apr 20 2016 14:35
no
Bastien Jansen
@bjansen
Apr 20 2016 14:36
but if we add the check for module.ceylon, the IDE won't consider this as a source module
so it might work
Stéphane Épardaud
@FroMage
Apr 20 2016 14:36
now, I control the Gradle plugin, so I could copy just our R.java to a new source folder
yeah, perhaps that's the right fix
I can try that
Stéphane Épardaud
@FroMage
Apr 20 2016 15:57
well, that works
and now I can load my Android app in Eclipse
the only thing is, I wonder how many other things it breaks
and lucky me, there are no tests so I can't know :)
guess I'll push this tomorrow so I can revert if it breaks for people