Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » EGit variables(Egit variables are not set in some contexts where it seems like they should be)
EGit variables [message #1269255] Tue, 11 March 2014 11:47 Go to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
I make use of several EGit variables, particularly git_dir, git_branch and git_work_tree. I notice that these are not set in two contexts where it seems like they should be, or at least could be:

1) When the current selection is a file or directory in the one of Git Repository view entries

2) When the current selection is a Working Set, all of whose elements are projects that are part of the same Git repo.

Is this by design or is it an oversight? If by design, what's the rationale?

Re: EGit variables [message #1270952 is a reply to message #1269255] Thu, 13 March 2014 19:06 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 319
Registered: July 2009
Senior Member
R Shapiro skrev 2014-03-11 16.47:
> I make use of several EGit variables, particularly git_dir, git_branch and git_work_tree. I notice that these are not set in two contexts where it seems like they should
> be, or at least could be:
>
> 1) When the current selection is a file or directory in the one of Git Repository view entries
>
> 2) When the current selection is a Working Set, all of whose elements are projects that are part of the same Git repo.
>
> Is this by design or is it an oversight? If by design, what's the rationale?

Oversight.

-- robin
Re: EGit variables [message #1271574 is a reply to message #1270952] Sat, 15 March 2014 10:40 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
I can submit an enhancement request for setting the variables in these other selection contexts if the Egit team has any interest in doing this. If there any such interest?
Re: EGit variables [message #1271826 is a reply to message #1271574] Sun, 16 March 2014 05:25 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 319
Registered: July 2009
Senior Member
R Shapiro skrev 2014-03-15 15.40:
> I can submit an enhancement request for setting the variables in these other selection contexts if the Egit team has any interest in doing this. If there any such interest?

It seems reasonable that we set these variables, so yes.

-- robin
Re: EGit variables [message #1271940 is a reply to message #1271826] Sun, 16 March 2014 13:06 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
Enhancement submitted: [url=https://bugs.eclipse.org/bugs/show_bug.cgi?id=430480]
Re: EGit variables [message #1271997 is a reply to message #1271940] Sun, 16 March 2014 17:01 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 319
Registered: July 2009
Senior Member
R Shapiro skrev 2014-03-16 18.06:
> Enhancement submitted: [url=https://bugs.eclipse.org/bugs/show_bug.cgi?id=430480]

I misread your post. We don't need enhancement requests. We need enhancements. There is no
shortage of ideas..

-- robin
Re: EGit variables [message #1273705 is a reply to message #1271997] Thu, 20 March 2014 08:05 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
Robin Rosenberg wrote on Sun, 16 March 2014 17:01
R Shapiro skrev 2014-03-16 18.06:
> Enhancement submitted: https://bugs.eclipse.org/bugs/show_bug.cgi?id=430480]

I misread your post. We don't need enhancement requests. We need enhancements. There is no
shortage of ideas..

-- robin


If someone who already knows the code-base wants to give me approximate pointers in EGit I can probably figure out what changes would be required.

Until I retire from my regular job I won't ever have the time to dig around trying to find the relevant places on my own in a code-base this large, particularly given the quirkiness of the Eclipse plugin APIs.

I imagine most potential volunteers are in exactly the same position. Make it viable for us to help you and we will.
Re: EGit variables [message #1274438 is a reply to message #1273705] Fri, 21 March 2014 09:18 Go to previous message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 319
Registered: July 2009
Senior Member
R Shapiro skrev 2014-03-20 13.05:

> If someone who already knows the code-base wants to give me approximate pointers in EGit I can probably figure out what changes would be required.
> Until I retire from my regular job I won't ever have the time to dig around trying to find the relevant places on my own in a code-base this large, particularly given the
> quirkiness of the Eclipse plugin APIs.
>
> I imagine most potential volunteers are in exactly the same position. Make it viable for us to help you and we will.

You want to look at GitVariableResolver, but then that's the easy part. You need to take care of the selection propertly. Not sure
how to do that, but I'd start by looking at the RepositoriesView and figure out how to get at it. You can find the view instance
using somthing like (from ShowRepositoriesViewActionHandler)

RepositoriesView view;
view = (RepositoriesView) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().showView(
RepositoriesView.VIEW_ID);



-- robin
Previous Topic:Opening editor failed error in EGIT 3.3
Next Topic:Project disappeared from workspace after restart
Goto Forum:
  


Current Time: Thu Aug 21 14:22:33 EDT 2014

Powered by FUDForum. Page generated in 0.07226 seconds