[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tptp] Re: Editing WidgetReg.xml file

Hi Gopal,
    As discussed in 
http://www.eclipse.org/tptp/test/documents/userguides/Intro-Auto-GUI-4-5-0.html#2.4, 
you must define the widget class name or the class name of the object 
returned by the getData() method of the widget and then define the method 
element properties that help to identify the corresponding widget.  For 
example:

<class name = "org.eclipse.debug.core.ILaunchConfigurationType" 
matchThreshold = "7.0">
  <method name = "getPluginIdentifier" weight = "0.2"/>
  <method name = "getSourcePathComputer" weight = "0.1"/>
  <method name = "getCategory" weight = "0.1"/>
  <method name = "getIdentifier" weight = "0.5"/>
</class>

If using the methods within the existing widget are insufficient to identify 
the widget at playback, you must extend the widget in your code and provide 
the necessary method(s) to identify the widget at playback.

Paul
"Gopal " <gopal.pagrut@xxxxxxxxxxx> wrote in message 
news:fcef2fe53495f058ae1036b73f6edac3$1@xxxxxxxxxxxxxxxxxx
> Hi all,
>
> I am getting the problem in AGR while playing back a script of "open 
> perspective" button on the tool bar.
>
> In Some doc, i read about the Adaptive widget resolver mechanism use to 
> resolved the  identification problem of widgets.According to them i have 
> added the following entry in the widgetReg.xml file for "open perspective" 
> button on the tool bar
> <class name = "org.eclipse.ui.internal.PerspectiveBarNewContributionItem" 
> matchThreshold = "1.0">
> <method name = "getData" weight = "1.0"/>
> </class>
>
> Then i restart my eclipse application and recorded a new script containing 
> the above "open perspective" button  but when i play back it again showing 
> the error message as:
>
> java.lang.reflect.InvocationTargetException
> null
> org.eclipse.core.runtime.CoreException: Line 13: Cannot locate menu item: 
> {{Other...}}-{{1.0}}
>  at ..........
>
>
> 1)Can anybody tell me the entry i have added to the xml file is right or 
> wrong?
> If wrong then please tell me a correct entry with explanation that how we 
> can decide the name of class and the methods?
>
> 2) and any thing else that i need to do to resolve the above problem
> Regards
> Gopal
>
>