ClearCase and Eclipse: How to hide/ignore files? - eclipse

I'm working with Eclipse and ClearCase and we're facing the problem that there's no "ignore"-feature in ClearCase and we're having regularly checked-in files that shouldn't have been checked in.
In Eclipse, I already found the "Ignored Resources" configuration in Window -> Preferences -> Team and have been able to ignore files that follow a specific pattern that way.
But what do I do if I want to
keep a folder and all its contents from being checked in (such as a target-folder containing classes and such) or
keep a single specific file that can't be matched by a pattern in "Ignored Resources" from being checked in?
Update: We're using the provided Eclipse-plugin.

Within eclipse itself, the current ClearCase plugin cannot specify files to ignores, and they will always show up with a native ls -private command as private files.
Only a dedicated GUI (like CCRC -- ClearCase Remote Client -- used as Rich Client Platform based on eclipse) has a way to specify ignore files.

I'd say look at creating an entry in your configspec to exclude the target file/folder.

(I'm assuming you are using the Eclipse plugin)
When you create a new file or folder, it asks you whether or not you want to add the element(s) to source control. If you simply click cancel on the popup, then it will be ignored until you specifically add it. So, ClearCase, in effect, asks you whether or not this is an ignored file as soon as you create it. If the files are being checked in, blame the people who checked it in, not ClearCase.

Related

How to ignore other folders on Team checkin in Eclipse

Team Anywhere always scan other project folder
(Click the above link to see the screenshot)
I have an Android project under c:\AndroidDevelopment, with Team Anywhere installed so I can connect to TFS(visualstudio.com) and do source code control. However, whenever I try to check in a file, it takes a long time to come up with this check in window and I think the problem is, as you can see in the screenshot, it scans the whole world of C:\Projects. Why it scans C:\Projects folder? which has nothing to do with my android project under c:\AndroidDevelopment?
How to tell the Team Anywhere not to do that? (Or what causes TeamAnywhere to scan c:\projects folder?)
Thanks
If you are working in a local workspace, Eclipse can detect changes that you make outside the system.
If you make changes outside Eclipse to projects that are in your Eclipse workspace, refresh the Package Explorer or Project Explorer to see your changes. Changes will be detected automatically.
You can manage your workspace under Pending Changes--Actions to see whether you have mapped C:\Projects\ folder:
If items that you don’t need to check in are appearing regularly in the Promote Candidate Changes dialog box, you can select one of them, open its shortcut menu, and choose Ignore this local item to ignore the item.
You can also customize which files are ignored by version control. You can configure which kinds of files are ignored by placing text file called .tfignore in the folder where you want rules to apply. The effects of the .tfignore file are recursive. However, you can create .tfignore files in sub-folders to override the effects of a .tfignore file in a parent folder. More information, please check: https://msdn.microsoft.com/en-us/library/jj155786(v=vs.120).aspx

Eclipse build failure when project folder has ampersand in pathname

I have a C/C++ project which has some normal and some linked/virtual folders and it has been building just fine. Now that I've put it into perforce over VPN (the path of which I cannot modify), there is an ampersand in the path of the project that causes eclipse to fail when it gets to building the files in the linked folders (it appears eclipse builds an entire pathname for linked folder's files from the environment variables and passes that to the gnu compiler). I don't know if Perforce allows aliasing of workspaces (to get rid of the ampersand) but I can't find one. I've tried alt root but that doesn't seem to do anything useful. I've found that using the DOS command prompt subst F:
C:\perforce\pathwithampersand will allow the project to build in eclipse but now I loose the ability to utilize the Perforce plugin features. Although I can still manually check files in/out using the P4 client, it would be very useful if the ampersand problem was taken care of by eclipse. I've searched and searched but can't find anything about eclipse having a problem (or solution) with ampersand in the folder path. I'm using eclipse platform 4.2.1 and CDT 8.1.1 but cannot update to any later version(s) than those because they are part of a tool suite a vendor controls. Perforce plugin is 2013.1/server is 2009.1.
Go to the P4 Client Connection->Edit Current Workspace
Expand the depot tree until you see your project. Right mouse click on it and choose Include Special.
Click Files radio button and click the Save button.
That will cause a path name to be displayed next to your project under Client Expression. Click to the right of this path which will cause it to become editable. Cursor over to the part that includes the ampersand and delete it. Click the OK button.
P4 will then (eventually) ask if you want to update files to the new location (or something like that). Choose update and it will take some time to create the new folder and move the files there. It is unclear whether you need to log out of P4 for it to be completely enforced so the best solution is to do so (Connection->Log Off). It might leave the old directory so you can delete it at will and it will not appear the next time you start P4.
Some users found this sequence did not work this way so they had to click the "View workspace mapping as text" button on the workspace edit dialog and delete the ampersand. Click apply.

Subclipse: How to add the default output folder to version control (*.class files)?

I am using eclipse 4.2 and Subclipse 1.8.20.
I am trying to add the contents of /WebContent/WEB-INF/classes to version control (this is also the default output folder of my project).
First let me state that this is possible with TortoiseSVN. I do understand why by default Subclipse ignores this directory, and I tried to change the Team settings, but I am not seeing a relevant entry for *.class files:
Is this at all possible with Subclipse?
More info:
Old an unanswered similar question: http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=473163
Same topic but opposite question: How can I ignore build directory in Subclipse?
It is a horribly bad idea to version your build directory. Every time Eclipse does an auto-build it will cause all of the files to need to be committed again.
To answer your question, all Eclipse team providers automatically ignore any resource that is marked as "Derived" by Eclipse. The Derived flag is set on files that are created by the Eclipse builders. If you select one of these files that are ignored in Eclipse, right click and choose Properties. Navigate to the Eclipse Resource page. There will be a bunch of checkboxes. You should see that one of these is labelled Derived and will likely be checked.
Do not try to change the checkbox value. I am just pointing out where you can see and confirm this.

Eclipse does not respect .cvsignore

In my project there is a symlink to a folder from another project.
The name of this folder is in .cvsignore
But this folder (symlink) contains cvs metadata (CVS folders) from the other project.
The cvs command has no problem with this and ignores the folder.
But eclipse wants to synchronize it.
The question is, can ecplise ignore a folder at synchronize time, or how to make eclipse respect .cvsignore files?
the folder (symlink) name is shared and in my .cvsignore contains a line with it's name
We use the symlink trick to share sources between our software and its plugins which are built separately (separate autotools projects).
The issue here is an explicitly shared folder overriding the .cvsignore entry.
You can find the exact details as explained by the previous Eclipse CVS component lead within bug 169710. This bug is marked as a duplicate of another defect which is still open, meaning this is a known issue.
As Michael pointed out, your choice is to use an Eclipse link for development:
Add new folder to Eclipse project
Select Advanced > Link to alternate location (Linked Folder)
Select the workspace variable (i.e. WORKSPACE_LOC) and point to the other project on your workspace (i.e. WORKSPACE_LOC/other_project/foo)
This will get you a linked resource that developers don't have to worry about mistakenly checking-in. For your automated builds you'll need an extra post-checkout step where you create the symlink.
This is not ideal but it's a sensible alternative, short of fixing the Eclipse issue.

Eclipse - Ignore Entire Directories

I use Aptana Studio (based on Eclipse). I'm trying to get Eclipse to completely ignore an entire directory inside a project. I mean COMPLETELY. I don't want it to display in the project folder. I don't want Eclipse to even be aware it exists.
Unfortunately, all my efforts to add it as a filter don't work. See http://forums.aptana.com/viewtopic.php?f=14&t=8340#p33714 . I think the filter only prevents the folder from being displayed in the project display. It doesn't keep Eclipse from actually looking at all the files in that folder for code assist, etc.
My problem is that directory has thousands of text files. So, each time Eclipse opens or refreshes this project, it analyzes all those files.
How can I prevent this?
Not sure about this aptana thing, but there is a convenient way to do it in native eclipse:
Right-click a project folder in Project Explorer tree and go to "Properties".
Resource -> Resource Filters.
Add as much exclusion filters for files/folders as you like.
If your project tree is not refreshed immediately, press F5 to enforce it.
Consider also the 'Derived' checkbox: right-click an entry in the package explorer, choose properties, check Derived. This may solve part of your problem.
See http://robmayhew.com/eclipse-ignore-folder/
If you have a linked resource (pointing off to some other file/folder on disk) with the same name in the same location in the resource tree, then the real folder on disk will be hidden from the resource model.
Unfortunately you can't create the linked resource if the real directory is already there in the project structure. You can try something like this:
On disk, rename/move the directory in question
Refresh the project, the directory is gone
Create a linked resource ( New -> File/Folder >> Advanced -> Link to file in the file system ). Name it the same as the original directory.
On disk, restore the original name of the directory
Refresh project.
Try right-clicking "Properties" and unchecking all permissions.