Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » What is an equivalent of "Build"(project) in "Git repositories " perspective ?(git perspective )
What is an equivalent of "Build"(project) in "Git repositories " perspective ? [message #1816673] Mon, 04 November 2019 16:24 Go to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
I have a "git project" in "Git repositories" perspective and have no clue what to do next to edit / compile etc. it.
It woudl help me, save me some googleing time if somebody points me to right tutorial.
I do not need HOW to install git, install Ellipse git plug-in etc. I have done all of that.
Every time I ask Mg Google I get basic HOW to install git using CLI and how to do "commit",
I DO NOT need that.

I need start instruction on how to use Eclipse EGit menus - especially how to "run cloned project make " .

Thanks
Re: What is an equivalent of "Build"(project) in "Git repositories " perspectiv [message #1816675 is a reply to message #1816673] Mon, 04 November 2019 18:28 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
Git stores files. That's all it does. It doesn't know anything about what is in those files. There are 8 zillion programming languages in the world and just about as many build tools. If you have questions about a particular programming language or build tool, you should ask those questions in appropriate forums.
Re: What is an equivalent of "Build"(project) in "Git repositories " perspectiv [message #1816676 is a reply to message #1816675] Mon, 04 November 2019 19:08 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Versioning source code in git using git command line or EGit is orthogonal to running a build.
As David explained git is versioning text files and doesn't care about which language syntax is used.

In Eclipse typically the build is triggered automatically whenever you save a change. Except if you switched this off.
I never use the git perspective but the perspective tailored for the programming language I use.
For me that's most often the Java or Java EE perspective. In addition I open the EGit views I need in the same perspective.
Re: What is an equivalent of "Build"(project) in "Git repositories " perspectiv [message #1816680 is a reply to message #1816676] Mon, 04 November 2019 20:33 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
On the git repository you cloned, choose "Import projects..." from the context menu. Import the projects, if there are any. Then switch to the normal development perspective of your programming language and build the projects. You can also open the git repositories view in that perspective (Window->Show View->Other...; under "Git").
Re: What is an equivalent of "Build"(project) in "Git repositories " perspectiv [message #1816682 is a reply to message #1816680] Mon, 04 November 2019 21:31 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
Thomas, that is exactly what I need - step by step process AFTER I open "Git repository " perspective. I am still looking for some resource / tutorial on how to do that.
However your post is very helpful. Thanks

For time being I like to stick with using "Git perspective", perhaps I can backtrack later to implement similar in just CLI.
Also at this time I do not need any knowledge about "committing" MY CODE to git hub.
I need to learn how to build cloned code first.

I thought that "Git repositories" repository IS the project.
Regardless,
I am enclosing copies what I have done so far and if possible can you comment on that and point out my errors?
1. In "Git repositories " folder I select NanoVNA(develop)...
I presume that s my local repository cloned from original git source.
Is my assumption correct ?

2. Then I select from pull-down menu "Import projects..."

3. In "Import project...." form I click Directory.. to select "Import source".

Now I am asked to select "project folder " , but I am looking at the original source source code identical to git hub tree.

I am stuck here.




Re: What is an equivalent of "Build"(project) in "Git repositories " perspectiv [message #1816683 is a reply to message #1816682] Mon, 04 November 2019 22:20 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Looks like you already have the NanoVNA project in your Eclipse. In the screenshot it says "Folder already imported".

NanoVNA is C and Python, and presuming we're talking about https://github.com/ttrftech/NanoVNA , the repository has a submodule. I'll assume you're using a C/C++ Eclipse, and that you have cloned the NanoVNA repository recursively, so that this submodule (in folder ChibiOS) is properly set up.

Things will really be simpler if you just forget about that Git perspective for now. Just switch back to the normal C/C++ perspective. You should have on the left side a view (titled "Project Explorer") showing your projects. One of these should be NanoVNA. Most probably it also shows a decoration like "[NanoVNA develop]".

The github repository does not include any setup for Eclipse so it may be necessary to configure that project manually as a C/C++ project. I cannot help you with that; I've never done C development in Eclipse. Setting up a C/C++ project will probably involve defining or selecting a compiler toolchain. You'll probably have to choose or set up your cross-compilation toolchain. Probably there's an item at the bottom of the context menu on the NanoVNA project folder that says "Configure->C/C++ project" or some such. Once that project is set up as a C/C++ project in Eclipse, it should be built automatically.

If you want to see the git repository, too, in the C/C++ perspective, just open the Git Repositories View as explained above.

When you make changes to files, the changed files should be shown in the Project Explorer prefixed with a "> ". Choose "Commit..." from the context menu and the Git "Staging View" will open, where you then can compose your commit.

But it seems to me you need someone who can help you with the details of configuring and building a C/C++ project in Eclipse. You already got as far as cloning and having the Eclipse project imported.

The git repository is not the Eclipse project. In your case it may seem so, since you will, in Eclipse, treat the whole directory tree as one project. But if you look for instance at the EGit repository itself (mirror at https://github.com/eclipse/egit ), you can see that there are many Eclipse projects: all those org.eclipse.egit... directories are Eclipse projects. Each of them has an Eclipse .project file, and even a sub-directory .settings storing Eclipse-specific configurations.

NanoVNA has neither, so you have to configure the Eclipse setup yourself. (NanoVNA does have .vscode sub-directory; that contains setup particular to Visual Studio. But that doesn't help you for Eclipse.)

As far as EGit is concerned, there's really not much more we could help you with. The people in the C/C++ Eclipse (CDT) forum probably can help you better with problems about how to build NanoVNA.
Re: What is an equivalent of "Build"(project) in "Git repositories " perspectiv [message #1816726 is a reply to message #1816683] Tue, 05 November 2019 16:44 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
Thomas,
quite by accident I found that when I use "Project explorere" tab/ perspective I can eventually add new C files to my local repository.
Thru "staging" and then "push" and commit .
I had to pay attention to "commit" it defaulted to original git repository !
Close call!
Also "synchronize" perspective shows to be helpful.
All is left is to "Build" - to use C/C++ terminology.
Of course I have to figurine out how to use cloned "makefile" instead of regular "make" generated by C?C++ "Build" menu.
Thanks for helping me, I realize this mess is a combination of C and EGit so it really does not fit to neither forum.

[Updated on: Wed, 06 November 2019 14:34]

Report message to a moderator

Wanted Documentation for EGit "import project from file system or archive" form/ dialog w [message #1816778 is a reply to message #1816726] Wed, 06 November 2019 18:07 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
I like to continue this thread.
If there are objections I can start a new one.

It looks as there is a very simple way to import git (project) into Eclipse for editing / debugging etc.

Selecting local repository and using "Import project..."
pulls "import project from file system or archive" form/ dialog.

I am looking for unofficial or official version of EGit ( this is Egit "feature" ) documentation / sample / tutorial explaining form " import project from file system or archive" entries.


The cloned git project does not include common "directory " and the form instruction to "add ANY directory " just does not work.

Should I just ADD base / common folder to cloned project in local repository?

PS
Until I figure out how to include clipboard in the post I have not much choice but to include .pdf files.
Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816780 is a reply to message #1816778] Wed, 06 November 2019 19:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Normally one commits things like the .project/.cproject files to the clone, as we do for the C Project that we use to build native artifacts for Oomph:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.extractor

When you do that, importing from the clone is easy because the project structure are already spelled out.

So you really need to understand how CDT expects projects to be structured and adjust to that structure (and commit the files for that structure to Git for future reuse). I know from experience, it's awfully complicated to set up a C/C++ project. You'll find no help on this forum for that. The CDT forum is the place to ask, but I see you've already been doing that.

In the end, you just can't expect to take some arbitrary file structure that you've committed to a Git clone to be magically imported into the appropriate structure for CDT. And if you are hoping for a bunch of documentation for how to use EGit to magically create C project from an arbitrary folder structure, you're being too hopeful.

Save your images as *.png and attach those instead.




Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816782 is a reply to message #1816780] Wed, 06 November 2019 19:41 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
Ed,
if what your are saying that the "stuff" I cloned from github , and I think I will not call it "project" - in Eclipse terminology, just stuff , needs to be reconfigured so CDT will make a "normal " Eclipse project out of it, it then make sense.
I am not sure I can figure CDT file structure myself, so it makes more sense to ditch Eclipse, in this case , and just continue using CLI.
I actually run CLI make on the original "stuff" and it completed with one easy to fix error.
Little disappointing with EGit usefulness, mainly lack of instructions / documentation.




Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816795 is a reply to message #1816782] Thu, 07 November 2019 06:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Well, the general problem is of course that you're having to learn many things at once. You have to learn Eclipse, you have to learn and understand the "workspace" model for "projects, you have to learn how CDT integrates with Eclipse's workspaces to support C/C++ projects, and you have to learn how EGit works (and hopefully you already know Git, otherwise you have to learn that as well). All powerful technologies are complex, or most certainly feel that way before your learn them. There exists documentation and tutorials for all these things. Looking at the downloads page, the most recent CDT package is downloaded more that 200,000 times (and that doesn't include the ones installed by the Eclipse Installer), so a great many people are using this. No doubt a great many of them are using it in combination with EGit (like I do). But definitely you're right, a Git clone is not an Eclipse project; once cloned locally, it's just a bunch of folders and files, somewhere in which lurk your projects (or what could/should become your projects).

One important thing you will lose by sticking to the command line, which is kind of essential and in my opinion makes all the effort to learn CDT worth while, is the interactive debugger. Of course you also lose all the other nice IDE integration, such as navigation from the usage of a symbol to the definition/declaration of that symbol, not to mention the awesome features of EGit. But it's a trade-off between an investment in learning versus a return on investment in productivity. Certainly I was cursing when trying to get CDT to compile my first project; it's 100 times more complicated than setting up a Java project, so I have felt your pain.

I'm just feeling the need to point out that additional documentation is not likely to appear out of thin air. I know from experience that even if one provides documentation, people don't read it because they expect everything to be self evident. (And I"m not saying that is the case for you, I'm just saying that it just makes providing documentation less motivating knowing that you can stick in under someone's nose, and they won't read it first; and I mean that literally in a dialog with a spinning question mark button that people don't click and read). I never felt that EGit lacked documentation, but then I knew all the other aspects of Eclipse and was switching from using CVS, so it was mostly Git itself that I needed to learn, and that seemed horribly complicated at the time, so I was cursing it's "unnecessary complexity" which of course has evolved into loving it's incredibly rich set of features over time.

Personally Google is my best friend. It always answers instantly and with billions of people on the planet, someone else has likely answered this question already.

Good luck with whatever path you choose to follow.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816798 is a reply to message #1816795] Thu, 07 November 2019 08:44 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Besides, Eclipse has rather good built-in help. Global menu, Help->Help Contents. Use it.
Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816821 is a reply to message #1816798] Thu, 07 November 2019 16:45 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
Ed,
I really appreciate all your comments.
Yes, it is like the proverbial "herding cats" .
But Egit is not my first encounter with "very dull Swiss army knife " called Eclipse. I had a heck of a time doing / learning TCF.
It is very disappointing that EGit is sort of repeat of same.
In my view EGit covers / duplicates git - which is basically geared to sharing code.
Nothing wrong with concept - BUT is should not be "advertised " as "plug-in" to Eclipse.
To me "plug-in"means integration and that is where EGit is lacking.

I now have almost 100 real C projects in "Project explorer" - generated by EGit from local repository.
I am not sure how commented / documented are they.
But I can modify (add files) and "build" some of them.
I can probably "push / commit" my modification to my local git repository.
I am moving at snails pace , but it looks good.
Many thanks to group support, appreciate it very much






Another BUT - the integration is THERE, but it takes act of supreme being to find it !


Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816830 is a reply to message #1816798] Thu, 07 November 2019 21:14 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
I have found about 20 "help" items about Git / EGit - just searching for "Git"
It does help with concepts , but it still emphasise "contributions " as primary purpose of git,
not much how to use EGit.

Some people get uptight that I always seek proper terminology.
In case of git /EGit -
what is "Team" option - main access from Eclipse IDE to EGit.
what is "index(ing) for ? - I know now
what is "staging" ? - same as above

Apparently the software gurus do not know about "tool tips".

Why do some EGit forms have "help" icons in them which do nothing ?
Never heard of "F2" for "help" ?



Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816833 is a reply to message #1816830] Thu, 07 November 2019 22:28 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
EGit is not about learning git. There are books and very good online tutorials for that. So EGit generally doesn't explain basic git concepts. There are some exceptions; for instance there are tooltips on the titles of the "staged"/"unstaged" areas in the staging view that do explain in simple terms what this is about.

Menu items could have more tooltips, but alas that will really work only in the next Eclipse version, and someone would have to write meaningful tooltips for all commands. (Which is actually on my to-do list, but not exactly at the top.)

Bear in mind that much of Eclipse and all of EGit is developed by volunteers who are generally not paid by their employers to develop EGit but who do this in their own spare time.

Quote:
Why do some EGit forms have "help" icons in them which do nothing?

Because nobody contributed the help texts or the code linking the icons to it. And nobody contributed code to remove the icons either. Quite simple.
The help icons that do nothing bug me, too. Contributions are welcome!
Quote:
Never heard of "F2" for "help" ?

No. F2 in Eclipse's standard key bindings is "Rename...". But you can redefine it.
Re: Wanted Documentation for EGit "import project from file system or archive" form/ dial [message #1816838 is a reply to message #1816833] Fri, 08 November 2019 04:16 Go to previous message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
Thanks for the comments.
Since I have been in subject of " it is free / done by volunteers so why do you complain " ' few times before elsewhere I really do not want to elaborate on this any more.
Cheers
Previous Topic:Please verify my first "commit" - is it in my local repository ?
Next Topic:Eclipse project makefile versus cloned makefile
Goto Forum:
  


Current Time: Fri Mar 29 09:17:18 GMT 2024

Powered by FUDForum. Page generated in 0.08500 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top