Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 97946 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (-1 / +15 lines)
Lines 576-582 Link Here
576
             filenames="content-type1.blah"
576
             filenames="content-type1.blah"
577
             icon="icons/anything.gif"
577
             icon="icons/anything.gif"
578
             id="org.eclipse.ui.tests.contentType1Editor-fallback"
578
             id="org.eclipse.ui.tests.contentType1Editor-fallback"
579
             name="org.eclipse.ui.tests.editor2org.eclipse.ui.tests.contentType1Editor-fallback"/>       
579
             name="org.eclipse.ui.tests.contentType1Editor-fallback"/>       
580
      <editor
580
      <editor
581
            name="Mock Matching Editor 1"
581
            name="Mock Matching Editor 1"
582
            icon="icons\mockeditorpart1.gif"
582
            icon="icons\mockeditorpart1.gif"
Lines 590-595 Link Here
590
            icon="icons/binary_co.gif"
590
            icon="icons/binary_co.gif"
591
            id="org.eclipse.ui.tests.api.SessionEditorPart"
591
            id="org.eclipse.ui.tests.api.SessionEditorPart"
592
            name="SessionEditor"/>
592
            name="SessionEditor"/>
593
      <editor
594
            class="org.eclipse.ui.tests.api.MockEditorPart"
595
            default="false"
596
            icon="icons/anything.gif"
597
            id="org.eclipse.ui.tests.contentType2Editor"
598
            name="org.eclipse.ui.tests.contentType2Editor">
599
         <contentTypeBinding contentTypeId="org.eclipse.ui.tests.content-type2"/>
600
      </editor>
593
   </extension>
601
   </extension>
594
   <extension
602
   <extension
595
         point="org.eclipse.ui.actionSets">
603
         point="org.eclipse.ui.actionSets">
Lines 796-801 Link Here
796
				<parameter name="element" value="contentType1" />
804
				<parameter name="element" value="contentType1" />
797
			</describer>
805
			</describer>
798
        </content-type>
806
        </content-type>
807
       <content-type
808
             file-extensions="content-type2"
809
             file-names="content-type2.blah"
810
             id="content-type2"
811
             name="org.eclipse.ui.tests.content-type2"
812
             priority="normal"/>
799
   </extension>
813
   </extension>
800
   		
814
   		
801
   <extension
815
   <extension
(-)Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorRegistryTest.java (-4 / +24 lines)
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.

Return to bug 97946