|
Lines 295-302
Link Here
|
| 295 |
/** |
295 |
/** |
| 296 |
* Assert that in the absence of content type, fall back to the traditional filename binding. |
296 |
* Assert that in the absence of content type, fall back to the traditional filename binding. |
| 297 |
*/ |
297 |
*/ |
| 298 |
public void testEditorContentTypeByExtWithoutContentType() { |
298 |
public void testEditorContentTypeByExtWithoutContentType1() { |
| 299 |
IEditorDescriptor descriptor = fReg.getDefaultEditor("blah.content-type1", null); |
299 |
IEditorDescriptor descriptor = fReg.getDefaultEditor("blah.content-type1"); |
| 300 |
assertNotNull(descriptor); |
300 |
assertNotNull(descriptor); |
| 301 |
assertEquals("org.eclipse.ui.tests.contentType1Editor-fallback", descriptor.getId()); |
301 |
assertEquals("org.eclipse.ui.tests.contentType1Editor-fallback", descriptor.getId()); |
| 302 |
} |
302 |
} |
|
Lines 304-315
Link Here
|
| 304 |
/** |
304 |
/** |
| 305 |
* Assert that in the absence of content type, fall back to the traditional filename binding. |
305 |
* Assert that in the absence of content type, fall back to the traditional filename binding. |
| 306 |
*/ |
306 |
*/ |
| 307 |
public void testEditorContentTypeByFilenameWithoutContentType() { |
307 |
public void testEditorContentTypeByFilenameWithoutContentType1() { |
| 308 |
IEditorDescriptor descriptor = fReg.getDefaultEditor("content-type1.blah", null); |
308 |
IEditorDescriptor descriptor = fReg.getDefaultEditor("content-type1.blah"); |
| 309 |
assertNotNull(descriptor); |
309 |
assertNotNull(descriptor); |
| 310 |
assertEquals("org.eclipse.ui.tests.contentType1Editor-fallback", descriptor.getId()); |
310 |
assertEquals("org.eclipse.ui.tests.contentType1Editor-fallback", descriptor.getId()); |
| 311 |
} |
311 |
} |
| 312 |
|
312 |
|
|
|
313 |
/** |
| 314 |
* Assert that in the absence of content type, choose the content type |
| 315 |
* editor based on content type guess. |
| 316 |
*/ |
| 317 |
public void testEditorContentTypeByFilenameWithoutContentType2() { |
| 318 |
IEditorDescriptor descriptor = fReg.getDefaultEditor("content-type2.blah"); |
| 319 |
assertNotNull(descriptor); |
| 320 |
assertEquals("org.eclipse.ui.tests.contentType2Editor", descriptor.getId()); |
| 321 |
} |
| 322 |
|
| 323 |
/** |
| 324 |
* Assert that in the absence of content type, choose the content type |
| 325 |
* editor based on content type guess. |
| 326 |
*/ |
| 327 |
public void testEditorContentTypeByExtWithoutContentType2() { |
| 328 |
IEditorDescriptor descriptor = fReg.getDefaultEditor("blah.content-type2"); |
| 329 |
assertNotNull(descriptor); |
| 330 |
assertEquals("org.eclipse.ui.tests.contentType2Editor", descriptor.getId()); |
| 331 |
} |
| 332 |
|
| 313 |
/** |
333 |
/** |
| 314 |
* Assert that IEditorRegistry.getEditors() does not return null children |
334 |
* Assert that IEditorRegistry.getEditors() does not return null children |
| 315 |
* when the default editor has been set to null. |
335 |
* when the default editor has been set to null. |