Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350834 - Got a command error logged using EGit
Summary: Got a command error logged using EGit
Status: VERIFIED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 331240
  Show dependency tree
 
Reported: 2011-06-30 10:00 EDT by Olivier Thomann CLA
Modified: 2011-07-07 07:32 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2011-06-30 10:00:07 EDT
I got an error in the .log file with these details:

Calling "Command(org.eclipse.egit.ui.RepositoriesViewOpen,Open,
		,
		Category(org.eclipse.egit.ui.commandCategory,Git,null,true),
		org.eclipse.ui.internal.MakeHandlersGo@4eb98fe1,
		,,true)" command directly

eclipse.buildId=I20110620-1631
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_CA
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -console

I got it when opening a file from the git repository view.
Comment 1 Matthias Sohn CLA 2011-06-30 11:11:55 EDT
I tried with EGit 1.0.0.201106090707-r and opened a file by selecting it under working directory and clicking "Open in Text Editor" but this didn't log an error.

Which EGit version did you use ?

Did you see any error message ? What you listed doesn't look like an error though it's strange that it ends up in the log ...
Comment 2 Olivier Thomann CLA 2011-06-30 12:05:46 EDT
This is the version of EGit I am using:
org.eclipse.egit (1.0.0.201106090707-r) "Git Team Provider"
org.eclipse.egit.core (1.0.0.201106090707-r) "Git Team Provider Core"
org.eclipse.egit.doc (1.0.0.201106090707-r) "Git Team Provider Documentation" org.eclipse.egit.ui (1.0.0.201106090707-r) "Git Team Provider UI"
Comment 3 Olivier Thomann CLA 2011-06-30 12:07:45 EDT
When I do "Open in Text Editor", it works (no error). When I double-click on the file, it fails.
Comment 4 Matthias Sohn CLA 2011-07-01 03:16:09 EDT
Works for me also when double clicking.
What's your Eclipse platform version and Eclipse package ?
From which perspective do you try this ?
When it fails do you see an error in the log which says more than what you posted already, maybe a stack trace ...
Comment 5 Remy Suen CLA 2011-07-06 08:19:30 EDT
The problem is in RepositoriesView's IOpenListener implementation on line 244.

In there, we directly execute a command instead of going through the IHandlerService. See bug 348584 for details of a similarly offending block of code in PDE.
Comment 6 Remy Suen CLA 2011-07-06 08:36:34 EDT
A change set has been attached to Gerrit for review.
http://egit.eclipse.org/r/#change,3833
Comment 7 Matthias Sohn CLA 2011-07-06 19:09:02 EDT
merged as a105a3d157fb164e9b42ae261f630c7849d55d90
Comment 8 Remy Suen CLA 2011-07-07 07:32:06 EDT
Verified with EGit 1.1.0.201107070512 on Windows XP.