eclipse中jar包关联的源码无法设置编码格式

在eclipse中可以给jar包设置一个源码包,但是这个源码包的编码格式没有办法单独设置,管理源码包的类是org.eclipse.jdt.internal.core.SourceMapper,其中的构造函数是:

public SourceMapper(IPath sourcePath, String rootPath, Map options) {
	this.areRootPathsComputed = false;
	this.options = options;
	try {
		this.encoding = ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset();
	} catch (CoreException e) {
		// use no encoding
	}
	if (rootPath != null) {
		this.rootPaths = new ArrayList();
		this.rootPaths.add(rootPath);
	}
	this.sourcePath = sourcePath;
	this.sourceRanges = new HashMap();
	this.parameterNames = new HashMap();
	this.importsTable = new HashMap();
	this.importsCounterTable = new HashMap();
}

 可以看到代码:ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset(),编码是workspace的defaultCharset,可以通过window -> Preferences -> General -> Workspace设置。

 

希望能在eclipse3.6以后的版本中解决这个问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值