Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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

0 votes



2 answers

Permanent link
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

0 votes


Permanent link

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

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Oct 05 '09, 11:42 a.m.

Question was seen: 5,672 times

Last updated: Oct 05 '09, 11:42 a.m.

Confirmation Cancel Confirm