Home » Eclipse Projects » Rich Client Platform (RCP) » ContentAssist: additional Info
ContentAssist: additional Info [message #460253] |
Mon, 18 December 2006 10:10  |
Eclipse User |
|
|
|
Originally posted by: febro.gmx.net
Hi,
I'm working an ContentAssistance and the main part - showing the proposals -
works good, but now I want to show additional information about the selected
element - like in the standar java editor, when you select an element in the
proposal list, a second popup with the corresponding "javadoc" is shown...
how to do this?
i already tried the code below, but it doens't work (the proposal list is
shown correctly, but no additional infos). Any hints?
thx!
Felix
ContextInformation ci = new ContextInformation("1", "2");
completion.add(new CompletionProposal(text, currentText.documentOffset,
currentText.text.length(), text.length(), null, name, ci,
element.getDescription()));
|
|
|
Re: ContentAssist: additional Info [message #460315 is a reply to message #460253] |
Tue, 19 December 2006 08:43   |
Eclipse User |
|
|
|
Felix brossmann wrote:
>Hi,
>
>I'm working an ContentAssistance and the main part - showing the proposals -
>works good, but now I want to show additional information about the selected
>element - like in the standar java editor, when you select an element in the
>proposal list, a second popup with the corresponding "javadoc" is shown...
>how to do this?
>
>i already tried the code below, but it doens't work (the proposal list is
>shown correctly, but no additional infos). Any hints?
>
>
See ICompletionProposal.getAdditionalProposalInfo()
Dani
>thx!
>Felix
>ContextInformation ci = new ContextInformation("1", "2");
>
>completion.add(new CompletionProposal(text, currentText.documentOffset,
>currentText.text.length(), text.length(), null, name, ci,
>element.getDescription()));
>
>
>
>
>
>
|
|
|
Re: ContentAssist: additional Info [message #460332 is a reply to message #460315] |
Wed, 20 December 2006 02:56   |
Eclipse User |
|
|
|
Originally posted by: febro.gmx.net
> >I'm working an ContentAssistance and the main part - showing the
> >proposals -
> >works good, but now I want to show additional information about the
> >selected
> >element - like in the standar java editor, when you select an element in
> >the
> >proposal list, a second popup with the corresponding "javadoc" is
> >shown...
> >how to do this?
> >
> >i already tried the code below, but it doens't work (the proposal list is
> >shown correctly, but no additional infos). Any hints?
> >
> >
> See ICompletionProposal.getAdditionalProposalInfo()
Thanks, but that doesn't help... I use this constructor:
completion.add(new CompletionProposal(text, currentText.documentOffset,
currentText.text.length(), text.length(), null, name, null,
element.getDescription()));
The last parameter sets the description.
How can I *show* the description? Do I have to code this manually?
I use a
public class TagContentAssistProcessor implements
IContentAssistProcessor
In the method "public ICompletionProposal[]
computeCompletionProposals(ITextViewer viewer, int offset)", an array is
built (using the constructor I wrote earlier) and returned. That's what
I do. The proposal-list is shown, but not the additional information...
This is a snippet from my "getContentAssistant"-method... Do I have to
set some flags here? I haven't found anything interesting in
"ContentAssistant", so I don't think so...
ContentAssistant assistant = new ContentAssistant();
assistant.setContentAssistProcessor(new
TagContentAssistProcessor(getXMLTagScanner()),
XMLPartitionScanner.XML_TAG);
assistant.enableAutoActivation(true);
assistant.setAutoActivationDelay(500);
assistant.setProposalPopupOrientation(IContentAssistant.CONT EXT_INFO_BEL
OW);
assistant.setContextInformationPopupOrientation(IContentAssi stant.CONTEX
T_INFO_ABOVE);
return assistant;
Felix
|
|
|
Re: ContentAssist: additional Info [message #460339 is a reply to message #460332] |
Wed, 20 December 2006 07:14   |
Eclipse User |
|
|
|
Felix brossmann wrote:
>>>I'm working an ContentAssistance and the main part - showing the
>>>proposals -
>>>
>>>
>
>
>
>>>works good, but now I want to show additional information about the
>>>selected
>>>
>>>
>
>
>
>>>element - like in the standar java editor, when you select an element in
>>>the
>>>
>>>
>
>
>
>>>proposal list, a second popup with the corresponding "javadoc" is
>>>shown...
>>>
>>>
>
>
>
>>>how to do this?
>>>
>>>
>
>
>
>
>
>
>>>i already tried the code below, but it doens't work (the proposal list is
>>>
>>>
>
>
>
>>>shown correctly, but no additional infos). Any hints?
>>>
>>>
>
>
>
>
>
>
>
>
>
>>See ICompletionProposal.getAdditionalProposalInfo()
>>
>>
>
>
>
>Thanks, but that doesn't help... I use this constructor:
>
>completion.add(new CompletionProposal(text, currentText.documentOffset,
>
>currentText.text.length(), text.length(), null, name, null,
>
>element.getDescription()));
>
>
>
>The last parameter sets the description.
>
>
>
>How can I *show* the description? Do I have to code this manually?
>
>
No, the additional info should appear automatically after a short
time-out. If that doesn't work for you simply file a bug report against
Platform Text with steps (best is your code - at least the one that does
code assist).
Dani
>
>
>I use a
>
>public class TagContentAssistProcessor implements
>
>IContentAssistProcessor
>
>
>
>In the method "public ICompletionProposal[]
>
>computeCompletionProposals(ITextViewer viewer, int offset)", an array is
>
>built (using the constructor I wrote earlier) and returned. That's what
>
>I do. The proposal-list is shown, but not the additional information...
>
>
>
>This is a snippet from my "getContentAssistant"-method... Do I have to
>
>set some flags here? I haven't found anything interesting in
>
>"ContentAssistant", so I don't think so...
>
>
>
>ContentAssistant assistant = new ContentAssistant();
>
>assistant.setContentAssistProcessor(new
>
>TagContentAssistProcessor(getXMLTagScanner()),
>
> XMLPartitionScanner.XML_TAG);
>
>assistant.enableAutoActivation(true);
>
> assistant.setAutoActivationDelay(500);
>
>
>
> assistant.setProposalPopupOrientation(IContentAssistant.CONT EXT_INFO_BEL
>
>OW);
>
>
>
> assistant.setContextInformationPopupOrientation(IContentAssi stant.CONTEX
>
>T_INFO_ABOVE);
>
> return assistant;
>
>
>
>
>
>Felix
>
>
>
>
|
|
|
Re: ContentAssist: additional Info [message #461760 is a reply to message #460339] |
Tue, 16 January 2007 08:42  |
Eclipse User |
|
|
|
Originally posted by: febro.gmx.net
ok I got it:
the following line had to be added:
assistant.setInformationControlCreator(getInformationControl Creator(sourceViewer));
"Daniel Megert" <daniel_megert@ch.ibm.com> schrieb im Newsbeitrag
news:emb9fd$m6r$1@utils.eclipse.org...
> Felix brossmann wrote:
>
>>>>I'm working an ContentAssistance and the main part - showing the
>>>>proposals -
>>>>
>>
>>
>>>>works good, but now I want to show additional information about the
>>>>selected
>>>>
>>
>>
>>>>element - like in the standar java editor, when you select an element in
>>>>the
>>>>
>>
>>
>>>>proposal list, a second popup with the corresponding "javadoc" is
>>>>shown...
>>>>
>>
>>
>>>>how to do this?
>>>>
>>
>>
>>
>>
>>>>i already tried the code below, but it doens't work (the proposal list
>>>>is
>>>>
>>
>>
>>>>shown correctly, but no additional infos). Any hints?
>>>>
>>
>>
>>
>>
>>
>>
>>>See ICompletionProposal.getAdditionalProposalInfo()
>>>
>>
>>
>>
>>Thanks, but that doesn't help... I use this constructor:
>>
>>completion.add(new CompletionProposal(text, currentText.documentOffset,
>>
>>currentText.text.length(), text.length(), null, name, null,
>>
>>element.getDescription()));
>>
>>
>>
>>The last parameter sets the description.
>>
>>
>>
>>How can I *show* the description? Do I have to code this manually?
>>
> No, the additional info should appear automatically after a short
> time-out. If that doesn't work for you simply file a bug report against
> Platform Text with steps (best is your code - at least the one that does
> code assist).
>
> Dani
>
>>
>>
>>I use a
>>
>>public class TagContentAssistProcessor implements
>>
>>IContentAssistProcessor
>>
>>
>>
>>In the method "public ICompletionProposal[]
>>
>>computeCompletionProposals(ITextViewer viewer, int offset)", an array is
>>
>>built (using the constructor I wrote earlier) and returned. That's what
>>
>>I do. The proposal-list is shown, but not the additional information...
>>
>>
>>
>>This is a snippet from my "getContentAssistant"-method... Do I have to
>>
>>set some flags here? I haven't found anything interesting in
>>
>>"ContentAssistant", so I don't think so...
>>
>>
>>
>>ContentAssistant assistant = new ContentAssistant();
>>
>>assistant.setContentAssistProcessor(new
>>
>>TagContentAssistProcessor(getXMLTagScanner()),
>>
>> XMLPartitionScanner.XML_TAG);
>>
>>assistant.enableAutoActivation(true);
>>
>> assistant.setAutoActivationDelay(500);
>>
>>
>>
>> assistant.setProposalPopupOrientation(IContentAssistant.CONT EXT_INFO_BEL
>>
>>OW);
>>
>>
>>
>> assistant.setContextInformationPopupOrientation(IContentAssi stant.CONTEX
>>
>>T_INFO_ABOVE);
>>
>> return assistant;
>>
>>
>>
>>
>>
>>Felix
>>
>>
>>
|
|
|
Goto Forum:
Current Time: Fri Mar 28 12:51:36 EDT 2025
Powered by FUDForum. Page generated in 0.03581 seconds
|