Using Clearcase and Eclipse for C++ - c

I work on a large C/C++ project and the code base is maintained in Clearcase. Till date we primarily work in Linux environment and we don't extensively use IDE. We directly checkout and edit files through VI.
Since I got access to Clearcase for Windows access, I am now trying to access the sources files in Eclipse. I primarily want to use Eclipse for Editing and Code Navigation. I create views through my unix account. I am able to mount the same view on my Windows PC using Clearcase Explorer. I am able to access the code and make changes to the file that were checked out earlier.
Can someone familiar to Eclipse please let me know how I can view that code base in eclipse. I do NOT want to create copies of the code base in my local filesystem. If I try creating a new project with the code base drive as the root folder, the project wont get created since I don't have write permission in that folder.
Is there a workaround?
Thanks in Advance!

As long as you can mount your Linux filesystem on windows, you should be able to reference the sources directly from Eclipse.
The most important detail, for the ClearCase plugin to work is for the .project to and .classpath files to be right alongside the sources, in your snapshot view.
See:
"When committing projects should I include .project & .classpath?"
"imported Eclipse project not linking to ClearCase"
"Clearcase plugin for eclipse usage"
For that Unix view to be recognize from Windows, you would have to tag and register it in the Windows region: "ClearCase: Are views created in Unix not visible from Windows and vice versa?".
Note that the case of snapshot views (accessing Unix views from windows), as this help page details, any ClearCase operation might fail:
See "Before accessing snapshot views across different platforms"
You can access snapshot views across different platforms, but you cannot issue Rational ClearCase commands across platforms.
For example, you cannot check out files in snapshot views on UNIX workstations from Rational ClearCase hosts on Windows computers, nor can you create shortcuts to snapshot views on UNIX workstations from Rational ClearCase Explorer.
If you are on a Rational ClearCase host running on a Windows computer and you hijack a file in a UNIX snapshot view, the hijack is detected when you update the view from a Rational ClearCase host on a UNIX platform.
In your case, if by "mounting" you mean mount dynamic view, then you should be ok, as mentioned in this help page, use Region Synchronizer to import the Linux or UNIX view tag of the view into your Windows network region.

Related

Clearcase corrupting checked out Project files when changing network connection

Is anyone aware of a known issue (and workaround) where it seems like Rational ClearCase will corrupt a Microsoft Project file if it is checked out and the network connection changes? I have a laptop that is docked and hardwired to local network most of the time, and I perform some work with the Project file, then I will undock the laptop to go to a meeting or home for the evening, and upon re-docking, the Project file can no longer be opened and appears corrupt.
The error message shown is "Project cannot open the file. -Check that the file name and path are correct. -Check that the file format is recognized by Project..."
There doesn't seem to be anything directly related to Microsoft Project Server regarding ClearCase on ibm.com.
I have seen issues with dynamic views, when the view server is on the network (and said network is abruptly cut).
If this is your case, I would recommend using snapshot views.
You can have similar issue with ClearTeam 8.x web views (since the latest versions support dynamic views)
Regarding snapshot views (meaning files directly on your hard drive), you only need to watch for concurrent processes that might still access your file when undocking. A program like procmon can help.

Why ClearCase hangs when working with multiple machines?

I am having a ClearCase dynamic view on Win-7 Machine, I added the ClearCase View Shortcut (Created in Win-7 Machine) to an XP machine.
When I try to compile my project from view mounted in WinXP machine, it hangs, and it requires hard reboot. I tried many times, but I got the same results.
Is there anything to do with Anti-virus settings?
Dynamic views can be an issue when scanned by anti-virus: it is best to add m:\ (the mounting point for dynamic views) to the exclusion list of said anti-virus.
I wouldn't recommend accessing a Win7 dynamic view from WinXp, but rather define a dynamic view directly on the Xp.
1. check the clearcase version is same on both windows 7 and windows XP.
2. check if you can use that dynamic view, which created in windows 7, to mount vobs, set config spec, and view the files properly.
3. Check if all clearcase services are started properly.
4. apply the latest windows patch and clearcase patch on both windows 7 and windows xp.
If above checks are fine, I don't think the problem is related with anti-virus. I run clearcase client with anti-virus without issue, and I can mount the dynamic view on windows xp which created in windows 7.

Database errors in Quantum Grid demos in Delphi XE Professional

Whenever I open one of the Quantum Grid demos in Delphi XE Pro (on Windows 7 32-bit), the following error is displayed for every table (I think) in the project:
error message http://www.tranglos.com/img/qgerror.png
The message is:
Network initialization failed.
File or directory does not exist.
File: C:\PDOXUSRS.NET
Permission denied.
Directory: C:\.
I understand permission issues writing to c:\, but the result is that while I can build and run the demo projects, no data is displayed, which makes the demos rather useless. And what kind of database writes its configuration to c:\ directory in the 21st century anyway? :) (Yes, I know very little about Paradox databases, but I won't ever be using one either. I just want to learn how to use the grid.)
Using BDE Administrator I've tried changing the Paradox "NET DIR" value to a folder with write permissions on the C drive. Result: now the database tables cannot find their data:
Path not found.
File: C:..\..\Data\GENRES.DB.
...and the unhelpfully truncated path gives no indication where the files are expected to be.
Is there a way to work around the problem so that the demos can load their sample data correctly?
Did you install the BDE correctly? It should use the DBDEMOS files. Do you see such an alias in the BDE administration utility? Can you open that database in one of the Delphi demos?
The BDE is not a XXI century database, it was developed twenty years ago and never upgraded lately. It's an obsolete tecnology, but because it comes still with every release of Delphi with a known database it is still often used in demos because nothing new has to be installed.
Anyway that file is not its configuration file. It's a sharing lock file to allow more than one user to use the database concurrently. Because it is a file based database without a central server, it has to use such kind of shared files. Usually its position is changed to a network share, but it defaults to C:\ for historical reasons.
Anyway it's not only the BDE still attempting to write in the prong directories. I still see a full bunch of applications attempting to write to C:\ (especially logs) or other read-only positions.
Using BDE Admin to change the location for PDOXUSRS.NET helped, but it wasn't sufficient. DevExpress did the right thing in specifying a relative folder for the data location, and the relative folder seems perfectly allright, but for some reason the DB can't find it.
Solution: under the \Demos\ folder find all the *.dfm files that contain the string
..\..\Data
and replace that string with the absolute path to the demos folder. That done, all the demos open correctly.
I know this message from our own applications. It has to do with security measures introduced with Windows Vista. The operating system trying to protect critical files denies access to them. There is a method how to bypass this mechanism without compromising security. Try to run your application in compatibility mode. When application is running in compatibility mode, read / write operations from / to system folders are redirected to "safe" directories located in C:\Users[Current User]\AppData\Local\VirtualStore.
More info on http://www.windowsecurity.com/articles/Protecting-System-Files-UAC-Virtualization-Part1.html.

ClearCase: Are views created in Unix not visible from Windows and vice versa?

We have a ClearCase UCM project implementation that we access from Windows and Solaris stations.
I have created several views on the same stream of the project from the CC project explorer in both Windows and Solaris.
But when I go into the properties of the stream and look for views from CC project explorer in Windows, I don't see the views I created from Solaris and vice versa.
But from CC project explorer in Windows, I can see views created from other Windows stations.
Whats happening here?
What is happening is the notion of regions: you would usually define one region per Os, precisely to not see (and list with a cleartool lsview) all the views.
The windows ones will have a global path with a windows-like schema: \\server\share\path\to\view_storage.
The Unix ones will have a global path with a Unix mount: /mount/server/path/to/view_storage
Both paths wouldn't be usable by the opposite Os, so there is no point seeing all the views: you need only the ones for your Os.
See "registry regions" and cleartool lsreg for more on those regions.
They apply also for Vobs (not just views):

Icons from remote files

I have started coding an FTP client application (for fun). I’m trying to represent remotely hosted files with icons. For example, let’s say I’m browsing the root folder of an FTP server (/) and want to display the Backup.zip file with the icon association from that client operating system. On some systems, this may be the windows compression icon and other operating systems this may be WinZip or WinRAR icons.
I have the client browsing local files with the SHGetFileInfo() function. This works great with files that are local, however, this function requires the physical file in order to retrieve the associated icon. So, this will not work with remotely hosted files. I have found some samples of loading icons given a file extension, and this is really where the question comes in... What would be the best strategy to get icons associated to remote files?
Go to the registry every time and look up extension to icon associations
Create 1 byte files with each extension and use the SHGetFileInfo() function for remote files (using local 1 byte files as association for remote files)
Other strategies???
What would a professional software company creating an FTP client do?
Thank you for your time.
-Jessy Houle
I suggest that you don't go to the registry every time: go if you need to, but if you've already been for a given filetype then remember/cache that result (within your program) and reuse it.
Use the procedure here from a previous Stack Overflow question on the same idea and uses the registry instead of an actual file.
How can I get the filetype icon that Windows Explorer shows?

Resources