Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315146 - disable / grey out unavailable popup / context menu commands
Summary: disable / grey out unavailable popup / context menu commands
Status: RESOLVED WONTFIX
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Mathias Kinzler CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 16:36 EDT by Kay Huber CLA
Modified: 2010-09-03 07:40 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kay Huber CLA 2010-05-31 16:36:47 EDT
Referring to latest nightlies of both EGit (0.8.0.201005300830) and JGit (0.8.0.201005300828).

In Package Explorer, right clicking a git managed project, in the "Team" menu, offers me to "Add" the project to git. 
Also, "Commit" is enabled even without the project having any changes to commit.

It may be more helpful to users, to grey out unavailable or "useless" commands.
Comment 1 Mathias Kinzler CLA 2010-09-03 07:40:37 EDT
(In reply to comment #0)
> Referring to latest nightlies of both EGit (0.8.0.201005300830) and JGit
> (0.8.0.201005300828).
> 
> In Package Explorer, right clicking a git managed project, in the "Team" menu,
> offers me to "Add" the project to git. 
> Also, "Commit" is enabled even without the project having any changes to
> commit.
> 
> It may be more helpful to users, to grey out unavailable or "useless" commands.

First of all, sorry for the slow response...

1. "Add" works recursively by going down the resource hierarchy (of the project in your case) and "adds" any resources that are currently not under version control. In order to determine a enablement, we would have to do the same, which is too expensive an operation for enablement checking.

2. As for "Commit", the situation for calculating enablement may be not as bad, but we wouldn't want to disable it anyway, as "committing" on a clean workspace will ask the user if they want to amend their previous commit (for example, change the commit message, author, etc.). So in this case, it's working as it should.

So, for the moment, I don't see any issues here. Please do not hesitate to reopen this if you don't agree.