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

25th
Mar 2016
Bastien Jansen
@bjansen
Mar 25 2016 10:28
looks like the build is broken
David Festal
@davidfestal
Mar 25 2016 10:30
what is the error ?
I've been on the snapshots branch these last days
Bastien Jansen
@bjansen
Mar 25 2016 10:31
wait it might be because I was using eclipse while the CLI was building (and "build automatically" was on)
I'm trying again
David Festal
@davidfestal
Mar 25 2016 10:31
Ah that happens yes
Bastien Jansen
@bjansen
Mar 25 2016 10:32
ok that was the problem
the build is not broken :D
David Festal
@davidfestal
Mar 25 2016 10:35
cool ! Thanks
Gavin King
@gavinking
Mar 25 2016 11:50
@bjansen I think we should develop a contract between quick fixes and the correctionprocessor
some kind of interface
so we just register a list of objects as the quickfixes
and each one gets passed a context object QuickFixData or whatever
WDYT?
Bastien Jansen
@bjansen
Mar 25 2016 12:47
why not
Bastien Jansen
@bjansen
Mar 25 2016 12:56
super weird bug: when I call find references in a Java file in eclipse (on a private final field), the results contain a bunch of declarations with the same name, in other files
The hierarchy of the type ChangeParametersRefactoring is inconsistent
looks like JDT is lost
Gavin King
@gavinking
Mar 25 2016 13:27
very strange
have never seen that before
Bastien Jansen
@bjansen
Mar 25 2016 15:07
@gavinking "Change Parameter List" only works with the first parameter list of a function?
    private List<Integer> order = new ArrayList<Integer>();
    private List<Boolean> defaulted = new ArrayList<Boolean>();
    private List<String> names = new ArrayList<String>();

    private final Declaration declaration;

    private final List<Parameter> parameters;

    private Map<FunctionOrValue, String> arguments = 
            new HashMap<FunctionOrValue, String>();
    private final Map<FunctionOrValue, String> defaultArgs = 
            new HashMap<FunctionOrValue, String>();
    private final Map<FunctionOrValue, String> originalDefaultArgs = 
            new HashMap<FunctionOrValue, String>();
    private final Map<FunctionOrValue, String> paramLists = 
            new HashMap<FunctionOrValue, String>();
this feels wrong
Gavin King
@gavinking
Mar 25 2016 16:18
Yes but if you want to fix that be my guest!
It's that way only due to laziness
Wee
Well wait. Actually.
In fact it's rather harder to identify callers for the second param list since they are indirect invocations
Bastien Jansen
@bjansen
Mar 25 2016 16:19
I'm trying to fix this, by creating a class that will hold a list of parameters (objects which will merge the current order, defaulted, names and parameters)
Gavin King
@gavinking
Mar 25 2016 16:19
Probably that's why I did not think it worthwhile
But go ahead be my guest
Bastien Jansen
@bjansen
Mar 25 2016 16:20
and this class will also contain moveUp() and moveDown(), called by the UI
it might be more readable
but I'll look at other parameter lists later
Gavin King
@gavinking
Mar 25 2016 16:23
I found that refactoring amazingly tricky to get right—try not to break it :)
A lot going on there, with in lining default args and renaming and all that
Bastien Jansen
@bjansen
Mar 25 2016 16:24
yeah I noticed that
Gavin King
@gavinking
Mar 25 2016 16:24
It's four different refactorings packed into one
Needs tests :-/
Bastien Jansen
@bjansen
Mar 25 2016 16:25
wouldn't it be easier if you applied changes to those lists/maps as soon as you make a change in the UI?
you wouldn't have to figure out which was renamed, which order changed etc
Gavin King
@gavinking
Mar 25 2016 16:26
I am not sure what you mean
Do you mean I keep state in the V instead of the M?
(MVC)
Bastien Jansen
@bjansen
Mar 25 2016 16:27
I mean update the M as soon as something changes in the V, instead of when you click "apply"
and when you click apply, you apply the new M in the form of TextChanges
the current behavior is: make changes in the V, then click apply, try to figure out what changed in the M (not so easy apparently), then apply the M
of course, if you click "cancel" you just have to ditch the M and not apply it
Bastien Jansen
@bjansen
Mar 25 2016 16:33
OTOH this requires quite a lot of changes compared to the current version, so it's possible I break a few things
Gavin King
@gavinking
Mar 25 2016 17:10
@bjansen yeah, that’s what I understood you to mean
look, i’m not much of a UI developer
I have no strong opinion on the right way to do desktop-client MVC :)
Bastien Jansen
@bjansen
Mar 25 2016 18:22
I'm no expert either, but I have a feeling it could make things easier. I'll try this on intellij, and if it works I'll use it in eclipse too.