| Summary: | Unknown file extensions result in link to Git Log in Navigator | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Ken Walker <ken_walker> |
| Component: | Client | Assignee: | Malgorzata Janczarska <malgorzata.tomczyk> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | susan, Szymon.Brandys |
| Version: | 0.4 | ||
| Target Milestone: | 0.5 RC1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Ken Walker
Tried the M2 build on orionhub and it seems ok, file opens in editor. There are open with commands for those files for "Git Log" and "Git Remote." I don't see any "open with" commands in the git plugin. But suspiciously I see two "related links" commands for log and remote that have no other properties than the id. So my theory is that those contributions are triggering a bug in the extension/open with processing??? Loading various tags found the commit for NLSing plugins http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ac0521fcf6b9c44b690ec7e48096d2c774a08356 so looking at those changes my best guess is that the info being accessed in the loop is not right. around extensionCommands line 353 is
require(['i18n!'+info.nls], function(commandMessages){
If this is an asynch call, then I think the solution is to hitch the info to the function and then refer to this.editor, etc. rather than info itself. Not sure.
Susan was right, this was the problem with the changed reference in the loop. I also resulted in putting all plugged in commands in "Show In" menu. I passed the reference in dojo.hitch function and everything went back to normal. (In reply to comment #5) > Susan was right, this was the problem with the changed reference in the loop. I > also resulted in putting all plugged in commands in "Show In" menu. > I passed the reference in dojo.hitch function and everything went back to > normal. There should be some famous name for the "referencing variable in a loop asynch gives you the last one" pattern. (I've looked before and never found one, though there are tons of stackoverflow, etc. references to the symptom). This is the most common bug I encounter in my own code. |