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 78195 Details for
Bug 198544
[content type] Platform.getContentTypeManager().findContentTypeFor( filename) ignores content type priority
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]
Updated tests
198544.txt (text/plain), 2.57 KB, created by
Szymon Brandys
on 2007-09-12 11:16:07 EDT
(
hide
)
Description:
Updated tests
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2007-09-12 11:16:07 EDT
Size:
2.57 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.tests.runtime >Index: src/org/eclipse/core/tests/runtime/content/IContentTypeManagerTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/content/IContentTypeManagerTest.java,v >retrieving revision 1.70 >diff -u -r1.70 IContentTypeManagerTest.java >--- src/org/eclipse/core/tests/runtime/content/IContentTypeManagerTest.java 5 Sep 2007 13:34:28 -0000 1.70 >+++ src/org/eclipse/core/tests/runtime/content/IContentTypeManagerTest.java 12 Sep 2007 15:15:30 -0000 >@@ -540,6 +540,7 @@ > IContentType inappropriate = contentTypeManager.getContentType(RuntimeTestsPlugin.PI_RUNTIME_TESTS + ".sample-binary1"); > IContentType appropriate = contentTypeManager.getContentType(Platform.PI_RUNTIME + ".xml"); > IContentType appropriateSpecific1 = contentTypeManager.getContentType(RuntimeTestsPlugin.PI_RUNTIME_TESTS + ".xml-based-different-extension"); >+ IContentType appropriateSpecific1LowPriority = contentTypeManager.getContentType(RuntimeTestsPlugin.PI_RUNTIME_TESTS + ".xml-based-different-extension-low-priority"); > IContentType appropriateSpecific2 = contentTypeManager.getContentType(RuntimeTestsPlugin.PI_RUNTIME_TESTS + ".xml-based-specific-name"); > > // if only inappropriate is provided, none will be selected >@@ -563,6 +564,14 @@ > assertTrue("4.1", appropriateSpecific1.equals(selected[0]) || appropriateSpecific1.equals(selected[1])); > assertTrue("4.2", appropriateSpecific2.equals(selected[0]) || appropriateSpecific2.equals(selected[1])); > assertTrue("4.3", appropriate.equals(selected[2])); >+ >+ // if appropriate and a more specific appropriate type (but with low priority) are provided, the specific type will be selected >+ finder = contentTypeManager.getMatcher(new SubsetSelectionPolicy(new IContentType[] {appropriate, appropriateSpecific1LowPriority}), null); >+ assertEquals("5.0", appropriateSpecific1LowPriority, finder.findContentTypeFor(getInputStream(MINIMAL_XML), null)); >+ >+ // if appropriate and two specific appropriate types (but one with lower priority) are provided, the specific type with higher priority will be selected >+ finder = contentTypeManager.getMatcher(new SubsetSelectionPolicy(new IContentType[] {appropriate, appropriateSpecific1, appropriateSpecific1LowPriority}), null); >+ assertEquals("5.1", appropriateSpecific1, finder.findContentTypeFor(getInputStream(MINIMAL_XML), null)); > } > > public void testDefaultProperties() throws IOException /* never actually thrown */{
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 198544
:
78011
|
78018
|
78169
|
78195
|
78196