cdt/cdt_6_0_x/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java
changeset 57 b9108837a1fc
parent 37 c2bce6dd59e7
equal deleted inserted replaced
56:c430da7700d9 57:b9108837a1fc
    86 	/**
    86 	/**
    87 	 * Find the project associated with the current launch configuration
    87 	 * Find the project associated with the current launch configuration
    88 	 * @return IProject or null
    88 	 * @return IProject or null
    89 	 */
    89 	 */
    90 	private IProject getProject() {
    90 	private IProject getProject() {
    91 		ILaunchConfiguration config = getDirector().getLaunchConfiguration();
    91 		ISourceLookupDirector director = getDirector();
    92 		if (config != null) {
    92 		if (director != null)
    93 			try {
    93 		{
    94 				String name = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
    94 			ILaunchConfiguration config = director.getLaunchConfiguration();
    95 				if (name.length() > 0)
    95 			if (config != null) {
    96 					return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
    96 				try {
    97 			} catch (CoreException e) {
    97 					String name = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
    98 				// Don't care carry on search using other heuristics
    98 					if (name.length() > 0)
       
    99 						return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
       
   100 				} catch (CoreException e) {
       
   101 					// Don't care carry on search using other heuristics
       
   102 				}
    99 			}
   103 			}
   100 		}
   104 		}
   101 		return null;
   105 		return null;
   102 	}
   106 	}
   103 
   107