Is there a way to replace the Eclipse JDT's code completion list with a multi-level tree? - eclipse

I know that the eclipse code completion widget can be customized to add new suggestions and even to change the order.
I'm wondering whether there's a way to replace the current list format (or single-level tree, if this is a tree control) with a tree of multiple levels.
Thus, for example, instead of selecting from a list of methods sorted by name, I will select from a category and then from a subcategory, and then from the items.
I'm not too familiar with that part of the SDK, but I'd like to know if this is feasible.
Thanks!

Related

Sorting object's run states

On object's diagram, I have two different objects inherited from the same class. Unfortunately displayed run states are sorted in a different way. I am trying to sort it but the order of displayed values doesn't change.
Is there any way to sort it? I've tried to set 'Sort Features Alphabetically' but nothing happened.
You need to sort that "manually". t_object.runstate holds
#VAR;Variable=<name>;Value=<val>;Note=<note>;Op=<op>;#ENDVAR
and it will appear in the order right there. So just disassemble the string, re-order as needed and replace it.
EAUI: The sort triangle in the Run State editor has only effect in the editor itself. It does not re-sort the real list. Report a bug (also about a missing "green arrow" which IIRC can be emulated by a strange key shortcut).

References in Workspace are collapsed

When I use ctrl+shift+G to find references for an object in eclipse, I will get a list of those, but they are collapsed like this:
Why being collapsed?
Those four occurences are method calls on the object. I expect to be able to see which method calls that are called on the object by looking in this list. Can that be made?
Matches within a single method in a class are always just shown as 'n matches'. There is no way to expand this in the search results view (see Eclipse bug 46051).

Set a fixed controller/action for extension/plugin which are not influenced by whatever is passed on the query string

I want to bootstrap/embed an extension with fixed controller/action and no matter what is passed to the query string (e.g. tx_*[controller]/tx_*[action]) should not change the behavior of the embedded/bootstrapped version of the extension.
Basically I need to insert multiple instances of the same extension/plugin and each instance should only call what I have defined. Currently it throws an exception if it's not allowed or if I allow it it executes whatever is in the query string.
I want to be able to do that with the same plugin with different controllers.
Is it possible?
EDIT:
Lets say I have a plugin with 3 controllers - List, Show, Top. I want to embed in my page the controllers List and Top. When I click on details in List in my query string I have the appropriate arguments so the extension knows I want to show details on one of the items in list. But these arguments also influence what is shown in Top and now Top shows the same thing as List. I want to be able to embed the Top controller who will never change its output based on the query string.
I tried to do it the same way - and failed to do it in a clean way.
According to several tickets on the forge it is recommended to split it up in different plugins.
/edit:
Just as an additional reference, you could check config.tx_extbase.mvc.callDefaultActionIfActionCantBeResolved = 1
Perhaps it can help you in your case.

How can I sort widgets in GWT?

I have a list of widgets which needs to be sorted. I want to create a container for these list of widgets to re-sort them each time new widget is added. How can I do it?
I can see the following ways:
a straightforward way is place them into arraylist and sort via Comparator, but after a new element is added we have to remove all list from container and add them again, in a new order.
use some sorting container. i have found only CellTable for this. But actually I dont need its rich functionality - I have only one column, dont need to sort on user events, only when new element added or removed, - so is there something else I can utilize in my use case?
GWT 2.4
PS
Actually, I am looking for something, that can be expressed like "widget container backed by widget collection", i.e. I change collection - container changes its contents, how can I implement this, or where can I find it?
PPS
The widgets can be different, thats why I dont think I can use CellTable easily.
There is no straightforward way of re-sorting the elements in the DOM after you add a new widget.
When the widgets are attached you cannot just move them (change their position in the document structure) without detaching and re-attaching.
Well, with absolute positioning you can just change the left-top coordinates to move the items, if it is what you need.
I had a similar problem to solve when I had to sort TreeItem elements (no built-in sort method available). As a workaround, I read all the children into the list and remove them from the parent widget at the same time, then sort these items using Comparator and add them back to parent from the sorted list. Everything is in a single sort() method, which encapsulates all required functionality and kind of simplifies understanding of this code.
"widget container backed by widget collection"
I would like to learn about one like that that also can do sorting and re-attaching on the fly. But it still will be backed by the same detaching-attaching I assume. I would recommend you to write one yourself, that will fit your particular needs. Either you need a Tree or a FlowPanel or anything else - you can extend that and add sort() logic according to context. And override add() method accordingly. So, your first option looks like a possible solution to me.

Show Diff of two trees in Eclipse

In Eclipse, I am using a TreeViewer to show a custom tree, whose contents are drawn from an ITreeContentProvider. Now I am trying to create a second view that allows me to automatically show a two-way comparisons of two such trees. I found various views for textual comparison within Eclipse, but I could not find an easy way to show the structural differences between two arbitrary trees. Any thoughts?
When the Data Model the ContentProvider is creating and the labelProvider is diplaying is the Same, you could use the same viewer in the right and the left of a view.
You could than compare the TreeItem Elements of both TreeViewer and mark the ones, which has changed.
The other solution is to compare the DataModels and add a special flag to the changed elements. The LabelProvider can check this flag and draw a special color to indicate, that this element is different.
I do not know an Editor inside Eclipse, providing this functionality.