Cryptic dependency error message
I'm trying to create a custom editor presentation plug-in. Using the following code (taken from the CalucatedRiskPresentation example), I'm getting this error message (see message under the code). Can anyone tell me what library I'm missing? This is for RTC 2.0.0.1. I have added just about every JAR under my Team Concert directory to the required libraries, but still no luck.
Thanks,
David
Error occurs on the return statement.
Error Message:
Access restriction: The method findAttribute(String) from the type ResolvedWorkItem is not accessible due to restriction on required library D:\<pathToTeamConcert>\jazz\client\eclipse\jazz\workitem\eclipse\plugins\com.ibm.team.workitem.client_2.0.1.I200909022001.jar
Thanks,
David
protected IAttribute getAttribute(String identifier) {
if (fWorkingCopy == null)
return null;
WorkItemUIWorkingCopy uiWorkingCopy= (WorkItemUIWorkingCopy) fWorkingCopy.getAdapter(IWorkItemUIWorkingCopy.class);
return uiWorkingCopy.getResolvedWorkItem().findAttribute(identifier)
}
Error occurs on the return statement.
Error Message:
Access restriction: The method findAttribute(String) from the type ResolvedWorkItem is not accessible due to restriction on required library D:\<pathToTeamConcert>\jazz\client\eclipse\jazz\workitem\eclipse\plugins\com.ibm.team.workitem.client_2.0.1.I200909022001.jar
2 answers
Access restriction: The method findAttribute(String) from the type
ResolvedWorkItem is not accessible due to restriction on required
library
D:\<pathToTeamConcert>\jazz\client\eclipse\jazz\workitem\eclipse\plugins\com.ibm.team.workitem.client_2.0.1.I200909022001.jar
As most of the code in the example uses internal API, you need to
configure your project settings to allow that:
Java Compiler -> Errors/Warnings -> Deprecated and restricted API
Discouraged reference (access rules): Change from Error to Warning
--
Regards,
Patrick
Jazz Work Item Team
As most of the code in the example uses internal API, you need to
configure your project settings to allow that:
Java Compiler -> Errors/Warnings -> Deprecated and restricted API
Discouraged reference (access rules): Change from Error to Warning
Patrick, "Discouraged reference" was already set to Warning; however, I also changed Forbidden reference from Error to Warning and that did the trick. I guess that's okay seeing as how this is for a plug-in, which you would expect to use internal APIs more than a non-plug-in project.
Thanks for pointing me in the right direction!
David