It's all about the answers!

Ask a question

How to add new button on Work-item version 4.0.3 ?


Yehiel Glass (25528686) | asked Dec 22 '13, 5:04 a.m.

Hello,

I need to add new button to the Work-item template.

I tried follow the instructions of : https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations

but got errors like in https://jazz.net/forum/questions/99652/contributing-attribute-presentations-v4?page=1&focusedAnswerId=136887#136887
I think it because of incompatible versions.

How can I add a button to Work-item version 4.0.3 ?

Thanks,
Yehiel


Comments
sam detweiler commented Dec 22 '13, 8:37 a.m.

thats a development time warning, not runtime. 
have u tried your plugin yet? does it work?


Yehiel Glass commented Dec 22 '13, 11:00 a.m.

I have one error there , So I can't run the plugin ...


The method getDescriptor() is undefined for the type StarAttributePart


sam detweiler commented Dec 22 '13, 11:45 a.m.

yep, sorry, see that

in 3.x the api is PresentationPart.getDescriptor();
        public PresentationDescriptor getDescriptor() {

in 4.x the api changed to PresentationPart.getPresentation();
        public PresentationDescriptor getPresentation() {


Yehiel Glass commented Dec 23 '13, 8:23 a.m.

Thanks for your answer - it fixed the error, but when exporting to jar I get the following errors:


# Eclipse Compiler for Java(TM) 0.B83_R36x_J7, 3.6.2+ Java7, Copyright IBM Corp 2000, 2012. All rights reserved.
----------
1. WARNING in C:\RTC403Dev\workspaces\Dev3\WS\com.ibm.team.workitem.example.ide.ui\src\com\ibm\team\workitem\example\ide\ui\StarAttributePart.java (at line 32)
 import com.ibm.team.workitem.client.internal.util.ResolvedWorkItem;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Discouraged access: The type ResolvedWorkItem is not accessible due to restriction on classpath entry C:\RTC403Dev\installs\rtc-sdk\plugins\com.ibm.team.workitem.client_3.1.500.v20130501_0315.jar

ans so on ...


sam detweiler commented Dec 23 '13, 8:51 a.m.

yes, those are warnings. I don't know why they used Internal APIs for these samples..

Be the first one to answer this question!


Register or to post your answer.