Bug 26528 - [content assist] Extension point needed to make input of completion proposal pluggable.
Summary: [content assist] Extension point needed to make input of completion proposal ...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: Other Windows 2000
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-15 17:58 EST by John Willson CLA
Modified: 2003-12-25 22:15 EST (History)
0 users

See Also:


Attachments
org.eclipse.jdt.internal.codeassist.InputMatcher is responsable for managing the plugins which provide input matchers and combine the result. (1.75 KB, text/plain)
2002-11-27 03:10 EST, John Willson CLA
no flags Details
org.eclipse.jdt.internal.codeassist.InputMatcherPlugin is the interface that input matchers must implement. InputMatcher class delegates the call to the plugins. (253 bytes, patch)
2002-11-27 03:13 EST, John Willson CLA
no flags Details | Diff
org.eclipse.jdt.internal.codeassist.CompletionEngine is using CharOperation.prefixEquals, Changed to InputMethod.prefixEquals (169.37 KB, patch)
2002-11-27 03:16 EST, John Willson CLA
no flags Details | Diff
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal.startWith is now using InputMatcher.prefixEquals (21.29 KB, patch)
2002-11-27 03:18 EST, John Willson CLA
no flags Details | Diff
eclipse\plugins\org.eclipse.jdt.core_2.1.0\plugin.xml adds <extension-point id="inputMatcher" name="%inputMatcher"/> (11.64 KB, patch)
2002-11-27 03:20 EST, John Willson CLA
no flags Details | Diff
sample plug in which allows type abbreviation of names. (112.91 KB, application/zip)
2002-11-27 03:38 EST, John Willson CLA
no flags Details
sample plug in which allows type abbreviation of names. (202.93 KB, application/zip)
2002-11-28 02:24 EST, John Willson CLA
no flags Details
org.eclipse.jdt.internal.codeassist.InputMatcher is responsable for managing the plugins which provide input matchers and combine the result. (1.92 KB, patch)
2002-11-28 02:26 EST, John Willson CLA
no flags Details | Diff
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal.startWith is now using InputMatcher.prefixEquals (15.95 KB, patch)
2002-11-28 02:30 EST, John Willson CLA
no flags Details | Diff
with AbbreviationInputMatcher, you can type "avlm" for "aVeryLongMethod" (692 bytes, application/octet-stream)
2002-11-28 02:42 EST, John Willson CLA
no flags Details
patch on org.eclipse.jdt.core project to provide input matcher extension point (15.80 KB, patch)
2003-12-25 22:10 EST, John Willson CLA
no flags Details | Diff
patch on org.eclipse.jdt.ui project (1.37 KB, patch)
2003-12-25 22:11 EST, John Willson CLA
no flags Details | Diff
sample plug in which allows type abbreviation of names. (2.52 KB, application/x-zip-compressed)
2003-12-25 22:15 EST, John Willson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Willson CLA 2002-11-15 17:58:50 EST
...
public void ¡Æ1$() {
}

public void aVeryLongMethodAndWithManyPrefixAlikeMethods() {
}

public void aMethod() {
  sigma1dollar<code completion>
  **for ¡Æ1$**
or
public void aMethod() {
  avlmawmpam<code completion>
  **for aVeryLongMethodAndWithManyPrefixAlikeMethods**
When I use the completion proposals, It works well with english charachars, but with some charachar which need composition like Chinese and Japenese charachars as method names and variable names (for readability),It's very bothering to switch between input methods. So an input matcher plugin is needed. To give an example in English, let's say the method name is $ or ¡Æ(It won't work for ¡Æ, but just an example), then I can type "dollar" or "sigma" for completion(or even "d" for $ and "s" for ¡Æ), or for the aVeryLongMethodAndWithManyPrefixAlikeMethods method, I can type "avlmawmpam" for completion. And for Chinese method named "ÖÐÎÄ", I can type "zhongwen"(which presents the accent of the two characters) or "zw"(for short) for completion.
It will affect "CompletionEngine.java" which is using CharOperation.prefixEquals and "JavaCompletionProposal.java" which is using startWith.
 Thanks.
Comment 1 Kai-Uwe Maetzel CLA 2002-11-18 11:56:52 EST
How should the input matcher extension look like? How should it concretely work 
and who do you think should provide it?
Comment 2 John Willson CLA 2002-11-18 19:54:47 EST
I don't exactly know how the extension point works for I'm just a newbie to Eclipse, But I think Eclipse is just the thing I've been waiting for when I first saw it just a few days ago. To my knowledge, the only way to extend is to make plug ins. So I think it should provide a extension point which will ask for an interface which may include a method "public boolean isMatched(String word, String start)", and many plug ins can have its own result. the result will be the "or" result of all the plug-ins' answers.
Comment 3 John Willson CLA 2002-11-27 03:10:51 EST
Created attachment 2521 [details]
org.eclipse.jdt.internal.codeassist.InputMatcher is responsable for managing the plugins which provide input matchers and combine the result.
Comment 4 John Willson CLA 2002-11-27 03:13:00 EST
Created attachment 2522 [details]
org.eclipse.jdt.internal.codeassist.InputMatcherPlugin is the interface that input matchers must implement. InputMatcher class delegates the call to the plugins.
Comment 5 John Willson CLA 2002-11-27 03:16:03 EST
Created attachment 2523 [details]
org.eclipse.jdt.internal.codeassist.CompletionEngine is using CharOperation.prefixEquals, Changed to InputMethod.prefixEquals

all the CharOperation.prefixEquals in it are Changed to
InputMethod.prefixEquals
Comment 6 John Willson CLA 2002-11-27 03:18:39 EST
Created attachment 2524 [details]
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal.startWith is now using InputMatcher.prefixEquals
Comment 7 John Willson CLA 2002-11-27 03:20:17 EST
Created attachment 2525 [details]
eclipse\plugins\org.eclipse.jdt.core_2.1.0\plugin.xml adds <extension-point id="inputMatcher" name="%inputMatcher"/>

eclipse\plugins\org.eclipse.jdt.core_2.1.0\plugin.xml adds 
<extension-point id="inputMatcher" name="%inputMatcher"/>
Comment 8 John Willson CLA 2002-11-27 03:38:17 EST
Created attachment 2526 [details]
sample plug in which allows type abbreviation of names.

for "aVeryLongMethod", you can just type "avlm".
new Object().<code completion>
you can just type hc for "hashCode"
Comment 9 John Willson CLA 2002-11-28 02:24:40 EST
Created attachment 2547 [details]
sample plug in which allows type abbreviation of names.
Comment 10 John Willson CLA 2002-11-28 02:26:52 EST
Created attachment 2548 [details]
org.eclipse.jdt.internal.codeassist.InputMatcher is responsable for managing the plugins which provide input matchers and combine the result.
Comment 11 John Willson CLA 2002-11-28 02:30:37 EST
Created attachment 2549 [details]
org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal.startWith is now using InputMatcher.prefixEquals
Comment 12 John Willson CLA 2002-11-28 02:42:17 EST
Created attachment 2550 [details]
with AbbreviationInputMatcher, you can type "avlm" for "aVeryLongMethod"

Sorry.I can't edit the attachment's obsoletes property. So I upload it just to
make the first InputMatcher obsoletes.
Comment 13 John Willson CLA 2003-12-25 22:10:10 EST
Created attachment 7277 [details]
patch on org.eclipse.jdt.core project to provide input matcher extension point
Comment 14 John Willson CLA 2003-12-25 22:11:24 EST
Created attachment 7278 [details]
patch on org.eclipse.jdt.ui project
Comment 15 John Willson CLA 2003-12-25 22:15:32 EST
Created attachment 7279 [details]
sample plug in which allows type abbreviation of names.

with this plug in, you can type "avlm" for "aVeryLongMethod"