javaCompletionProposalComputer [message #243234] |
Fri, 27 April 2007 00:19  |
Eclipse User |
|
|
|
Originally posted by: first.last.oracle.com
I am writing a JavaCompletionProposalComputer for the Dali project that
will help the user when typing in the settings for the various JPA annotations
(e.g. provide a list of all the database table names that could be used for
an entity's @Table.name annotation element). I have a few questions:
1. In the org.eclipse.jdt.ui.javaCompletionProposalComputer extension point,
what is the 'categoryId'?
2. Also in the org.eclipse.jdt.ui.javaCompletionProposalComputer extension point,
what is a 'partition'?
3. In org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer , what is
supposed to be returned by computeContextInformation(...)?
4. Where would I find the answers to the above questions, before bothering
this forum?
Thanks.
Brian
|
|
|
|
Re: [message #243267 is a reply to message #243238] |
Fri, 27 April 2007 18:07   |
Eclipse User |
|
|
|
Originally posted by: first.last.oracle.com
Thanks, Dani. Please let me ask you a few more questions:
>> 1. In the org.eclipse.jdt.ui.javaCompletionProposalComputer extension
>> point,
>> what is the 'categoryId'?
>
> You should defined your own category and give it a name. It will then
> appear on the
> Java > Editor > Content Assist Advanced preference page and users can
> enable or
> disable your proposal computer(s).
Where is this "category" defined? How would I know about this?
>> 2. Also in the org.eclipse.jdt.ui.javaCompletionProposalComputer
>> extension point,
>> what is a 'partition'?
>
> Java documents are split into different partitions and each partition
> has a partition
> (or better: document) type, e.g. code (i.e. default), Javadoc, string etc.
I see these are "defined" in IJavaPartitions; are these "partitions" the
part of a Java source file from which a computer is invoked? For example,
if I have only the "__java_string" partition defined, my computer would
only be invoked when the user requested assistance when the cursor is
inside of a Java String literal. Is that correct? Are these partitions
mutually exclusive? Or do they overlap? For example, does "__java_partitioning"
include all the other "__java_*" partitions?
>> 3. In org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer ,
>> what is
>> supposed to be returned by computeContextInformation(...)?
>
> This is the parameter hint info - I guess you need to get a bit more
> familiar with code assist ;-)
Ahh, I see now. I'm guessing I would not need this unless I were to insert
a partially completed string and I wanted to prompt the user to type in
some more stuff to complete the string. Is that correct?
>> 4. Where would I find the answers to the above questions, before
>> bothering
>> this forum?
>
> See ICompletionProposal and best is to use how it is done in JDT UI itself.
I guess my biggest barrier to following how JDT uses this stuff is my
inability to figure out how to get Eclipse to search the JDT source zips
for strings. Do you have any idea how I can go about doing that? A "File
Search" seems to search only my own source files when I tell it to search
the "Workspace"....
Thanks again.
Brian
|
|
|
|
Re: [message #243865 is a reply to message #243267] |
Fri, 18 May 2007 11:38  |
Eclipse User |
|
|
|
Brian Vosburgh wrote:
> Thanks, Dani. Please let me ask you a few more questions:
>
>>> 1. In the org.eclipse.jdt.ui.javaCompletionProposalComputer
>>> extension point,
>>> what is the 'categoryId'?
>>
>>
>> You should defined your own category and give it a name. It will then
>> appear on the
>> Java > Editor > Content Assist Advanced preference page and users can
>> enable or
>> disable your proposal computer(s).
>
>
> Where is this "category" defined? How would I know about this?
You define this in your extension (plugin.xml).
>
>>> 2. Also in the org.eclipse.jdt.ui.javaCompletionProposalComputer
>>> extension point,
>>> what is a 'partition'?
>>
>>
>> Java documents are split into different partitions and each partition
>> has a partition
>> (or better: document) type, e.g. code (i.e. default), Javadoc, string
>> etc.
>
>
> I see these are "defined" in IJavaPartitions; are these "partitions" the
> part of a Java source file from which a computer is invoked? For example,
> if I have only the "__java_string" partition defined, my computer would
> only be invoked when the user requested assistance when the cursor is
> inside of a Java String literal. Is that correct?
Yes.
> Are these partitions
> mutually exclusive?
Yes.
> Or do they overlap? For example, does "__java_partitioning"
> include all the other "__java_*" partitions?
>
>>> 3. In org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer ,
>>> what is
>>> supposed to be returned by computeContextInformation(...)?
>>
>>
>> This is the parameter hint info - I guess you need to get a bit more
>> familiar with code assist ;-)
>
>
> Ahh, I see now. I'm guessing I would not need this unless I were to
> insert
> a partially completed string and I wanted to prompt the user to type in
> some more stuff to complete the string. Is that correct?
Not a prompt. Just the hints displayed on top of the method.
Dani
>
>>> 4. Where would I find the answers to the above questions, before
>>> bothering
>>> this forum?
>>
>>
>> See ICompletionProposal and best is to use how it is done in JDT UI
>> itself.
>
>
> I guess my biggest barrier to following how JDT uses this stuff is my
> inability to figure out how to get Eclipse to search the JDT source zips
> for strings. Do you have any idea how I can go about doing that? A "File
> Search" seems to search only my own source files when I tell it to search
> the "Workspace"....
>
> Thanks again.
> Brian
|
|
|
Powered by
FUDForum. Page generated in 0.03964 seconds