Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » how to use IContextInformation with proposals
how to use IContextInformation with proposals [message #156411] Mon, 12 June 2006 03:47 Go to next message
Eclipse UserFriend
Originally posted by: rathish_j.thbs.com

Hi All

right now i am using CodeAssistant in my plugin with the help of
CompletionProposal API, i want show Context Information along with the
proposal. But the problem is, i don't how to integrate the proposal with
context information. That means whenever proposal selection changes, i have
to change the proposal information.

i am using context information like this.

IContextInformation info = new ContextInformation(displayStr, "Message");
proposals[proposalCount++] = new CompletionProposal (displayStr,
documentOffset, 0, displayStr.length(), lclsDesc.createImage(),
completion.trim(), info, "");

it's right or we have manually change the context information on the events?

thank u
rathish raj j
Re: how to use IContextInformation with proposals [message #156417 is a reply to message #156411] Mon, 12 June 2006 06:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tom_eicher.ch.ibm.com

Ratish, what are you trying to accomplish, and what does not work as you
would expect?

Notes on terminology: "Context information" is the small tooltip that is
shown once a proposal has been inserted (for example, the parameter
hints after inserting a Java method proposal).

"Additional information" is shown while the proposal popup is presenting
the choices. An example for this is the javadoc information shown for
Java proposals. See ICompletionProposal::getAdditionalProposalInfo().

Rathish wrote:
> right now i am using CodeAssistant in my plugin with the help of
> CompletionProposal API, i want show Context Information along with the
> proposal. But the problem is, i don't how to integrate the proposal with
> context information. That means whenever proposal selection changes, i have
> to change the proposal information.

What is the "proposal selection"?

> i am using context information like this.
>
> IContextInformation info = new ContextInformation(displayStr, "Message");
> proposals[proposalCount++] = new CompletionProposal (displayStr,
> documentOffset, 0, displayStr.length(), lclsDesc.createImage(),
> completion.trim(), info, "");

Sounds good to me - the proposal popup should show "Message" once the
proposal is applied.

> it's right or we have manually change the context information on the events?

Which events?

-tom
Re: how to use IContextInformation with proposals [message #156428 is a reply to message #156417] Mon, 12 June 2006 09:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rathish_j.thbs.com

Hello Tom,

Thank u for ur replay,

i want display the documentation information while proposal popup is
presented. i am giving additional information in
my CompeletionProposal constructor, but still i am not seeing the additional
information

proposals[proposalCount++] = new CompletionProposal (displayStr,
documentOffset, 0, displayStr.length(), lclsDesc.createImage(),
completion.trim(), info, "Information");

any other way to set additional information?

rathish raj j

"Tom Eicher" <tom_eicher@ch.ibm.com> wrote in message
news:e6j0bn$koi$1@utils.eclipse.org...

> Ratish, what are you trying to accomplish, and what does not work as you
> would expect?
>
> Notes on terminology: "Context information" is the small tooltip that is
> shown once a proposal has been inserted (for example, the parameter hints
> after inserting a Java method proposal).
>
> "Additional information" is shown while the proposal popup is presenting
> the choices. An example for this is the javadoc information shown for Java
> proposals. See ICompletionProposal::getAdditionalProposalInfo().
>
> Rathish wrote:
>> right now i am using CodeAssistant in my plugin with the help of
>> CompletionProposal API, i want show Context Information along with the
>> proposal. But the problem is, i don't how to integrate the proposal with
>> context information. That means whenever proposal selection changes, i
>> have to change the proposal information.
>
> What is the "proposal selection"?
>
>> i am using context information like this.
>>
>> IContextInformation info = new ContextInformation(displayStr, "Message");
>> proposals[proposalCount++] = new CompletionProposal (displayStr,
>> documentOffset, 0, displayStr.length(), lclsDesc.createImage(),
>> completion.trim(), info, "");
>
> Sounds good to me - the proposal popup should show "Message" once the
> proposal is applied.
>
>> it's right or we have manually change the context information on the
>> events?
>
> Which events?
>
> -tom
Re: how to use IContextInformation with proposals [message #156432 is a reply to message #156428] Mon, 12 June 2006 09:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tom_eicher.ch.ibm.com

Rathish wrote:
> i want display the documentation information while proposal popup is
> presented. i am giving additional information in
> my CompeletionProposal constructor, but still i am not seeing the additional
> information
>
> proposals[proposalCount++] = new CompletionProposal (displayStr,
> documentOffset, 0, displayStr.length(), lclsDesc.createImage(),
> completion.trim(), info, "Information");
>
> any other way to set additional information?

Rathish, simply use the other constructor of CompletionProposal and pass
in the additionalProposalInfo parameter.

-tom
Re: how to use IContextInformation with proposals [message #156444 is a reply to message #156432] Mon, 12 June 2006 15:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rathish_j.thbs.com

Hello Tom

as far as is know, in the another constructor we don't have additional
information parameter. I think there must be some way to trigger it.

Thanks
rathish

"Tom Eicher" <tom_eicher@ch.ibm.com> wrote in message
news:e6jdb7$tk5$1@utils.eclipse.org...
> Rathish wrote:
>> i want display the documentation information while proposal popup is
>> presented. i am giving additional information in
>> my CompeletionProposal constructor, but still i am not seeing the
>> additional information
>>
>> proposals[proposalCount++] = new CompletionProposal (displayStr,
>> documentOffset, 0, displayStr.length(), lclsDesc.createImage(),
>> completion.trim(), info, "Information");
>>
>> any other way to set additional information?
>
> Rathish, simply use the other constructor of CompletionProposal and pass
> in the additionalProposalInfo parameter.
>
> -tom
Re: how to use IContextInformation with proposals [message #156460 is a reply to message #156444] Mon, 12 June 2006 15:44 Go to previous message
Eclipse UserFriend
Originally posted by: rathish_j.thbs.com

Hello Tom

i got how to use the additional information on the proposals. we have
set the InformationControlCreator like this.

assistant.setInformationControlCreator(getMyInformationContr ol(sourceViewer));
private IInformationControlCreator getMyInformationControl(ISourceViewer
sourceViewer)
{
return new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent)
{
return new DefaultInformationControl(parent);
}};
}

Thank u
rathish
"Rathish" <rathish_j@thbs.com> wrote in message
news:e6k02k$tc0$1@utils.eclipse.org...
> Hello Tom
>
> as far as is know, in the another constructor we don't have additional
> information parameter. I think there must be some way to trigger it.
>
> Thanks
> rathish
>
> "Tom Eicher" <tom_eicher@ch.ibm.com> wrote in message
> news:e6jdb7$tk5$1@utils.eclipse.org...
>> Rathish wrote:
>>> i want display the documentation information while proposal popup is
>>> presented. i am giving additional information in
>>> my CompeletionProposal constructor, but still i am not seeing the
>>> additional information
>>>
>>> proposals[proposalCount++] = new CompletionProposal (displayStr,
>>> documentOffset, 0, displayStr.length(), lclsDesc.createImage(),
>>> completion.trim(), info, "Information");
>>>
>>> any other way to set additional information?
>>
>> Rathish, simply use the other constructor of CompletionProposal and pass
>> in the additionalProposalInfo parameter.
>>
>> -tom
>
>
Previous Topic:new wizard plugin: GUI problem
Next Topic:Need Hekp in Installing Eclipse
Goto Forum:
  


Current Time: Tue Apr 16 20:31:43 GMT 2024

Powered by FUDForum. Page generated in 0.09786 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top