cdt/cdt_5_0_x/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
changeset 6 648636cfa849
parent 1 a7cc18b7a772
equal deleted inserted replaced
5:185d5fe9a600 6:648636cfa849
   175 							if ( fsfile.isFile() && fsfile.exists() ) {
   175 							if ( fsfile.isFile() && fsfile.exists() ) {
   176 								// create an ExternalEditorInput with an external tu so when you
   176 								// create an ExternalEditorInput with an external tu so when you
   177 								// open the file from the breakpoints view it opens in the
   177 								// open the file from the breakpoints view it opens in the
   178 								// proper editor.
   178 								// proper editor.
   179 								IProject project = b.getMarker().getResource().getProject();
   179 								IProject project = b.getMarker().getResource().getProject();
   180 								ICProject cproject = CoreModel.getDefault().create(project);
   180 								if (project != null)
   181 								String id = CoreModel.getRegistedContentTypeId(project, path.lastSegment());
   181 									{
   182 								ExternalTranslationUnit tu = new ExternalTranslationUnit(cproject, URIUtil.toURI(path), id);
   182 									ICProject cproject = CoreModel.getDefault().create(project);
   183 								return new ExternalEditorInput( tu, new LocalFileStorage( fsfile ) );
   183 									String id = CoreModel.getRegistedContentTypeId(project, path.lastSegment());
       
   184 									ExternalTranslationUnit tu = new ExternalTranslationUnit(cproject, URIUtil.toURI(path), id);
       
   185 									return new ExternalEditorInput( tu, new LocalFileStorage( fsfile ) );
       
   186 									}
       
   187 								else
       
   188 									return new FileEditorInput( file );
   184 							}
   189 							}
   185 						}
   190 						}
   186 					}
   191 					}
   187 				}
   192 				}
   188 			}
   193 			}