Community
Participate
Working Groups
Created attachment 283827 [details] Contains build_destination, git_branch, project_loc stacktrace If I am using eclipse variable like project_loc , git_branch in my build destination, they are not getting resolved when I switch to tabs like Console or Problems. For more info see the attached image. In case of project_loc, see the image project_loc-stacktrace.log. In case of git_branch, see the image git_branch-stacktrace.log. In my opinion, we should resolve above eclipse variable even if a user is switching tab to console or problem or any other bug. I did some digging, you should be looking into the below code: https://git.eclipse.org/r/plugins/gitiles/egit/egit/+/b2ef308d8e60aee4876873ef8797495958b719da/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/variables/GitVariableResolver.java#130
Not sure what you are trying to accomplish. I get the impression that you are requesting something that might not be possible within the design of Eclipse, or at least not the way you expect it. The variables you are using are resolved using dynamic value resolvers [1,2]. Some of these resolvers are provided by Eclipse Platform, others are provided by other projects, such as the egit you are referring too. I can imagine that these value resolvers cannot resolve variables when for instance the Console is selected. There is no relation between a Console and a project. For a resolver it would be very hard to guess which in which context to resolve, would it be the last selected Editor, the last selected resource in a Project/Package Explorer, etc. So what are you trying to do? What is the use-case that is not working due to the variables that are not resolved? [1] https://help.eclipse.org/2020-06/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fcore%2Fvariables%2FIDynamicVariableResolver.html [2] IDynamicVariableResolver https://help.eclipse.org/2020-06/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fcore%2Fvariables%2FIDynamicVariableResolver.html
In my opinion your resolver should resolve the variable (like $git-branch) at the start of an action (like build) and then for that action until the action completes it should change anymore. Now when i start a build in projext X using a variable and i change to another project Y (during the build), build X is corrupted.
in my previous comment i meant: "...it should NOT change anymore..."