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

5th
Apr 2016
Bastien Jansen
@bjansen
Apr 05 2016 05:50
Capture d’écran 2016-04-05 à 07.49.47.png
I still need to add default args etc. but it's on its way
David Festal
@davidfestal
Apr 05 2016 08:30
@FroMage : I've not been able te debug correctly for now to find your why the http core class cannot be loaded
Stéphane Épardaud
@FroMage
Apr 05 2016 08:30
damn
so how do we work around this problem then
David Festal
@davidfestal
Apr 05 2016 08:31
more precisely not been able to add a conditional breakpoint at the right place that would allow me to understand what's happening
search further
I'm still on it
Stéphane Épardaud
@FroMage
Apr 05 2016 08:31
ok thanks
David Festal
@davidfestal
Apr 05 2016 08:31
a bit painful
David Festal
@davidfestal
Apr 05 2016 10:21
Finally I can debug this part. Now I should be able go further
David Festal
@davidfestal
Apr 05 2016 13:00
@FroMage : I finally found out where it comes from
the ceylon distribution build tweaks the distribution dependency jars
to add embed JBoss modules information
but also OSGI metadata
Stéphane Épardaud
@FroMage
Apr 05 2016 13:01
yes I know that
I told you yesterday
David Festal
@davidfestal
Apr 05 2016 13:01
the thing here is that the aether jar
already has OSGI metadata
Stéphane Épardaud
@FroMage
Apr 05 2016 13:01
yes, I suspected as much
David Festal
@davidfestal
Apr 05 2016 13:01
based on import-package directives
and not require-bundle
Stéphane Épardaud
@FroMage
Apr 05 2016 13:01
oh, so it has both import-bundle and import-package
aha
fun
ok, so we should remove the import-package then?
David Festal
@davidfestal
Apr 05 2016 13:02
no no
we remove the import-package directives
Stéphane Épardaud
@FroMage
Apr 05 2016 13:02
we already do?
David Festal
@davidfestal
Apr 05 2016 13:02
to replace them by require-bundle directives that are consistent with the module.xml file
Stéphane Épardaud
@FroMage
Apr 05 2016 13:02
or we should?
David Festal
@davidfestal
Apr 05 2016 13:02
we already do
Stéphane Épardaud
@FroMage
Apr 05 2016 13:02
mmm
David Festal
@davidfestal
Apr 05 2016 13:02
but in this specific case
Stéphane Épardaud
@FroMage
Apr 05 2016 13:02
ok
David Festal
@davidfestal
Apr 05 2016 13:02
this is a probem
because at runtime our version of http client
(4.3.2)
which is also based on require-bundle directives
(everything is consistent)
is not used
and the one used is the 4.3.6
that is using import-package directives
and that doesn't re-exports the http core packages
so either we continue our way
but then force
to use our bundle
by using require-bundle ...; bundle-version=[4.3.2, 4.3.2]
maybe this would be the best way
Stéphane Épardaud
@FroMage
Apr 05 2016 13:07
that'd be the easiest, no?
David Festal
@davidfestal
Apr 05 2016 13:07
or we don't change the OSGI meta-data
but that's also a bit risky
because we don't control things anymore
so for the distribution we should use require-bundle with fixed version
do you agree with this ?
However this might still be a problem because we don't change the bundle name
so if the aether bundle is already installed with this version number
it will not be reinstalled
and then the tweaked OSGI metadata will not be there again
The first archives that were inluded inside the distribution didn't have OSGI metadata (at least a number of them)
so this was notmuch of a problem
and the rest was bundled inside an uberjar
so this was not a critical problem
Stéphane Épardaud
@FroMage
Apr 05 2016 13:11
well let's try it with a forced version first
David Festal
@davidfestal
Apr 05 2016 13:11
now with more individul jars that are already OSGI bundles (based on the import-package mode)
if the exact same version of these bundles already exist in any Eclipse installation we'll have the problem again
To be clean we should rename the bundles
Bastien Jansen
@bjansen
Apr 05 2016 13:40
@gavinking in com.redhat.ceylon.eclipse.code.refactor.AddParameterDialog.updateType(), do you think it would be possible to add imports "on the fly" before we try to parse the type?
Gavin King
@gavinking
Apr 05 2016 13:40
not sure what you mean?
Bastien Jansen
@bjansen
Apr 05 2016 13:40
i.e. the dialog currently has a plain text field for the type name
but if we were able to add code completion to that
we could specify a type that's not currently imported in the file
Gavin King
@gavinking
Apr 05 2016 13:41
oh i see
Bastien Jansen
@bjansen
Apr 05 2016 13:41
and we would know it's FQN
but the unit does not know it
Gavin King
@gavinking
Apr 05 2016 13:41
dunno how much that would affect performance
I don’t think I have autocompletion in the fields
in the dialog
‘cos I don’t know how to implement it
Bastien Jansen
@bjansen
Apr 05 2016 13:41
I'm asking this because IntelliJ provides completion out of the box
so I can have access to the package + type name
Gavin King
@gavinking
Apr 05 2016 13:42
right I see
Bastien Jansen
@bjansen
Apr 05 2016 13:42
but then the unit may not know it
so i'm wondering if I could add fake imports to the unit, or something like that
Gavin King
@gavinking
Apr 05 2016 13:42
I think this stuff works by creating some little fragment of ceylon code
and typechecking it
Bastien Jansen
@bjansen
Apr 05 2016 13:42
yes
Gavin King
@gavinking
Apr 05 2016 13:43
so you could probably create a bigger fragment
one that is a whole legal unit
that has imports
Bastien Jansen
@bjansen
Apr 05 2016 13:43
hmm I see
that might work
I'll try that, thanks!
Gavin King
@gavinking
Apr 05 2016 13:51
@bjansen if your new ChangeParamsRefactoring at all API-compatible with the old one?
BTW, have you got a screenshot of intellij’s equivalent refactoring for Java?
Bastien Jansen
@bjansen
Apr 05 2016 13:51
no, but it shouldn't be very hard to use in the existing code
Gavin King
@gavinking
Apr 05 2016 13:52
@bjansen well there is a much wider API here
between the UI and the refactoring
the ChangeParamsInputPage is pretty complicated….
Bastien Jansen
@bjansen
Apr 05 2016 13:53
I know, I'm also abstracting parts of that class (like the function that parses a Type)
Capture d’écran 2016-04-05 à 15.54.14.png
that's for Java ^
it allows more than just changing parameters, as you can see
(visibility, return type, name, delegate instead of modify the existing method etc)
Gavin King
@gavinking
Apr 05 2016 15:03
@bjansen ok, so you are reproducing the look of the Java one, ok, I see
Bastien Jansen
@bjansen
Apr 05 2016 15:04
well yes, I'm extending a ChangeSignatureDialogBase
which provides a common dialog for all the languages
Gavin King
@gavinking
Apr 05 2016 15:05
well, sorta :)
Bastien Jansen
@bjansen
Apr 05 2016 15:06
wdym?
Bastien Jansen
@bjansen
Apr 05 2016 16:26
Capture d’écran 2016-04-05 à 18.25.39.png
here's how it looks with default args
David Festal
@davidfestal
Apr 05 2016 20:47
@FroMage yt ?