开发者

Operation not supported for specified element 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜