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 475952
Collapse All | Expand All

(-)a/bundles/org.eclipse.orion.client.javascript/web/javascript/commands/renameCommand.js (-1 / +6 lines)
Lines 88-95 Link Here
88
					that.timeout = null;
88
					that.timeout = null;
89
				}, 5000);
89
				}, 5000);
90
				var files = [{type:'full', name:params.input, text:text}]; //$NON-NLS-1$
90
				var files = [{type:'full', name:params.input, text:text}]; //$NON-NLS-1$
91
				var offset = params.offset;
92
				if (params.annotation) {
93
					// this is used in the quickfix to get the right offset
94
					offset = params.annotation.start;
95
				}
91
				that.ternworker.postMessage(
96
				that.ternworker.postMessage(
92
					{request:'rename', args:{params:{offset: params.offset}, files: files, meta:{location: params.input}, newname:''}}, //$NON-NLS-1$
97
					{request:'rename', args:{params:{offset: offset}, files: files, meta:{location: params.input}, newname:''}}, //$NON-NLS-1$
93
					function(response) {
98
					function(response) {
94
						var changes = response.changes;
99
						var changes = response.changes;
95
						if(changes && changes.changes && changes.changes.length > 0) {
100
						if(changes && changes.changes && changes.changes.length > 0) {
(-)a/bundles/org.eclipse.orion.client.javascript/web/javascript/nls/root/messages.js (-1 / +2 lines)
Lines 176-180 Link Here
176
	'no-self-compare' : 'Disallow self compare:',
176
	'no-self-compare' : 'Disallow self compare:',
177
	'no-irregular-whitespace' : 'No irregular whitespace:',
177
	'no-irregular-whitespace' : 'No irregular whitespace:',
178
	'no-self-assign' : 'Disallow self assignment:',
178
	'no-self-assign' : 'Disallow self assignment:',
179
	'type-checked-consistent-return' : 'Report return inconsistent types'
179
	'type-checked-consistent-return' : 'Report return inconsistent types',
180
	'noShadowFixName' : 'Rename in scope'
180
});
181
});
(-)a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js (-1 / +18 lines)
Lines 788-794 Link Here
788
                        {source: "annotation:id", match: "^(?:no-new-array)$"} //$NON-NLS-1$ //$NON-NLS-2$
788
                        {source: "annotation:id", match: "^(?:no-new-array)$"} //$NON-NLS-1$ //$NON-NLS-2$
789
                    ]
789
                    ]
790
    			}
790
    			}
791
    	);
791
    		);
792
793
		provider.registerServiceProvider("orion.edit.command",  //$NON-NLS-1$
794
			new RenameCommand.RenameCommand(astManager, ternWorker, scriptresolver, CUProvider),
795
			{
796
				name: javascriptMessages["noShadowFixName"],
797
				scopeId: "orion.edit.quickfix", //$NON-NLS-1$
798
				id : "no.shadow.fix",  //$NON-NLS-1$
799
				contentType: ['application/javascript', 'text/html'],  //$NON-NLS-1$ //$NON-NLS-2$
800
				validationProperties: [
801
					{
802
						source: "annotation:id", //$NON-NLS-1$
803
						match: "^(?:no-shadow)$" //$NON-NLS-1$
804
					} 
805
				]
806
			}
807
		);
808
	
792
809
793
    	/**
810
    	/**
794
    	 * legacy pref id
811
    	 * legacy pref id

Return to bug 475952