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 262349 Details for
Bug 489952
Content assist automatically fills in the "wrong thing" (assumes a single method and pastes it in)
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]
proposed fix
autoApply.patch (text/plain), 4.27 KB, created by
Michael Rennie
on 2016-06-09 15:55:34 EDT
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2016-06-09 15:55:34 EDT
Size:
4.27 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js >index 9d596da..e802c5d 100644 >--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js >+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js >@@ -472,7 +472,8 @@ define([ > name: 'ternContentAssist', //$NON-NLS-1$ > id: "orion.edit.contentassist.javascript.tern", //$NON-NLS-1$ > charTriggers: "[.]", //$NON-NLS-1$ >- excludedStyles: "(string.*)" //$NON-NLS-1$ >+ excludedStyles: "(string.*)", //$NON-NLS-1$ >+ autoApply: false > }); > > provider.registerService("orion.edit.contentassist", //$NON-NLS-1$ >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 87388f1..d911217 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js >@@ -389,7 +389,7 @@ define([ > var id = serviceRef.getProperty("service.id").toString(); //$NON-NLS-0$ > var charTriggers = serviceRef.getProperty("charTriggers"); //$NON-NLS-0$ > var excludedStyles = serviceRef.getProperty("excludedStyles"); //$NON-NLS-0$ >- >+ var autoApply = serviceRef.getProperty("autoApply"); > if (charTriggers) { > charTriggers = new RegExp(charTriggers); > } >@@ -398,7 +398,7 @@ define([ > excludedStyles = new RegExp(excludedStyles); > } > >- return {provider: service, id: id, charTriggers: charTriggers, excludedStyles: excludedStyles}; >+ return {provider: service, id: id, charTriggers: charTriggers, excludedStyles: excludedStyles, autoApply: autoApply}; > } > return null; > }).filter(function(providerInfo) { >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 fb67b11..ffa14c0 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 >@@ -1,6 +1,6 @@ > /******************************************************************************* > * @license >- * Copyright (c) 2011, 2014 IBM Corporation and others. >+ * Copyright (c) 2011, 2016 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials are made > * available under the terms of the Eclipse Public License v1.0 > * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution >@@ -279,7 +279,7 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$ > var selectionStart = Math.min(sel.start, sel.end); > this._initialCaretOffset = Math.min(offset, selectionStart); > this._computedProposals = null; >- >+ delete this._autoApply; > this._computeProposals(this._initialCaretOffset).then(function(proposals) { > if (this.isActive()) { > var flatProposalArray = this._flatten(proposals); >@@ -287,7 +287,8 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$ > if (flatProposalArray && Array.isArray(flatProposalArray) && (0 < flatProposalArray.length)) { > this._computedProposals = proposals; > } >- this.dispatchEvent({type: "ProposalsComputed", data: {proposals: flatProposalArray}, autoApply: !this._autoTriggered}); //$NON-NLS-0$ >+ var autoApply = typeof this._autoApply === 'boolean' ? this._autoApply : !this._autoTriggerEnabled; >+ this.dispatchEvent({type: "ProposalsComputed", data: {proposals: flatProposalArray}, autoApply: autoApply}); //$NON-NLS-0$ > if (this._computedProposals && this._filterText) { > // force filtering here because user entered text after > // computeProposals() was called but before the plugins >@@ -359,6 +360,9 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$ > var func; > var promise; > var params; >+ if(typeof providerInfo.autoApply === 'boolean') { >+ _self._autoApply = providerInfo.autoApply; >+ } > if (computePrefixFunc) { > ecProvider = _self.editorContextProvider; > editorContext = ecProvider.getEditorContext();
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 489952
:
260484
| 262349