View | Details | Raw Unified | Return to bug 369595
Collapse All | Expand All

(-)a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java (-2 / +3 lines)
Lines 77-86 Link Here
77
	 * <ul> 
77
	 * <ul> 
78
	 * <li>	Encoding explicitly set on the source file (java or zip), i.e. <code>org.eclipse.core.resources.IFile#getCharset(false)</code> </li>
78
	 * <li>	Encoding explicitly set on the source file (java or zip), i.e. <code>org.eclipse.core.resources.IFile#getCharset(false)</code> </li>
79
	 * <li>	Encoding set on the corresponding classpath entry </li>
79
	 * <li>	Encoding set on the corresponding classpath entry </li>
80
	 * <li> If the source attachment is a member of the project, then the project's default charSet</li>
80
	 * <li> If the source attachment is a folder, then the encoding determined by the file content if detectable </li>
81
	 * <li> Workspace default charSet </li>
81
	 * <li> If the source attachment is in the workspace, then the encoding of the enclosing resources</li>
82
	 * </ul>
82
	 * </ul>
83
	 * 
83
	 * 
84
	 * @see org.eclipse.core.resources.IFile#getCharset()
84
	 * @since 3.8
85
	 * @since 3.8
85
	 */
86
	 */
86
	String SOURCE_ATTACHMENT_ENCODING = "source_encoding"; //$NON-NLS-1$
87
	String SOURCE_ATTACHMENT_ENCODING = "source_encoding"; //$NON-NLS-1$
(-)a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java (-2 / +3 lines)
Lines 246-256 Link Here
246
	int anonymousCounter;
246
	int anonymousCounter;
247
	int anonymousClassName;
247
	int anonymousClassName;
248
248
249
	String encoding;
250
	String defaultEncoding;
249
	/**
251
	/**
250
	 *Options to be used
252
	 *Options to be used
251
	 */
253
	 */
252
	String encoding;
253
	String defaultEncoding;
254
	Map options;
254
	Map options;
255
255
256
	/**
256
	/**
Lines 1027-1032 Link Here
1027
				try {
1027
				try {
1028
					// Order of preference: charSet supplied, this.encoding or this.defaultEncoding in that order
1028
					// Order of preference: charSet supplied, this.encoding or this.defaultEncoding in that order
1029
					try {
1029
					try {
1030
						// Use the implicit encoding only when the source attachment's encoding hasn't been explicitly set.
1030
						charSet = ((IFile) res).getCharset(this.encoding == null);
1031
						charSet = ((IFile) res).getCharset(this.encoding == null);
1031
					} catch (CoreException e) {
1032
					} catch (CoreException e) {
1032
						// Ignore
1033
						// Ignore

Return to bug 369595