Custom Editor Presentations sample missing method, help?! Solved
In the wiki page for custom presentation development, the sample Star application uses a method call in addListeners() that is not found with the 3.0.1.1 sdk classes..
<code> private void addListeners() { PresentationHandlerManager mgr= (PresentationHandlerManager) getSite().getAdapter(PresentationHandlerManager.class); if (mgr != null) { mgr.addPresentationUpdater(fPresentationUpdater, getDescriptor()); } }</code>anyone know what this should be replaced with? it appears in some of the other code to be getPresentation(); |
4 answers
but I get an exception
java.lang.NoSuchMethodError: com.ca.extensions.DeliverableFromWorkitem.getPresentation()Lcom/ibm/team/workitem/common/internal/presentations/PresentationDescriptor; on that call. I find it interesting that this class is com/ibm/team/workitem/common/internal/ is not the same one where this method is defined. com/ibm/team/workitem/ide/ui/internal/presentations I restarted the test eclipse clean, but still see this same error |
the Star Sample fails the same after changing the getDescriptor() to getPresentation()
|
anybody? trying to run the samples on 3.0.1.1, it doesn't compile
and changing to what appears to be the same code in the official object type parts yields a 'no such function' exception.. yes, duh, its looking in the wrong class tree com/ibm/team/workitem/common/internal/ - not here instead of com/ibm/team/workitem/ide/ui/internal/presentations -- its here |
Resolution:
when I built the projects, both mine and the sample, I have V4 SDK selected as the plugin target platform. and altho I changed it, it did not actually change. (even tho the code compiled ok). when I changed it from 3.0.1.1 to 3.0.1, then suddenly everything reset. now the sample works and my code does not crash.. |
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.