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

Bug 382493

Summary: Remove code duplicates in String Externalizer.
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: libingw
Version: 0.5   
Target Milestone: 2.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 382492    
Bug Blocks:    

Description Malgorzata Janczarska CLA 2012-06-13 09:14:40 EDT
When bug 382492 is ready String Externalizer should be moved to the new abstract explorer instead of implementing it's own that duplicates code in many places.
Comment 1 Malgorzata Janczarska CLA 2012-10-10 06:19:48 EDT
Blocking bug was moved to 2.0.
Comment 2 libing wang CLA 2013-01-31 16:49:08 EST
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e2a5666af7cfb3f6460f40f55661f97076e38b5a.

Now you only need to implement the searchModel. You get the renderer and explorer by free.
Please see searchModel.js and strExternalizerModel.js for API docs. Look for "requied function".


Gosia
Comment 3 libing wang CLA 2013-01-31 16:55:52 EST
Gosia:
I removed all the search.html,css,js and searchExplorer, searchResult from the externalizer folder. The names were quite confusing when I used CTRL+F every time.
Sometimes when I type searchExploer or searchResult it accidentally brought me to your folder.

So now under the same folder, we have:
strExternalizer.html, strExternalizer.css, and strExternalizer.js. All these files are just copies from the previous one.

strExternalizerModel.js: This is the model class to feed the generic replace widget.
strExternalizerResults.js: Pretty much the same as searchResults.js before but now you are constructing the generic replace widget by passing your model(strExternalizerModel).
Comment 4 libing wang CLA 2013-01-31 16:58:59 EST
One more thing, I also modified nonnlsPlugin.html file to use the new strExternalizer.html