开发者

Operation not supported for specified element type

开发者 https://www.devze.com 2023-01-17 16:12 出处:网络
I am getting this error in an eclipse plugin. Here is t开发者_JAVA技巧he code : ICompilationUnit testCU = findTestUnit(type);

I am getting this error in an eclipse plugin. Here is t开发者_JAVA技巧he code :

ICompilationUnit testCU = findTestUnit(type);
// add some stuff to testCU
testCU.commitWorkingCopy(false, null);    // error happens here.


I'll guess that you're using this interface. Here's the method signature in question:

void commitWorkingCopy(boolean force, IProgressMonitor monitor) throws JavaModelException;

Perhaps you can try casting that null to IProgressMonitor.

Another idea would be to look at the type returned by that method call and make sure that it implements the right interface. Perhaps that is not correct.

0

精彩评论

暂无评论...
验证码 换一张
取 消