History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-20606
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Anna Kozlova
Reporter: Melody Dunn
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

IDEA deletes .classpath file if it doesn't have a src entry

Created: 03 Aug 07 18:58   Updated: 02 Mar 08 17:29
Component/s: Editor. Editing Text
Fix Version/s: Selena 7.0.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: windows xp

Build: 7,104
Fixed in build: 8,190
Severity: Medium


 Description  « Hide
My intellij project is linked to the elcipse .classpath file. Every time the project builds Intellij deletes the .classpath file. The .classpath file does not have a src entry (eg. <classpathentry kind="src" path="sourcepath" />) but if I add one, intellij stops deleting the file.

 All   Comments   Work Log   Change History      Sort Order:
Vladislav Kaznacheev - 21 Aug 07 09:41
This behavior is by design, but can be changed relatively easily.
May I ask you why you need a project without a source root?

Melody Dunn - 21 Aug 07 17:37
The reason I'm linking to .classpath files is because I am the only person on my team currently not using Eclipse (when I can help it). Once example of this is we have several eclipse projects that are simply a collection of libraries. There is no source but other projects depend on them who need those libraries. There are other scenarios but the biggest reason I need the .classpath to not be deleted is that I'd like to be able to use Intellij while the rest of the team is using Eclipse. I can't delete those .classpath files because they are used as library dependencies between Eclipse projects. If we were all working in Intellij, we would set up a module library or project library and wouldn't have this scenario, but I work in a mixed IDE world . Hope this helps.

Vladislav Kaznacheev - 31 Aug 07 08:41
OK, got it. Hope to be able to resolve it before the final release.

Alexander Chernikov - 07 Sep 07 15:27
7126, 7268: I have managed to reproduce this in case when all settings in .classpath are ignored by IDEA. E.g.:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

The "con" path is ignored, because it is JDK. The "output" is ignored by design. After import into IDEA and linking .iml to .classpath the .classpath is erased on each next save. Which is really the defect.

If .classpath has at least one user library:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/annotations"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

It is not erased.


Alexander Chernikov - 07 Sep 07 15:41
> It is not erased.
But user meets very bad side effect. Since IDEA thinks that .classpath is not the part of IDEA project anymore, it rejects all changes in .classpath. So, user may change anything in Eclipse: add new libraries, and even source roots, but on return in IDEA and save all .classpath is removed again.

Alexander Chernikov - 02 Mar 08 17:29
7741, 8205: fix confirmed.