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 32088 Details for
Bug 121715
Util#getJavaLikeExtensions doesn't consider Java-like content types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
suggested fix
121715.patch (text/plain), 1.67 KB, created by
Matt Chapman
on 2005-12-21 11:57:26 EST
(
hide
)
Description:
suggested fix
Filename:
MIME Type:
Creator:
Matt Chapman
Created:
2005-12-21 11:57:26 EST
Size:
1.67 KB
patch
obsolete
>Index: model/org/eclipse/jdt/internal/core/util/Util.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java,v >retrieving revision 1.81 >diff -u -r1.81 Util.java >--- model/org/eclipse/jdt/internal/core/util/Util.java 7 Dec 2005 11:27:15 -0000 1.81 >+++ model/org/eclipse/jdt/internal/core/util/Util.java 21 Dec 2005 16:57:18 -0000 >@@ -750,7 +750,19 @@ > JAVA_LIKE_EXTENSIONS = new char[][] {SuffixConstants.EXTENSION_java.toCharArray()}; > else { > IContentType javaContentType = Platform.getContentTypeManager().getContentType(JavaCore.JAVA_SOURCE_CONTENT_TYPE); >- String[] fileExtensions = javaContentType == null ? null : javaContentType.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); >+ IContentType[] contentTypes = Platform.getContentTypeManager().getAllContentTypes(); >+ List extList = new ArrayList(); >+ if (javaContentType != null) { >+ extList.addAll(Arrays.asList(javaContentType.getFileSpecs(IContentType.FILE_EXTENSION_SPEC))); >+ } >+ for (int i = 0; i < contentTypes.length; i++) { >+ IContentType base = contentTypes[i].getBaseType(); >+ if ((base != null) && (base.equals(javaContentType))) { >+ String[] ext = contentTypes[i].getFileSpecs(IContentType.FILE_EXTENSION_SPEC); >+ extList.addAll(Arrays.asList(ext)); >+ } >+ } >+ String[] fileExtensions = (String[]) extList.toArray(new String[0]); > // note that file extensions contains "java" as it is defined in JDT Core's plugin.xml > int length = fileExtensions == null ? 0 : fileExtensions.length; > char[][] extensions = new char[length][];
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 121715
: 32088