ccw-ide / ccw

Counterclockwise is an Eclipse plugin helping developers write Clojure code
https://github.com/laurentpetit/ccw/wiki/GoogleCodeHome
Eclipse Public License 1.0
220 stars 50 forks source link

fix REPLView layout: sash usage sucks #207

Open laurentpetit opened 9 years ago

laurentpetit commented 9 years ago

Original issue 166 created by laurentpetit on 2010-11-04T15:19:00.000Z:

The REPLView's input and log components should "float", and not require manual adjustment via a sash.

laurentpetit commented 9 years ago

Comment #1 originally posted by laurentpetit on 2010-11-04T17:45:26.000Z:

Even better, the REPLView should contain only one editor (er, source viewer?) which we then decorate the editable portion of (that content after the logged responses, etc) with ClojureSourceViewer stuff (damager/repairer, paredit, etc). This would be the same effect as e.g. javascript capability within HTML files, etc. The APIs involved are still opaque to me, though.

laurentpetit commented 9 years ago

Comment #2 originally posted by laurentpetit on 2010-11-04T17:45:55.000Z:

<empty>

laurentpetit commented 9 years ago

Comment #3 originally posted by laurentpetit on 2010-11-04T19:32:36.000Z:

Yes, tough topic, and better do this "hard" work once (if possible) => so be clear about the intended feature and try to reach it the first time :)

Did you write "editor" ? ;-) No regret about not having done this as an editor ? :-)

My thoughts: I would like to do this correctly. What I have in mind is that, ideally, I would wait first for Christophe finishing incremental parsley. The hope there is that we can share the model for the edited text between paredit and the syntax coloration stuff (hopefully the incremental aspect will be fast enough to be able to do everything in the GUI thread, and not have to deal with 2-pass colorization with one longer pass done in a background thread, as does the JDT for example). If everything works as expected, then it would be by itself, in the end, a rewrite of the editor, full clojure. I expect that it could then be made even easier to share editor's machinery between several flavors of editor (clojure, replview).

So, the "right way to do it" could wait until parsley's completion (promised before Christmas by Christophe).

In the mean time, we could do something more hacky, but quick to deliver: "watch" the input area, and recompute its height accordingly.

laurentpetit commented 9 years ago

Comment #4 originally posted by laurentpetit on 2010-11-06T08:49:42.000Z:

I don't think a real solution would need to wait for any new versions of parsley or a Clojure-implemented -- my understanding is that only proper usage of the existing APIs for registering the clojure editor's facilities would work. I've certainly been wrong before, though. :-)

I've tweaked things a bit until we address this better:

That makes it usable, at least for me.

Your "hacky" idea is a good one, but looking at the API, I'm not sure it could be made to work well: it seems that the sash position can only be set in relative terms, and I'm guessing keeping it positioned properly if e.g. the overall height of a REPLView changes would be challenging. It looks like use of a SashForm might provide better facilities, if our ideal solution is yet a ways off.

laurentpetit commented 9 years ago

Comment #5 originally posted by laurentpetit on 2011-04-21T19:46:17.000Z:

<empty>

laurentpetit commented 9 years ago

Comment #6 originally posted by laurentpetit on 2014-07-10T18:37:58.000Z:

<empty>

laurentpetit commented 9 years ago

Comment #7 originally posted by laurentpetit on 2014-07-10T20:11:17.000Z:

<empty>

laurentpetit commented 9 years ago

Comment #8 originally posted by laurentpetit on 2014-08-21T20:36:04.000Z:

<empty>

laurentpetit commented 9 years ago

Comment #9 originally posted by laurentpetit on 2014-09-25T21:30:06.000Z:

<empty>