Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 22222 Details for
Bug 97946
[EditorMgmt] old getDefaultEditor API is not backwards compatible (in spirit)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch against org.eclipse.ui.tests
Bug97946-Tests.txt (text/plain), 4.18 KB, created by
Kim Horne
on 2005-06-02 09:22:59 EDT
(
hide
)
Description:
Patch against org.eclipse.ui.tests
Filename:
MIME Type:
Creator:
Kim Horne
Created:
2005-06-02 09:22:59 EDT
Size:
4.18 KB
patch
obsolete
>Index: plugin.xml >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.tests/plugin.xml,v >retrieving revision 1.135 >diff -u -r1.135 plugin.xml >--- plugin.xml 26 May 2005 14:02:32 -0000 1.135 >+++ plugin.xml 2 Jun 2005 13:22:52 -0000 >@@ -576,7 +576,7 @@ > filenames="content-type1.blah" > icon="icons/anything.gif" > id="org.eclipse.ui.tests.contentType1Editor-fallback" >- name="org.eclipse.ui.tests.editor2org.eclipse.ui.tests.contentType1Editor-fallback"/> >+ name="org.eclipse.ui.tests.contentType1Editor-fallback"/> > <editor > name="Mock Matching Editor 1" > icon="icons\mockeditorpart1.gif" >@@ -590,6 +590,14 @@ > icon="icons/binary_co.gif" > id="org.eclipse.ui.tests.api.SessionEditorPart" > name="SessionEditor"/> >+ <editor >+ class="org.eclipse.ui.tests.api.MockEditorPart" >+ default="false" >+ icon="icons/anything.gif" >+ id="org.eclipse.ui.tests.contentType2Editor" >+ name="org.eclipse.ui.tests.contentType2Editor"> >+ <contentTypeBinding contentTypeId="org.eclipse.ui.tests.content-type2"/> >+ </editor> > </extension> > <extension > point="org.eclipse.ui.actionSets"> >@@ -796,6 +804,12 @@ > <parameter name="element" value="contentType1" /> > </describer> > </content-type> >+ <content-type >+ file-extensions="content-type2" >+ file-names="content-type2.blah" >+ id="content-type2" >+ name="org.eclipse.ui.tests.content-type2" >+ priority="normal"/> > </extension> > > <extension >Index: Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorRegistryTest.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorRegistryTest.java,v >retrieving revision 1.22 >diff -u -r1.22 IEditorRegistryTest.java >--- Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorRegistryTest.java 18 May 2005 17:44:13 -0000 1.22 >+++ Eclipse UI Tests/org/eclipse/ui/tests/api/IEditorRegistryTest.java 2 Jun 2005 13:22:52 -0000 >@@ -295,8 +295,8 @@ > /** > * Assert that in the absence of content type, fall back to the traditional filename binding. > */ >- public void testEditorContentTypeByExtWithoutContentType() { >- IEditorDescriptor descriptor = fReg.getDefaultEditor("blah.content-type1", null); >+ public void testEditorContentTypeByExtWithoutContentType1() { >+ IEditorDescriptor descriptor = fReg.getDefaultEditor("blah.content-type1"); > assertNotNull(descriptor); > assertEquals("org.eclipse.ui.tests.contentType1Editor-fallback", descriptor.getId()); > } >@@ -304,12 +304,32 @@ > /** > * Assert that in the absence of content type, fall back to the traditional filename binding. > */ >- public void testEditorContentTypeByFilenameWithoutContentType() { >- IEditorDescriptor descriptor = fReg.getDefaultEditor("content-type1.blah", null); >+ public void testEditorContentTypeByFilenameWithoutContentType1() { >+ IEditorDescriptor descriptor = fReg.getDefaultEditor("content-type1.blah"); > assertNotNull(descriptor); > assertEquals("org.eclipse.ui.tests.contentType1Editor-fallback", descriptor.getId()); > } > >+ /** >+ * Assert that in the absence of content type, choose the content type >+ * editor based on content type guess. >+ */ >+ public void testEditorContentTypeByFilenameWithoutContentType2() { >+ IEditorDescriptor descriptor = fReg.getDefaultEditor("content-type2.blah"); >+ assertNotNull(descriptor); >+ assertEquals("org.eclipse.ui.tests.contentType2Editor", descriptor.getId()); >+ } >+ >+ /** >+ * Assert that in the absence of content type, choose the content type >+ * editor based on content type guess. >+ */ >+ public void testEditorContentTypeByExtWithoutContentType2() { >+ IEditorDescriptor descriptor = fReg.getDefaultEditor("blah.content-type2"); >+ assertNotNull(descriptor); >+ assertEquals("org.eclipse.ui.tests.contentType2Editor", descriptor.getId()); >+ } >+ > /** > * Assert that IEditorRegistry.getEditors() does not return null children > * when the default editor has been set to null.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 97946
:
22220
| 22222