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 166818 Details for
Bug 310601
[FieldAssist] ContentAssistCommandAdapter enablement not toggled when field has focus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
the correct patch
patch310601.txt (text/plain), 2.54 KB, created by
Susan McCourt
on 2010-05-03 14:10:05 EDT
(
hide
)
Description:
the correct patch
Filename:
MIME Type:
Creator:
Susan McCourt
Created:
2010-05-03 14:10:05 EDT
Size:
2.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java,v >retrieving revision 1.15 >diff -u -r1.15 ContentAssistCommandAdapter.java >--- Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java 15 Apr 2010 16:50:32 -0000 1.15 >+++ Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java 3 May 2010 18:07:25 -0000 >@@ -13,7 +13,6 @@ > > import org.eclipse.core.commands.AbstractHandler; > import org.eclipse.core.commands.ExecutionEvent; >-import org.eclipse.core.commands.IHandler; > import org.eclipse.core.expressions.EvaluationResult; > import org.eclipse.core.expressions.Expression; > import org.eclipse.core.expressions.ExpressionInfo; >@@ -55,6 +54,17 @@ > */ > public class ContentAssistCommandAdapter extends ContentProposalAdapter { > >+ private class ContentAssistHandler extends AbstractHandler { >+ public Object execute(ExecutionEvent event) { >+ openProposalPopup(); >+ return null; >+ } >+ >+ void setEnabled(boolean enabled) { >+ this.setBaseEnabled(enabled); >+ } >+ } >+ > // ID used in the decoration registry. > private static final String CONTENT_ASSIST_DECORATION_ID = "org.eclipse.ui.fieldAssist.ContentAssistField"; //$NON-NLS-1$ > >@@ -76,13 +86,7 @@ > // a platform UI preference. > private static final int DEFAULT_AUTO_ACTIVATION_DELAY = 500; > >- private IHandler proposalHandler = new AbstractHandler() { >- public Object execute(ExecutionEvent event) { >- openProposalPopup(); >- return null; >- } >- >- }; >+ private ContentAssistHandler proposalHandler = new ContentAssistHandler(); > private ControlDecoration decoration; > > /** >@@ -255,6 +259,7 @@ > decoration.hide(); > } > } >+ proposalHandler.setEnabled(enabled); > } > > private void activateHandler(final Control control) { >@@ -267,8 +272,7 @@ > final IHandlerActivation handlerActivation = hs.activateHandler(commandId, > proposalHandler, new Expression() { > public EvaluationResult evaluate(IEvaluationContext context) { >- return context.getVariable(ISources.ACTIVE_FOCUS_CONTROL_NAME) == control >- && ContentAssistCommandAdapter.this.isEnabled() ? EvaluationResult.TRUE >+ return context.getVariable(ISources.ACTIVE_FOCUS_CONTROL_NAME) == control ? EvaluationResult.TRUE > : EvaluationResult.FALSE; > } >
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 310601
:
166814
| 166818