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,

I had created a similar view, but it works with the Call Hierarchy.
The main purpose of it was to see the usage of the function in the calling function.
I had created it with the Helios release and didn't get time to migrate it to 4.x release.
It can work for your requirement also. Just we need to implement the listener.

I have attached a picture for it along with the mail.

Thanks,
Vishal



On Sun, Feb 9, 2014 at 2:31 AM, Elazar Leibovich <elazarl@xxxxxxxxx> wrote:
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,


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Attachment: view.png
Description: PNG image


Back to the top