[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-1329) code assist problem with cr1

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Thu Jan 31 14:06:04 EST 2008


    [ http://jira.jboss.com/jira/browse/JBIDE-1329?page=comments#action_12397716 ] 
            
Snjezana Peco commented on JBIDE-1329:
--------------------------------------

This issue isn't related to JBoss Tools, but to xulrunner.
It can be easily reproduced by calling  Eclipse with the arguments:

-nl tr
-nl tr_TR
or VM arguments
-Duser.language=tr

The method  nsIWebBrowser.addBrowserListener(nsISupports aListener, String aIID) doesn't work correctly when
aIID=nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID and when using the Turkish locale (tr).
The method works for all the locale I tried (Serbian - sr , Japan - ja, German - de, France - fr ...
) even for an invalid/non existing locale (for instance, 00).

The problem also exists in ATF. I have tried  to add  nsIWebProgressListener to Snippet260 and noticed the same behavior.
The problem exists on both Windows and Linux.
JBoss Tools beta2 works because it doesn't use xulrunner.

I have  two workarounds. They are the following :

1) using Browser.addProgressListener instead of nsIWebBrowser.addBrowserListener(nsISupports aListener, String aIID) as follows:

progressListener = new ProgressListener() {
      public void changed(ProgressEvent event) {}
      public void completed(ProgressEvent event) {
            onLoadWindow();
      }
};
browser.addProgressListener(progressListener);

XulRunnerBrowser uses only a completed state and this works correctly.
Line webBrowser.addWebBrowserListener(this, nsITooltipListener.NS_ITOOLTIPLISTENER_IID); can be removed
because XulRunnerBrowser doesn't use the tooltip listener.

Eclipse's mozilla uses nsIWebBrowser.addBrowserListener(nsISupports aListener, String aIID) that works well.
I propose this workaround.

2) changing the XulRunnerBrowser constructor so it checks if  locale is tr, and if it is, temporarily sets it to English as follows:

public XulRunnerBrowser(Composite parent) throws XulRunnerException {
        Locale locale = Locale.getDefault();
        try {
            if (locale.getLanguage().equals("tr")) {
                Locale newLocale = Locale.ENGLISH;
                Locale.setDefault(newLocale);
            }
            ... XulRunner constructor
        } finally {
            Locale.setDefault(locale);
        }
    }

Since xulrunner isn't localized to Turkish, this will work correctly.
I propose this method only if the complete nsIWebProgressListener is necessary.


> code assist problem with cr1
> ----------------------------
>
>                 Key: JBIDE-1329
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-1329
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jsp/jsf/xml source editing
>    Affects Versions: 2.0.0.CR1
>         Environment: Win 2003
>            Reporter: Murat HAZER
>         Assigned To: Sergey Vasilyev
>             Fix For: 2.1
>
>         Attachments: conf_detail, jbosstools-diagnostics-20071119153035.zip, jbosstools.GIF, LOCALE_TEST.zip, Picture 1.png
>
>
> i tried to migrate beta 2 to cr1 but code completion/assist doesn't work with facelets xhtml pages... pages include seam, richfaces, facelets and ajax4jsf components...

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

        



More information about the jbosstools-issues mailing list