Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Connecting Eclipse to Github (http://www.chiefdelphi.com/forums/showthread.php?t=153303)

stiny861 09-01-2017 14:24

Connecting Eclipse to Github
 
Hello there.

This is my first year as the primary programming mentor for our team. I am trying to figure out a way to get our code linked up with Github through eclipse so all team members can work on the codebase. I was able to attach a standard GIT repo in eclipse with a previous years robot code, but that code is not deployable to the robot. I'm sure I am missing something somewhere. I can successfully create a new WPILIB project and properly build and deploy the code to the roborio, but how to link the 2 processes together, is escaping me. Any assistance would be much appreciated.

Thank you in advance.

Joe Ross 09-01-2017 15:08

Re: Connecting Eclipse to Github
 
What are the errors with the old project? Each year, there are a few breaking changes to wpilib and you may have run into one of them. They are documented on screensteps.

2017: http://wpilib.screenstepslive.com/s/...8-new-for-2017
2016: http://wpilib.screenstepslive.com/s/...e-2015-to-2016
2015: http://wpilib.screenstepslive.com/s/...e-2014-to-2015

stiny861 09-01-2017 15:36

Re: Connecting Eclipse to Github
 
I am not really getting errors, what the issue is, when I imported the old code as a GIT project, I do not have the options under Run As to do a WPILIB C++ Deploy to flash the code to the robot.

euhlmann 11-01-2017 09:18

Re: Connecting Eclipse to Github
 
Manually edit .project and under <natures> add this:

Code:

<nature>edu.wpi.first.wpilib.plugins.core.nature.FRCProjectNature</nature>
That lets the WPILib plugin know your project is a robot project so it can add the menu items.

Example

Edit: I realized that I assumed you have the WPILib Eclipse plugin installed. If not, go install the plugin

stiny861 11-01-2017 09:50

Re: Connecting Eclipse to Github
 
I was able to figure it out. Turns out I was going about it backwards. I was trying to directly import a Git project, which in this case was last years code, and then somehow convert it to a WPIlib project. You actually need to do it the other way around. Create the WPIlib project, then under the Team section of the project, create a repository and then link that repo to github. Works like a dream now. I can give more precise instructions if anyone is interested.

euhlmann 11-01-2017 10:04

Re: Connecting Eclipse to Github
 
Quote:

Originally Posted by stiny861 (Post 1629170)
I was able to figure it out. Turns out I was going about it backwards. I was trying to directly import a Git project, which in this case was last years code, and then somehow convert it to a WPIlib project. You actually need to do it the other way around. Create the WPIlib project, then under the Team section of the project, create a repository and then link that repo to github. Works like a dream now. I can give more precise instructions if anyone is interested.

We've never needed to jump through hoops like that to get a project imported. I wonder why it needs to be like that for you.

stiny861 11-01-2017 10:10

Re: Connecting Eclipse to Github
 
I have a feeling it was because of the nature of eclipse. When you import a project directly from a Git repo, it is only going to pull what was in that repo. I did not have the ability to do a reindex or anything like that to even add in the includes. I think it is intended for fully self-contained codesets that do not include any additional components on your computer, which in this case was the WPIlib 2017 code. I had to simply reverse the process and start as a wpilib codeset, then add the repo onto it to update the needed files. In this case, we don't need to include the includes as it is a needed prereq to even work with the code in the first place.

bobbysq 11-01-2017 10:10

Re: Connecting Eclipse to Github
 
Quote:

Originally Posted by euhlmann (Post 1629180)
We've never needed to jump through hoops like that to get a project imported. I wonder why it needs to be like that for you.

I've also always had to make a new project and then import it. Maybe it's because we .gitignore most IDE files?

euhlmann 11-01-2017 11:25

Re: Connecting Eclipse to Github
 
Quote:

Originally Posted by bobbysq (Post 1629183)
I've also always had to make a new project and then import it. Maybe it's because we .gitignore most IDE files?

That's a good point. Don't gitignore .project or .classpath or .cproject


All times are GMT -5. The time now is 13:31.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi