Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357890

Summary: Incorrect prototype usage
Product: [ECD] Orion Reporter: Simon Kaegi <simon_kaegi>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: libingw
Version: 0.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Simon Kaegi CLA 2011-09-15 17:56:13 EDT
While looking at a problem with Libing we noticed a number of coding errors in how prototype's are being used.

The coding pattern below will actually alter the parent prototype instead of creating a copy.

Instead of assigning from the prototype one should create a new instance.

In org.eclipse.orion.client.core/web/orion:
editorCommands.js
169: KB.prototype = mKeyBinding.KeyBinding.prototype; 

explorer-table.js (3 matches)
26: Model.prototype = mExplorer.ExplorerModel.prototype;  
60: FileRenderer.prototype = mExplorer.SelectionRenderer.prototype;  
156: FileExplorer.prototype = mExplorer.Explorer.prototype; 

In org.eclipse.orion.client.git/web/orion/git:
git-clones-explorer.js (3 matches)
34: GitClonesExplorer.prototype = mExplorer.Explorer.prototype; 
105: GitClonesModel.prototype = mExplorer.ExplorerModel.prototype;  
194: GitClonesRenderer.prototype = mExplorer.SelectionRenderer.prototype; 

git-commit-navigator.js
117: GitCommitRenderer.prototype = mExplorer.SelectionRenderer.prototype; 


In org.eclipse.orion.client.users.ui/web/orion/profile
UsersList.js (2 matches)
29: UsersList.prototype = mExplorer.Explorer.prototype; 
66: UsersRenderer.prototype = mExplorer.SelectionRenderer.prototype;
Comment 1 Simon Kaegi CLA 2011-09-16 12:12:20 EDT
Thanks Gosia. I made one further tweak on how we were creating the keybinding.

*** This bug has been marked as a duplicate of bug 357626 ***