Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 500631

Summary: Red Hat linux: The icons doesn't appear in User Interface after running the program
Product: [Eclipse Project] Platform Reporter: Swanand Nagarkar <swanand.nagarkar>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill, lufimtse, niraj.modi
Version: 4.6Keywords: triaged
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Whiteboard:

Description Swanand Nagarkar CLA 2016-09-01 03:11:27 EDT
Hi,

In Red-hat-linux.

Inside Plug-in development project, after running the project , the icons didn't appear in UI. I am using SWT for UI development.I tried on Eclipse 3.8 version also , Still it gives same error.

Here is my code:

import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Decorations;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;

public class MenuBasedApplication {
	
	public MenuBasedApplication(Display display){
		
		Shell shell = new Shell(display);
        shell.setLayout(new RowLayout());
        shell.setText("Photo Application");
        shell.setSize(500, 500);
        
        //creating a menu
        Composite composite = new Composite(shell, SWT.NONE); 
        GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 1;
        composite.setLayout(gridLayout);
        
        Menu menu = new Menu(shell,SWT.BAR); //root menu bar

        MenuItem menuItem = new MenuItem(menu,SWT.CASCADE); //adding a menu item to hold each drop-down menu
        menuItem.setText("Menu");
   
        Menu fileMenu = new Menu(menuItem);
      
        MenuItem menuItem1 = new MenuItem(fileMenu, SWT.PUSH);
   
        menuItem1.setText("ADD");
        menuItem1.setImage(Display.getDefault().getSystemImage(SWT.ICON_WORKING));
        
        MenuItem menuItem2 = new MenuItem(fileMenu,SWT.PUSH);
        menuItem2.setText("RMB");
        menuItem2.setImage(Display.getDefault().getSystemImage(SWT.ICON_WORKING));
        
        menuItem.setMenu(fileMenu);
        
        shell.setMenuBar(menu);
        shell.pack();
        shell.open();

        while (!shell.isDisposed()) {
            if (!display.readAndDispatch())
                display.sleep();
        }
		
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		 Display display = new Display();
		 MenuBasedApplication m = new MenuBasedApplication(display);
		 display.dispose();
		
	}

}



Actual Results:
The icons are not appearing inside menu

Expected Results:
The icons should appear inside menu

Build Data and Hardware:
Build 2016-09-01 on Red Hat Linux Enterprise Workstation release 6.5 (Santiago)
Comment 1 Vikas Chandra CLA 2016-09-01 04:40:17 EDT
This doesnt look like a bug but more like a scenario where you need help. You can check at eclipse forums for this.

However I will move this to SWT.
Comment 2 Vikas Chandra CLA 2016-09-01 13:08:47 EDT
*** Bug 500630 has been marked as a duplicate of this bug. ***
Comment 3 Swanand Nagarkar CLA 2016-09-02 01:10:08 EDT
I have re-categorized this. This is a bug as it works on other platforms like Windows and Suse. Issue looks very specific to RedHat Linux 12. Please try uploaded sample on redhat12 or bring up IDE on redhat12.
Comment 4 Alexander Kurtakov CLA 2016-09-02 03:14:59 EDT
Is this Eclipse/SWT 3.8 really? If yes please try with 4.6 - in this version the menu widget was reimplemented in a way allowing icons to be always visible and to allow having checkbox and icon to the same menu. But the change is too big for backporting.
Comment 5 Swanand Nagarkar CLA 2016-09-06 00:32:33 EDT
Hi,
I have checked with Eclipse version 4.6.This bug exists in 4.6 version also.
Comment 6 Eric Williams CLA 2017-03-14 11:39:20 EDT
I cannot reproduce this issue on Fedora, GTK3.22.
Comment 7 Eric Williams CLA 2018-03-23 10:38:46 EDT
Still can't reproduce the issue: closing the ticket as there has been no response in over a year.