Community
Participate
Working Groups
Created attachment 266521 [details] RAD extend welcome page We recently moved from Eclipse 4.4.2 to Eclipse Neon 4.6.2 in our IBM Rational Development Product (RAD). We see an issue with existing welcome page. It shows with duplicated icons and empty labels. This is only on the home page with all themes. All Welcome pages worked perfectly with the Eclipse version 4.4.2. I am wondering if this issue caused with changes in the latest Eclipse version 4.6.2. Please see the attached. We have tried adding the below flag to our eclipse.ini file and we saw the label issue has been resolved and we saw the text shows under each icons, but we still see duplicated icons. -Dorg.eclipse.swt.browser.IEVersion=7000 Maybe the duplicated icons issue is related to the browser since the flag fixed part of the issue? I also checked the Welcome pages for the Eclipse Version: Neon.2 Release (4.6.2) and I see some issues with icons and test formatting when I changed the page theme to Circles, Purple Mesh and Slate. I am not sure, if this issue caused the duplicate icons in our extended Welcome page.
Created attachment 266522 [details] Welcome Page Neon.2 Release (4.6.2)
The HTML generated should be unchanged for any themes other than the Solstice theme. If you run with the Intro Debug preference: org.eclipse.ui.intro/debug=true org.eclipse.ui.intro/debug/toolbar=true a little 'book' should appear in the Welcome/Intro toolbar allowing you to open the generated HTML in your browser. It would help if you could provide details on your IE. IE < 11 is now deprecated and unsupported by Microsoft. Could you please do the following: - Ctrl-3 to open the Quick Access - type "internal web browser" and open the Internal Web Browser view - navigate to https://www.whatismybrowser.com - take a screenshot and attach it here
Another thing to add: IE seems particularly sensitive to different `compatibility` settings. There's some pointers and details on bug 497924.
I moved and created a new bugzilla in the internal site. Here is the new URL https://bugs.ottawa.ibm.com/show_bug.cgi?id=130800
Hi Brain, Thanks for your response. We checked the browser and it is IE 11. please see the attached screen shot. We also tested with the same browser with the older Eclipse 4.4.2 and it works. Please see "browser.png" file. I don't think the issue is from the browser. We also ran throw the debugger and checked the generated HTML in chrome devtools. We saw 2 image tags shows in the html file. Please see attached "html-file with Eclipse Neon 4.6.2.png" file. We also debugged and test the generated HTML file with the older Eclipse 4.4.2 and the HTML shows one image tag, see attach "html-file with Eclipse 4.4.2.png" file I think the changes in the latest Eclipse Neon caused to duplicate the images tags in the html.
Created attachment 266565 [details] IE 11 browser
Created attachment 266566 [details] html-file with Eclipse Neon 4.6.2
Created attachment 266567 [details] html-file with Eclipse 4.4.2
Puzzling. You're going to have to dig into it locally as I'm unable to reproduce it. A starting point is IntroModelRoot#loadPages() and see where that leads.
(In reply to Brian de Alwis from comment #9) > Puzzling. You're going to have to dig into it locally as I'm unable to > reproduce it. A starting point is IntroModelRoot#loadPages() and see where > that leads. It seems this problem looks specific to welcome page themes, it doesn't exists with 'Solstice' theme which is default but can be seen with other themes options: Circles, Purple Mesh and Slate.
The issue of Eclipse welcome page Neon Release (4.6.2) that I reported is seems like from the specific 'Circles', 'Purple Mesh' and 'Slate' themes. The default 'Solstice' theme displays correctly. The other issue related to duplicated icons and empty labels can be happened with all RAD extend welcome page themes and the default theme. All themes navigation-links icons displays with duplicated icons and empty labels. As you see below example html file, the <img> tag is created 2 times for each link in navigation that caused duplicated icons. <div id="navigation-links"> <div id="page-links"> <a id="firststeps" href="http://org.eclipse.ui.intro/showPage?id=firststeps" class="left"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="First Steps" id="firststeps_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">First Steps</span> <p><span class="text">Take your first steps</span></p> </a> <a id="tutorials" href="http://org.eclipse.ui.intro/showPage?id=tutorials" class="left"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="Tutorials" id="tutorials_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">Tutorials</span> <p><span class="text">Go through tutorials</span></p> </a> <a id="overview" href="http://org.eclipse.ui.intro/showPage?id=overview" class="left"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="Overview" id="overview_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">Overview</span> <p><span class="text">Get an overview of the features</span></p> </a> <a id="samples" href="http://org.eclipse.ui.intro/showPage?id=samples" class="right"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="Samples" id="samples_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">Samples</span> <p><span class="text">Try out the samples</span></p> </a> <a id="whatsnew" href="http://org.eclipse.ui.intro/showPage?id=whatsnew" class="right"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="What's New" id="whatsnew_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">What's New</span> <p><span class="text">Find out what is new</span></p> </a> <a id="webresources" href="http://org.eclipse.ui.intro/showPage?id=webresources" class="right"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="Web Resources" id="webresources_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">Web Resources</span> <p><span class="text">Read more on the Web</span></p> </a> <a id="migrate" href="http://org.eclipse.ui.intro/showPage?id=migrate" class="right"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="Migrate" id="migrate_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">Migrate</span> <p><span class="text">Migrate to the new release</span></p> </a> <a id="workbench" href="http://org.eclipse.ui.intro/switchToLaunchBar" class="right"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="Go to the workbench" id="workbench_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">Workbench</span> <p><span class="text">Go to the workbench</span></p> </a> </div> <div id="action-links"> <a id="workbench" href="http://org.eclipse.ui.intro/switchToLaunchBar" class=""> <img src="file:///C:/Users/Bahram Sanaei/IBM/rationalsdp/workspace/org.eclipse.ui.intro/icons/blank.gif" alt="" class="background-image"> <div class="link-extra-div"></div> <span class="link-label">Workbench</span> <p><span class="text">Go to the workbench</span></p> </a> </div> </div>
Hmm, those `<img class="content-ing">` images are strange. Looking through the code, I see they're generated in UniversalIntroConfigurer if in High Contrast mode in createNavLink().
The culprit seems to be IntroHTMLGenerator#generateIntroLink() with high-contrast mode: // add <IMG src="blank.gif"> String blankImageURL = BundleUtil.getResolvedResourceLocation(IIntroHTMLConstants.IMAGE_SRC_BLANK, IIntroConstants.PLUGIN_ID); if (blankImageURL != null) { * anchor1.addContent(generateImageElement(blankImageURL, null, null, IIntroHTMLConstants.IMAGE_CLASS_BG, indentBase + 1)); } // add link image, if one is specified if (element.getImg() != null) { HTMLElement img = generateIntroElement(element.getImg(), indentBase + 1); if (img != null) * anchor1.addContent(img); } where I've marked the two lines adding an image. Does this happen if you run from a deployed standalone application (outside of the debugger)? It's possible this may be due to commit 2c355fd from bug 490678.
> Does this happen if you run from a deployed standalone application (outside > of the debugger)? Yes. I commented out one of the if statement that Brain mentioned in Comment 13 and the duplicated icons issue has been fixed, but I still see the empty label under each icon and Icon display formatting in 'Circles' and 'Slate' themes. Please see attached "Welcome Page format and label issues.png" file
Created attachment 266624 [details] Welcome Page format and label issues
What is the plan for fixing this issue? Thanks.
You haven't confirmed whether you're running in high-contrast mode, though it doesn't look like it from your screenshots. I'm unable to reproduce the issue. We welcome quality patches.
Hi Brain, Yes, I tried with high-contrast mode and I still see the same issue. I fixed the duplicated Icons by changing 2 if statements that you mentioned in Comment 13 to if and else if statement like that: // add <IMG src="blank.gif"> String blankImageURL = BundleUtil.getResolvedResourceLocation(IIntroHTMLConstants.IMAGE_SRC_BLANK, IIntroConstants.PLUGIN_ID); if (blankImageURL != null) { anchor1.addContent(generateImageElement(blankImageURL, null, null, IIntroHTMLConstants.IMAGE_CLASS_BG, indentBase + 1)); } // add link image, if one is specified else if (element.getImg() != null) { HTMLElement img = generateIntroElement(element.getImg(), indentBase + 1); if (img != null) anchor1.addContent(img); } I also fixed the icon formatting in 'Circles' theme by inserting the following 2 lines at the end of the eclipse.ini -Dorg.eclipse.swt.browser.DefaultType=ie -Dorg.eclipse.swt.browser.IEVersion=default Please let me know do I have to provide that patch? Thanks.
Hi Bahram. Could you clear up one thing please: are you seeing this doubling when running in normal / low-contrast mode? Your original screenshots don't look like they were taken in high-contrast mode.
Created attachment 267840 [details] high contrast settings-window10
Hi Brain, Thanks for your response. I am seeing this doubling when I am running in normal on window, Mac and Linux. When I changed to "high contrast settings" on window, I don't see the duplicated Icons anymore. All of my previous attachment has been taken in normal (high contrast settings was off) Please see the latest attachment "high contrast settings-window10.jpg" It shows with the high contrast on window 10 that I don't see duplicated Icons. That's mean the duplicated icons is shown when you set to normal. I modified HTMLElement generateIntroLink() code like that in order to fix duplicated Icon in normal mode on window, Mac and Linux. // add link image, if one is specified Toolkit toolkit = Toolkit.getDefaultToolkit(); Boolean highContrast = (Boolean)toolkit.getDesktopProperty( "win.highContrast.on" ); if (highContrast != null) if (highContrast && element.getImg() != null) { HTMLElement img = generateIntroElement(element.getImg(), indentBase + 1); if (img != null) anchor1.addContent(img); }
I raised the Importance of this issue to critical, because we got many complaints from our customers and we also need to have new release. We need to have the fix for this issue. Thanks
Hi Brain, Did you see my last comment? are you providing the patch or you would like I provide the change I showed in my last comment. Thanks.
Please provide a patch, Bahram: https://wiki.eclipse.org/Platform_UI/How_to_Contribute#Creating_a_Gerrit_review_or_a_patch Please be sure to try reproducing the problem with the Eclipse SDK 4.6.3: http://download.eclipse.org/eclipse/downloads/index.html I'm concerned as I cannot reproduce your issue with a stock Eclipse SDK on my Windows test environment in (normal) low-contrast mode.
Created attachment 268016 [details] Welcome page example project with the duplicated icons and lables Hi Brain, I created an example project on Eclipse SDK 4.6.3 with some of our code and I could reproduce the issue with Eclipse 4.6.3. You can try that by importing the attached WelcomePage.zip file and try to run it. you will see both duplicated icons and labels. 1. Import attach WelcomePage.zip file. The zip file has two plug-ins. 'com.example.welcome' that I created with some of our code that extended to the eclipse welcome page and 'org.eclipse.ui.intro' that it has my fixes for duplicated icons in IntroHTMLGenerator.java file. 2. Open the /META-INF/Example.product and click on "Launch an Eclipse Application" 3. If you get an error, then open Run Configuration, go to plug-ins tab and add Required plug-ins by selecting 'com.example.welcome' plugin and all Target Platform plugins (don't select 'org.elcipse.ui.intro'). You will see all duplicate icons and duplicated labels (one label is empty the other show text outside of the label border) If you add the 'org.elcipse.ui.intro' plugin during Run Configuration that has my changes, then you see my changes fixed the duplicated icons, but I cloud not fix duplicate labels and I am not sure where I need to find the code that generate duplicate labels. Do you have any through about fix for duplicated label? What do you think now? If you are not concerned on reproduce the issue any more, then I can provide my patch for the review. Thanks.
New Gerrit change created: https://git.eclipse.org/r/95918
Created attachment 268100 [details] Welcome page example project with the duplicated icons and lables Hi Brain, Please try this version of new WelcomePage.zip file. It should shows all duplicated Icons. Thanks.
Aha! The issue arises from changes from bug 466370 where we needed to introduce a new root-like page. By way of background: the UniversalIntroConfigurer is responsible for assembling a model of the intro content. Some of the intro content is computed, such as "page-links" which is a list of the available pages to be shown. This page-links is generated in UniversalIntroConfigurer#getGroupChildren(). #getGroupChildren() generates two forms of page-links, depending on whether the page was a root page (the main page) or a non-root page. Page links on root pages have icons and page descriptions, where as page links on non-root pages have a list of the page titles and little else. (For specifics, contrast #createNavLink() and #createRootLink()). The UniversalIntroConfigurer used hard-coded pageIds to determine which to use (i.e., if pageId == 'root' or 'standby'). For the work in bug 466370, we needed to introduce a new alternative 'root' page to how the 'quick-link' content. But as we couldn't just redefine the 'root' page, since it was in use by numerous existing apps, we introduced a new alternative root-like page called 'qroot'. We changed the UniversalIntroConfigurer to treat a page as root-like if it had pageId 'root', 'standby', **or** if it was the configured start or home page. Your example sets the start and home page to your my_home_page: org.eclipse.ui.intro/INTRO_START_PAGE = my_home_page org.eclipse.ui.intro/INTRO_HOME_PAGE = my_home_page and thus the page-links section is being generated for root pages, whereas prior to Neon/4.6 it would have been generated as a non-root page (since the pageId != 'root' or 'standby'). Here is the page-links as generated for root-pages: <a id="overview" href="http://org.eclipse.ui.intro/showPage?id=overview" class="left"> <img src="file:/.../icons/blank.gif" alt="" class="background-image"> <img src="file:/.../icons/blank.gif" alt="Overview" id="overview_img" title="" class="content-img"> <div class="link-extra-div"></div> <span class="link-label">Overview</span> <p><span class="text">Get an overview of the features</span></p> </a> And here is a page-link as generated for a non-root page: <a href="http://org.eclipse.ui.intro/showPage?id=overview" class="left nav_link1" id="overview"> <img src="file:/.../icons/blank.gif" alt="" class="background-image"> <div class="link-extra-div"></div> <span class="link-label">Overview</span> </a> You'll need to fix up your CSS to hide these <img class="content-img"> and <p> elements. I failed to document this root-like change in the Neon migration guide and will do so.
New Gerrit change created: https://git.eclipse.org/r/96896
Gerrit change https://git.eclipse.org/r/96896 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.common.git/commit/?id=94e836808d3c3bfbc36eb0c7a721ea2160a845a8
Hi Brain, Thanks again for you investigation!. I don't think the issue is from our CSS files. If you think the issue is from CSS file, then should be "$theme$/html/overview.css" file. I created new project that it does not contain any of our CSS files. It just has every thing from Eclipse and eclipse overwiew.css file. I still see the Icons and labels problem. Please try the latest attached file "WelcomePageIssueWithEclipse46.zip" that has it demonstrates the issue with the org.eclipse.ui.intro plugin I created the my_home_page.xml for switchToLaunchBar using "$theme$/html/overview.css" <page style="$theme$/html/overview.css" id="my_home_page" style-id="page"> <title style-id="intro-header">Welcome</title> <group id="extra-group1" filteredFrom="swt"/> <!--<include path="overview/navigation-links"/>--> <!-- navigation --> <group id="navigation-links" filteredFrom="swt"> <group id="page-links" computed="true"> </group> <group id="action-links"> <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Workbench" id="workbench" style-id="$high-contrast$"> <text>Go to the workbench</text> </link> </group> </group> </page> You can also based on your comment about the root pages and no root pages. I tested home page with just setting "rg.eclipse.ui.intro/INTRO_HOME_PAGE" in my plugin_customization.ini like that org.eclipse.ui.intro/INTRO_HOME_PAGE = my_home_page and I removed the "org.eclipse.ui.intro/INTRO_START_PAGE". I still see the issue. I see the best fix for the issue is the Gerrit change that I created. Please review again and let me know if there is any better solution inside Eclipse code. I will reopen this bug again because my latest project demonstrated the issue can not be in our CSS code. Thanks.
Created attachment 268316 [details] WelcomePageIssueWithEclipse46.zip
Bahram, the pages specified as either the INTRO_HOME_PAGE or INTRO_START_PAGE are now treated like a _root_ page. Previously the Welcome/Intro support only considered pages with id `root` or `standby` as root pages. So the fact that you're setting my_home_page as the `home` page means that it is now treated like a root page. You need some additional rules in your CSS to hide the additional information shown on your root-like my_home_page. Put something like the following in your my_home.css: /* Hide additional page-links content shown on root-like pages */ #navigation-links #page-links a img.content-img, #navigation-links #page-links a p { display:none; }
Verified help additions appear in migration guide.