Home » Newcomers » Newcomers » Problems with SVN/Git projects(Many tools are not available when working with SVN or Git projects)
Problems with SVN/Git projects [message #1537534] |
Tue, 30 December 2014 22:17 |
Ce Sch Messages: 5 Registered: December 2014 |
Junior Member |
|
|
Eclipse 4.4, Windows 8, installed on D:
When working on projects, that I have checked out from Git or SVN, there are a lot of helps/ tools missing in the editor.
In fact, Eclipse will only write keywords in bold, that' s it.
There is no Syntax highlighting, a reduced menu when right-clicking on a method/ class or in "Navigate"- tab (eg. no way to open the Call Hierarchy), not even warnings, errors or notes on the left hand side (like the light bulb, when you forget a semicolon).
Those problems do not occur, when I am working on a local project.
(Though, I have to set the path to the current workspace, to get all these things, is this right???)
I have tried following things:
-git workspace iniside and outside of my default workspace
(also changed path inside Eclipse )
-change preferences for each workspace (window -> preferences)
-delete project and clone it again
Any ideas?
|
|
|
Re: Problems with SVN/Git projects [message #1538456 is a reply to message #1537534] |
Wed, 31 December 2014 10:48 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
This sounds more like a problem with how the project is configured. If
this is a Java project, likely the folder containing the sources is not
configured as a Java source folder. It's hard to say from what you've
described here. Are the .project and .class files committed to the
source code repository?
On 31/12/2014 5:24 AM, Ce Sch wrote:
> Eclipse 4.4, Windows 8, installed on D:
>
> When working on projects, that I have checked out from Git or SVN,
> there are a lot of helps/ tools missing in the editor.
> In fact, Eclipse will only write keywords in bold, that' s it.
> There is no Syntax highlighting, a reduced menu when right-clicking on
> a method/ class or in "Navigate"- tab (eg. no way to open the Call
> Hierarchy), not even warnings, errors or notes on the left hand side
> (like the light bulb, when you forget a semicolon).
>
> Those problems do not occur, when I am working on a local project.
> (Though, I have to set the path to the current workspace, to get all
> these things, is this right???)
>
> I have tried following things:
> -git workspace iniside and outside of my default workspace
> (also changed path inside Eclipse ;) )
> -change preferences for each workspace (window -> preferences)
> -delete project and clone it again
>
> Any ideas?
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | | |
Re: Problems with SVN/Git projects [message #1544363 is a reply to message #1544152] |
Sat, 03 January 2015 19:11 |
|
On 01/03/2015 09:23 AM, Ce Sch wrote:
> I now have the repository inside of the /src folder from a manually
> created java project.
> This way, the config files are not influenced by any push or pull requests.
> I can use all of Eclipse's java tools and even could set .classpath, so
> I don't have .java and .class files in one folder any more. :)
Here's the thing...
You want to save .project, .classpath and .settings in Git, so you
should find a subdirectory, .git, directly under your project:
project
+-- .git
+-- .project
+-- .classpath
+-- .settings
+-- src
+-- test
`-- (etc.)
What might make this problematic though is if you're sharing this
project (repository) with a) a colleague or b) yourself on another
computer--if .classpath begins to have machine-dependent paths in it. In
other words, if you tell Eclipse (via Build Path) to consume JARs
outside of your project, then the paths will be put into .classpath, but
will be wrong on your other (or your colleague's) computer.
If you use Maven, none of this will be a problem since classpath will
have much less in it.
I don't want to unload all of this on you if you're new to Eclipse, but
if you have trouble at some point, remember this and come back to ask.
|
|
|
Re: Problems with SVN/Git projects [message #1544431 is a reply to message #1544363] |
Sat, 03 January 2015 20:08 |
Ce Sch Messages: 5 Registered: December 2014 |
Junior Member |
|
|
Quote:
You want to save .project, .classpath and .settings in Git, so you
should find a subdirectory, .git, directly under your project:
[...]
What might make this problematic though is if you're sharing this
project (repository) with a) a colleague or b) yourself on another
computer--if .classpath begins to have machine-dependent paths in it.
But this is not the case. I think it did not become clear through my last response, but I do NOT share .classpath, .project and .settings.
I see your point in different paths on different machines, but there are really no conflicts.
For more clearity, here is the current structure of my project:
project
+--.settings
+--bin
+--.classpath
+--.project
+--src
---+--package
------+--.git
------+--*.java
So the repository is included into my /src folder as one package (because the whole project is just one package) and it does not touch anything above /package in the hierarchy. I already tried to push and pull commits and it worked just fine.
Though, I will have a look at Maven and probably use it for future projects, to simplify the whole process .
|
|
|
Re: Problems with SVN/Git projects [message #1545146 is a reply to message #1544431] |
Sun, 04 January 2015 05:45 |
|
On 01/03/2015 01:08 PM, Ce Sch wrote:
> Quote:
>> You want to save .project, .classpath and .settings in Git, so you
>> should find a subdirectory, .git, directly under your project:
>> [...]
>> What might make this problematic though is if you're sharing this
>> project (repository) with a) a colleague or b) yourself on another
>> computer--if .classpath begins to have machine-dependent paths in it.
>
>
> But this is not the case. I think it did not become clear through my
> last response, but I do NOT share .classpath, .project and .settings.
> I see your point in different paths on different machines, but there are
> really no conflicts.
>
> For more clearity, here is the current structure of my project:
>
> project
> +--.settings
> +--bin
> +--.classpath
> +--.project
> +--src
> ---+--package
> ------+--.git
> ------+--*.java
>
> So the repository is included into my /src folder as one package
> (because the whole project is just one package) and it does not touch
> anything above /package in the hierarchy. I already tried to push and
> pull commits and it worked just fine.
>
> Though, I will have a look at Maven and probably use it for future
> projects, to simplify the whole process ;) .
"It's not the case." Exactly. But it should be the case. It's what Eric
and I are telling you.
For one thing, your project cannot be cloned in git because the
resulting clone isn't an Eclipse project, it's just a pile of source code.
This is not what you want. The layout I showed you is what you want.
Hope this helps.
|
|
|
Re: Problems with SVN/Git projects [message #1547555 is a reply to message #1545146] |
Mon, 05 January 2015 13:57 |
Eric Rizzo Messages: 3070 Registered: July 2009 |
Senior Member |
|
|
Russell Bateman wrote on Sun, 04 January 2015 05:45"It's not the case." Exactly. But it should be the case. It's what Eric
and I are telling you.
For one thing, your project cannot be cloned in git because the
resulting clone isn't an Eclipse project, it's just a pile of source code.
This is not what you want. The layout I showed you is what you want.
Hope this helps.
Exactly. Please re-read my earlier response; you should include in git the Eclipse project configuration files. Trust our years (decades, actually) of experience working with Eclipse projects on small and large teams.
[Updated on: Mon, 05 January 2015 13:57] Report message to a moderator
|
|
| |
Re: Problems with SVN/Git projects [message #1551385 is a reply to message #1551321] |
Wed, 07 January 2015 15:49 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Comments below.
On 07/01/2015 3:59 PM, Ce Sch wrote:
> Then I need some explanation here.
> I trust you and your experience, of course, but I don't see too many
> disadvantages in not including the project (in this case).
> The only thing I understand is that I would have to create a project
> on every computer, I'm working on.
> This wouldn't be too bad, costs me 2mins.
It's not just that, you have to set up the classpath correctly as well,
and make sure the projects have the right natures, and so on.
> If the structure would be more complex, I wouldn't try this, but 15
> java files and no structure at all don't require a whole project.
I'm not sure the aversion to just doing what everyone normally does...
>
> What do I miss?
Doesn't the fact you're asking questions suggest you're missing something?
> Where are the problems, not including the project?
The fact that you have to create it again each and every time.
> (The current project is already finished, so it's just interesting to
> know)
You can see how Eclipse developers themselves manage such things:
http://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/plugins/org.eclipse.emf.ecore
I.e., all files/folders are generally included, except files that are
generated by builders, e.g., .class files in a Java project's bin
folder. That includes the .project, .classpath (for Java projects), and
the entire .settings folder's contents (for any project specific
settings, e.g., Java compiler preferences).
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Wed Sep 25 22:40:41 GMT 2024
Powered by FUDForum. Page generated in 0.07598 seconds
|