}
}
if (obj instanceof LocalFile && element instanceof IStackFrame) {
IStackFrame stackFrame = (IStackFrame) element;
LocalFile localFile = (LocalFile) obj;
IProject project = null;
try {
if (stackFrame.getLaunch() != null
&& stackFrame.getLaunch().getLaunchConfiguration() != null) {
String file = stackFrame
.getLaunch()
.getLaunchConfiguration()
.getAttribute(IPHPDebugConstants.ATTR_FILE,
(String) null);
if (file != null) {
IWorkspaceRoot workspaceRoot = ResourcesPlugin
.getWorkspace().getRoot();
IResource resource = workspaceRoot.findMember(file);
if (resource != null) {
project = resource.getProject();
}
}
}
} catch (CoreException e1) {
}
if (project != null) {
IDebugTarget debugTarget = (IDebugTarget) stackFrame
.getDebugTarget();
try {
ProjectDescription desc = ((Project) project)
.internalGetDescription();
if (desc != null) {
HashMap links = desc.getLinks();
if (links != null) {
for (Entry entry : (Set<Entry>) links.entrySet()) {
IPath relativePath = (IPath) entry.getKey();
LinkDescription linkDescription = (LinkDescription) entry
.getValue();
IPath linkPath = new Path(linkDescription
.getLocationURI().getPath());
IPath filePath = new Path(localFile
.toLocalFile(EFS.NONE, null)
.getAbsolutePath());
if (linkPath.isPrefixOf(filePath)) {
filePath = filePath.removeFirstSegments(
linkPath.segmentCount()).setDevice(