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 254485 Details for
Bug 465610
[tern] Provide progress when activating Tern content assist and improve worker load time
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]
Work in progress
Bug 465610 - [tern] Provide progress when activating Tern content assist.patch (text/plain), 3.55 KB, created by
Curtis Windatt
on 2015-06-16 17:44:47 EDT
(
hide
)
Description:
Work in progress
Filename:
MIME Type:
Creator:
Curtis Windatt
Created:
2015-06-16 17:44:47 EDT
Size:
3.55 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js >index 1875855..d2a1d74 100644 >--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js >+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js >@@ -102,8 +102,17 @@ > dfault : "proposal-default" //$NON-NLS-0$ > }; > >- function ContentAssist(textView) { >+ /** >+ * @name ContentAssist >+ * @description Creates a new content assist manager for the given text ciew >+ * @param textView The text view to provide content assist for >+ * @param serviceRegistry Optional, used to look up page message service for status >+ */ >+ function ContentAssist(textView, serviceRegistry) { > this.textView = textView; >+ if (serviceRegistry){ >+ this.pageMessage = serviceRegistry.getService("orion.page.message"); //$NON-NLS-1$ >+ } > this.state = State.INACTIVE; > this.clearProviders(); > var self = this; >@@ -368,8 +377,30 @@ > } > return Deferred.when(proposals); > }); >+ > // TODO should we allow error to propagate instead of handling here? >- return Deferred.all(promises, this.handleError); >+ var allPromises = Deferred.all(promises, this.handleError); >+ >+ if (this.pageMessage){ >+ allPromises = Deferred.when(allPromises, function(proposals){ >+ var foundProposal = false; >+ if (proposals && proposals.length > 0){ >+ for (var i=0; i<proposals.length; i++) { >+ if (proposals[i].length > 0){ >+ foundProposal = true; >+ break; >+ } >+ } >+ } >+ if (!foundProposal){ >+ self.pageMessage.setErrorMessage(messages["noProposals"]); >+ } >+ return proposals; >+ }); >+ self.pageMessage.showWhile(allPromises, messages["computingProposals"]); >+ } >+ >+ return allPromises; > }, > > filterProposals: function(force) { >diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js >index a95620e..23bc9ba 100644 >--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js >+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js >@@ -134,6 +134,8 @@ > "linkedModeExited": "Linked Mode exited", //$NON-NLS-1$ //$NON-NLS-0$ > "syntaxError": "Syntax Error", //$NON-NLS-1$ //$NON-NLS-0$ > "contentAssist": "Content Assist", //$NON-NLS-1$ //$NON-NLS-0$ >+ "noProposals": "No proposals found", >+ "computingProposals": "Computing content assist proposals...", > "lineColumn": "Line ${0} : Column ${1}", //$NON-NLS-1$ //$NON-NLS-0$ > "multiSelections": "${0} selection regions", //$NON-NLS-1$ //$NON-NLS-0$ > >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js b/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js >index d7b09bc..c24f9c6 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js >@@ -416,7 +416,7 @@ > > var contentAssistFactory = readonly ? null : { > createContentAssistMode: function(editor) { >- var contentAssist = new mContentAssist.ContentAssist(editor.getTextView()); >+ var contentAssist = new mContentAssist.ContentAssist(editor.getTextView(), serviceRegistry); > > contentAssist.addEventListener("Activating", setContentAssistProviders.bind(null, editor, contentAssist)); //$NON-NLS-0$ > var widget = new mContentAssist.ContentAssistWidget(contentAssist, "contentassist"); //$NON-NLS-0$
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 465610
:
254485
|
254524