Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 489952
Collapse All | Expand All

(-)a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js (-1 / +2 lines)
Lines 472-478 define([ Link Here
472
    				name: 'ternContentAssist',  //$NON-NLS-1$
472
    				name: 'ternContentAssist',  //$NON-NLS-1$
473
    				id: "orion.edit.contentassist.javascript.tern",  //$NON-NLS-1$
473
    				id: "orion.edit.contentassist.javascript.tern",  //$NON-NLS-1$
474
    				charTriggers: "[.]",  //$NON-NLS-1$
474
    				charTriggers: "[.]",  //$NON-NLS-1$
475
    				excludedStyles: "(string.*)"  //$NON-NLS-1$
475
    				excludedStyles: "(string.*)",  //$NON-NLS-1$
476
    				autoApply: false
476
    		});
477
    		});
477
		
478
		
478
		provider.registerService("orion.edit.contentassist",  //$NON-NLS-1$
479
		provider.registerService("orion.edit.contentassist",  //$NON-NLS-1$
(-)a/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js (-2 / +2 lines)
Lines 389-395 define([ Link Here
389
							var id = serviceRef.getProperty("service.id").toString();  //$NON-NLS-0$
389
							var id = serviceRef.getProperty("service.id").toString();  //$NON-NLS-0$
390
							var charTriggers = serviceRef.getProperty("charTriggers"); //$NON-NLS-0$
390
							var charTriggers = serviceRef.getProperty("charTriggers"); //$NON-NLS-0$
391
							var excludedStyles = serviceRef.getProperty("excludedStyles");  //$NON-NLS-0$
391
							var excludedStyles = serviceRef.getProperty("excludedStyles");  //$NON-NLS-0$
392
392
							var autoApply = serviceRef.getProperty("autoApply");
393
							if (charTriggers) {
393
							if (charTriggers) {
394
								charTriggers = new RegExp(charTriggers);
394
								charTriggers = new RegExp(charTriggers);
395
							}
395
							}
Lines 398-404 define([ Link Here
398
								excludedStyles = new RegExp(excludedStyles);
398
								excludedStyles = new RegExp(excludedStyles);
399
							}
399
							}
400
400
401
							return {provider: service, id: id, charTriggers: charTriggers, excludedStyles: excludedStyles};
401
							return {provider: service, id: id, charTriggers: charTriggers, excludedStyles: excludedStyles, autoApply: autoApply};
402
						}
402
						}
403
						return null;
403
						return null;
404
					}).filter(function(providerInfo) {
404
					}).filter(function(providerInfo) {
(-)a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js (-3 / +7 lines)
Lines 1-6 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * @license
2
 * @license
3
 * Copyright (c) 2011, 2014 IBM Corporation and others.
3
 * Copyright (c) 2011, 2016 IBM Corporation and others.
4
 * All rights reserved. This program and the accompanying materials are made 
4
 * All rights reserved. This program and the accompanying materials are made 
5
 * available under the terms of the Eclipse Public License v1.0 
5
 * available under the terms of the Eclipse Public License v1.0 
6
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
6
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
Lines 279-285 define("orion/editor/contentAssist", [ //$NON-NLS-0$ Link Here
279
			var selectionStart = Math.min(sel.start, sel.end);			
279
			var selectionStart = Math.min(sel.start, sel.end);			
280
			this._initialCaretOffset = Math.min(offset, selectionStart);
280
			this._initialCaretOffset = Math.min(offset, selectionStart);
281
			this._computedProposals = null;
281
			this._computedProposals = null;
282
			
282
			delete this._autoApply;
283
			this._computeProposals(this._initialCaretOffset).then(function(proposals) {
283
			this._computeProposals(this._initialCaretOffset).then(function(proposals) {
284
				if (this.isActive()) {
284
				if (this.isActive()) {
285
					var flatProposalArray = this._flatten(proposals);
285
					var flatProposalArray = this._flatten(proposals);
Lines 287-293 define("orion/editor/contentAssist", [ //$NON-NLS-0$ Link Here
287
					if (flatProposalArray && Array.isArray(flatProposalArray) && (0 < flatProposalArray.length)) {
287
					if (flatProposalArray && Array.isArray(flatProposalArray) && (0 < flatProposalArray.length)) {
288
						this._computedProposals = proposals;
288
						this._computedProposals = proposals;
289
					}
289
					}
290
					this.dispatchEvent({type: "ProposalsComputed", data: {proposals: flatProposalArray}, autoApply: !this._autoTriggered}); //$NON-NLS-0$
290
					var autoApply = typeof this._autoApply === 'boolean' ? this._autoApply : !this._autoTriggerEnabled;
291
					this.dispatchEvent({type: "ProposalsComputed", data: {proposals: flatProposalArray}, autoApply: autoApply}); //$NON-NLS-0$
291
					if (this._computedProposals && this._filterText) {
292
					if (this._computedProposals && this._filterText) {
292
						// force filtering here because user entered text after
293
						// force filtering here because user entered text after
293
						// computeProposals() was called but before the plugins
294
						// computeProposals() was called but before the plugins
Lines 359-364 define("orion/editor/contentAssist", [ //$NON-NLS-0$ Link Here
359
				var func;
360
				var func;
360
				var promise;
361
				var promise;
361
				var params;
362
				var params;
363
				if(typeof providerInfo.autoApply === 'boolean') {
364
					_self._autoApply = providerInfo.autoApply;
365
				}
362
				if (computePrefixFunc) {
366
				if (computePrefixFunc) {
363
					ecProvider = _self.editorContextProvider;
367
					ecProvider = _self.editorContextProvider;
364
					editorContext = ecProvider.getEditorContext();
368
					editorContext = ecProvider.getEditorContext();

Return to bug 489952