Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 157506 Details for
Bug 275270
[regression] Code Assist list was bad refreshed using Backspace button
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
275270.txt (text/plain), 7.94 KB, created by
Zhongwei Zhao
on 2010-01-28 05:08:09 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Zhongwei Zhao
Created:
2010-01-28 05:08:09 EST
Size:
7.94 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.dltk.ui >Index: src/org/eclipse/dltk/ui/text/completion/ContentAssistProcessor.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.dltk/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/text/completion/ContentAssistProcessor.java,v >retrieving revision 1.9 >diff -u -r1.9 ContentAssistProcessor.java >--- src/org/eclipse/dltk/ui/text/completion/ContentAssistProcessor.java 18 Jan 2010 08:18:27 -0000 1.9 >+++ src/org/eclipse/dltk/ui/text/completion/ContentAssistProcessor.java 28 Jan 2010 10:07:11 -0000 >@@ -39,6 +39,7 @@ > import org.eclipse.jface.text.contentassist.ContentAssistEvent; > import org.eclipse.jface.text.contentassist.ContentAssistant; > import org.eclipse.jface.text.contentassist.ICompletionListener; >+import org.eclipse.jface.text.contentassist.ICompletionListenerExtension; > import org.eclipse.jface.text.contentassist.ICompletionProposal; > import org.eclipse.jface.text.contentassist.IContentAssistProcessor; > import org.eclipse.jface.text.contentassist.IContentAssistant; >@@ -121,105 +122,113 @@ > > private String fErrorMessage; > >- public ContentAssistProcessor(ContentAssistant assistant, String partition) { >- Assert.isNotNull(partition); >- Assert.isNotNull(assistant); >+ class CompletionListener implements ICompletionListener, >+ ICompletionListenerExtension { > >- fPartition = partition; >- fCategories = CompletionProposalComputerRegistry.getDefault() >- .getProposalCategories(); >- fAssistant = assistant; >- fAssistant.addCompletionListener(new ICompletionListener() { > >- public void assistSessionStarted(ContentAssistEvent event) { >+ public void assistSessionStarted(ContentAssistEvent event) { > >- if (event.processor != ContentAssistProcessor.this) { >- final IContentAssistant assistant = event.assistant; >- if (assistant instanceof IScriptContentAssistExtension) { >- final IScriptContentAssistExtension extension = (IScriptContentAssistExtension) assistant; >- if (!extension.provide(event.processor)) >- return; >- } else { >+ if (event.processor != ContentAssistProcessor.this) { >+ final IContentAssistant assistant = event.assistant; >+ if (assistant instanceof IScriptContentAssistExtension) { >+ final IScriptContentAssistExtension extension = (IScriptContentAssistExtension) assistant; >+ if (!extension.provide(event.processor)) > return; >- } >+ } else { >+ return; > } >+ } > >- fIterationGesture = getIterationGesture(); >- KeySequence binding = getIterationBinding(); >- >- // this may show the warning dialog if all categories are >- // disabled >- fCategoryIteration = getCategoryIteration(); >- for (CompletionProposalCategory cat : fCategories) { >- cat.sessionStarted(); >- } >+ fIterationGesture = getIterationGesture(); >+ KeySequence binding = getIterationBinding(); > >- fRepetition = 0; >- if (event.assistant instanceof IContentAssistantExtension2) { >- IContentAssistantExtension2 extension = (IContentAssistantExtension2) event.assistant; >- >- if (fCategoryIteration.size() == 1) { >- extension.setRepeatedInvocationMode(false); >- extension.setShowEmptyList(false); >- } else { >- extension.setRepeatedInvocationMode(true); >- extension.setStatusLineVisible(true); >- extension.setStatusMessage(createIterationMessage()); >- extension.setShowEmptyList(true); >- if (extension instanceof IContentAssistantExtension3) { >- IContentAssistantExtension3 ext3 = (IContentAssistantExtension3) extension; >- ((ContentAssistant) ext3) >- .setRepeatedInvocationTrigger(binding); >- } >- } >- >- } >+ // this may show the warning dialog if all categories are >+ // disabled >+ fCategoryIteration = getCategoryIteration(); >+ for (CompletionProposalCategory cat : fCategories) { >+ cat.sessionStarted(); > } > >- /* >- * @seeorg.eclipse.jface.text.contentassist.ICompletionListener# >- * assistSessionEnded >- * (org.eclipse.jface.text.contentassist.ContentAssistEvent) >- */ >- public void assistSessionEnded(ContentAssistEvent event) { >- >- if (event.processor != ContentAssistProcessor.this) { >- final IContentAssistant assistant = event.assistant; >- if (assistant instanceof IScriptContentAssistExtension) { >- final IScriptContentAssistExtension extension = (IScriptContentAssistExtension) assistant; >- if (!extension.provide(event.processor)) >- return; >- } else { >- return; >- } >- } >+ fRepetition = 0; >+ if (event.assistant instanceof IContentAssistantExtension2) { >+ IContentAssistantExtension2 extension = (IContentAssistantExtension2) event.assistant; > >- for (CompletionProposalCategory cat : fCategories) { >- cat.sessionEnded(); >- } >- >- fCategoryIteration = null; >- fRepetition = -1; >- fIterationGesture = null; >- if (event.assistant instanceof IContentAssistantExtension2) { >- IContentAssistantExtension2 extension = (IContentAssistantExtension2) event.assistant; >- extension.setShowEmptyList(false); >+ if (fCategoryIteration.size() == 1) { > extension.setRepeatedInvocationMode(false); >- extension.setStatusLineVisible(false); >+ extension.setShowEmptyList(false); >+ } else { >+ extension.setRepeatedInvocationMode(true); >+ extension.setStatusLineVisible(true); >+ extension.setStatusMessage(createIterationMessage()); >+ extension.setShowEmptyList(true); > if (extension instanceof IContentAssistantExtension3) { > IContentAssistantExtension3 ext3 = (IContentAssistantExtension3) extension; > ((ContentAssistant) ext3) >- .setRepeatedInvocationTrigger(KeySequence >- .getInstance()); >+ .setRepeatedInvocationTrigger(binding); > } > } >+ >+ } >+ } >+ >+ /* >+ * @seeorg.eclipse.jface.text.contentassist.ICompletionListener# >+ * assistSessionEnded >+ * (org.eclipse.jface.text.contentassist.ContentAssistEvent) >+ */ >+ public void assistSessionEnded(ContentAssistEvent event) { >+ >+ if (event.processor != ContentAssistProcessor.this) { >+ final IContentAssistant assistant = event.assistant; >+ if (assistant instanceof IScriptContentAssistExtension) { >+ final IScriptContentAssistExtension extension = (IScriptContentAssistExtension) assistant; >+ if (!extension.provide(event.processor)) >+ return; >+ } else { >+ return; >+ } >+ } >+ >+ for (CompletionProposalCategory cat : fCategories) { >+ cat.sessionEnded(); > } > >- public void selectionChanged(ICompletionProposal proposal, >- boolean smartToggle) { >+ fCategoryIteration = null; >+ fRepetition = -1; >+ fIterationGesture = null; >+ if (event.assistant instanceof IContentAssistantExtension2) { >+ IContentAssistantExtension2 extension = (IContentAssistantExtension2) event.assistant; >+ extension.setShowEmptyList(false); >+ extension.setRepeatedInvocationMode(false); >+ extension.setStatusLineVisible(false); >+ if (extension instanceof IContentAssistantExtension3) { >+ IContentAssistantExtension3 ext3 = (IContentAssistantExtension3) extension; >+ ((ContentAssistant) ext3) >+ .setRepeatedInvocationTrigger(KeySequence >+ .getInstance()); >+ } > } >+ } > >- }); >+ public void selectionChanged(ICompletionProposal proposal, >+ boolean smartToggle) { >+ } >+ >+ public void assistSessionRestarted(ContentAssistEvent event) { >+ fRepetition = 0; >+ } >+ >+ } >+ >+ public ContentAssistProcessor(ContentAssistant assistant, String partition) { >+ Assert.isNotNull(partition); >+ Assert.isNotNull(assistant); >+ >+ fPartition = partition; >+ fCategories = CompletionProposalComputerRegistry.getDefault() >+ .getProposalCategories(); >+ fAssistant = assistant; >+ fAssistant.addCompletionListener(new CompletionListener()); > } > > public final ICompletionProposal[] computeCompletionProposals(
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 275270
:
157506
|
161559