[jbosstools-issues] [JBoss JIRA] Resolved: (JBIDE-6393) Create generic queryInterface method

Yahor Radtsevich (JIRA) jira-events at lists.jboss.org
Tue Jun 1 00:56:51 EDT 2010


     [ https://jira.jboss.org/browse/JBIDE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yahor Radtsevich resolved JBIDE-6393.
-------------------------------------

    Resolution: Done


RESOLVED

- Methods queryInterface, getSupportedInterfaces and some related have been created in org.jboss.tools.vpe.xulrunner.util.XPCOM .
- All references to org.mozilla.interfaces.nsISupports.queryInterface(String) have been replaced by the references to the new method.
- JUnit for new org.jboss.tools.vpe.xulrunner.util.XPCOM methods has been created.
- JUnit tests for org.jboss.tools.vpe.xulrunner plug-in have been refactored.

> Create generic queryInterface method
> ------------------------------------
>
>                 Key: JBIDE-6393
>                 URL: https://jira.jboss.org/browse/JBIDE-6393
>             Project: Tools (JBoss Tools)
>          Issue Type: Task
>          Components: Visual Page Editor core
>    Affects Versions: 3.2.0.M1
>            Reporter: Yahor Radtsevich
>            Assignee: Yahor Radtsevich
>             Fix For: 3.2.0.M1
>
>
> Our current approach to cast XULRunner types is to use nsISupports.queryInterface(String). Typical code using this method:
>    nsIDOMMouseEvent mouseEvent = (nsIDOMMouseEvent) event
>       .queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
> These long boilerplate calls are always look the same and they are far from object-oriented approach.
> An object-oriented generic method is needed. It should look like the following:
>    <T extends nsISupports> T queryInterface(nsISupports object,	Class<T> type)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list