Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Source Insight-like preview window/panel

Hi,

Thanks for responding.

The main difference between those feature is the fact that the preview window updates automatically, whenever the cursor moved to a different AST element - the preview window is updated. Like the project window on left is updated to show the currently edited file (if the relevant option is selected).

In order to see the hover preview you need to press F3 or to point the cursor in there.

It's not a huge difference, but some people could like one style more than the other. It'll also make the life of Source-Insight users easier.


On Fri, Feb 7, 2014 at 10:03 AM, Elazar Leibovich <elazarl@xxxxxxxxx> wrote:
Is there any plan for feature like Source-Insight preview window?

The gist of the feature is the following. There's a small pane below the code editor, when the cursor is moved above a certain AST element, this element is looked at the index, and its declaration/implementation is shown in the window below.

For example, see this magnificent ascii art. The  is the cursor, 

    ----------------
    | int main() { |
    |     fo¶o();  |
    |     bar();   |
    | }            |
    +--------------+
    | void foo() { |
    |     cout <<  |
    +--------------+

When the cursor is moved to bar, the bottom window automatically moves to show the bar function:

    ----------------
    | int main() { |
    |     foo();   |
    |     bar();  |
    | }            |
    +--------------+
    | void bar() { |
    |     cin >> i;|
    +--------------+


The only reference we've found for this feature is a statement in Eclipse forums, where someone is working on this, from 2009:


And a mailing list feature request:


Couldn't find anything on the bug tracker.

Is there interest to implement this feature in Eclipse CDT?

If there is, we would like to file a feature request and work on it.

Before we start, that would be great if someone would point us to the correct way for the following:
  1. Where should we hook into the "cursor moved to PDOM element" event.
  2. Adding a new panel to the bottom, which is capable of previewing DOM.
  3. Moving the preview window to have a certain PDOM element in view.
Maybe mention a similar patches we can look at.

Thanks,


Back to the top