|
|
Re: Implementing the Search operation [message #688368 is a reply to message #673363] |
Fri, 24 June 2011 14:29   |
Darie Moldovan Messages: 67 Registered: November 2010 Location: Darmstadt, Germany |
Member |
|
|
Hi Dani,
thank you for your time & sorry for my late reply. I didn't get any new post notification per email 
Anyway, I looked where you advised me and also searched the internet for other custom implementations of the search operation. Looking into the Search support section of the dev guide was not very helpful, because they only say there what classes you need and which classes to extend. No implementation details/hints are given. I also found this implementation (Java Search), but the problem is that my implementation is just about displaying the results - all examples treat the whole problem - the search page, the query, the search itself and the results being displayed. They build one on another (query objects are being passed from class to class) and I could not find the spot where my implementation goes the same way as the others. Here's another link I found, unfortunately there's the same problem. Maybe you are more experienced and can just give me a hint what to keep from that whole structure and what I don't need from there.
But please let me detail a little bit my thoughts. As I previously said, I can make an OCL query in one of my editors. The Object Constraint Language (OCL) is irrelevant here, what matters is that the actual search is already implemented by the OCL language. After doing a query with OCL, I automatically get an object of type Collection<EObject>. So the search itself is done for me automatically.
Having a collection of EObjects, the only thing I want to do with them is simply display them in a Search View of Eclipse (tree-like). I don't want to search anything, I don't have any search queries to evaluate etc. Just imagine you have a list of objects and want to create out of this list a Search View which displays each element from the list in a tree, like everyone's costumed when performing a classic file search in Eclipse - instead of programming yourself an editor part where you display the list elements.
Let's just first stick to this question, other details are not so important right now for this part of my implementation. If you can give me a hint where to start, I would be really greatful.
Thanks in advance.
[Updated on: Fri, 24 June 2011 14:31] Report message to a moderator
|
|
|
|
Re: Implementing the Search operation [message #689763 is a reply to message #670078] |
Tue, 28 June 2011 09:55   |
Darie Moldovan Messages: 67 Registered: November 2010 Location: Darmstadt, Germany |
Member |
|
|
Hi Azad,
thank you for the reply.
The only thing I managed to do is to open the Search View programatically:
NewSearchUI.activateSearchResultView();
ISearchResultViewPart viewPart = NewSearchUI.getSearchResultView();
Now, I want to start populating the search view with my own data, not with a standard search result (which is often a class extending AbstractTextSearchResult and implementing ISearchResult).
I tried ignoring the fact that I don't have any search results the way that they are returned when you actually search something and tried to add my own objects in the search view 'by hand'. I just want to display the elements of a Collection<EObject> in the search view.
Having opened the search view programatically, how can I populate it with values? Suppose we use the tree representation in the search view.
Thanks in advance.
Darie
[Updated on: Tue, 28 June 2011 09:56] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.05370 seconds