package org.reldb.relui.parts;

import javax.inject.Inject;
import javax.annotation.PostConstruct;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MenuDetectEvent;
import org.eclipse.swt.events.MenuDetectListener;
import org.eclipse.swt.widgets.Composite;

import org.reldb.relui.dbui.DbMain;
import org.reldb.relui.tools.MainPanel;

public class Main {
	@Inject
	public Main() {		
	}
	
	@PostConstruct
	public void postConstruct(Composite parent) {
		MainPanel mainPanel = new MainPanel(parent, SWT.None);
		mainPanel.addMenuDetectListener(new MenuDetectListener() {
			@Override
			public void menuDetected(MenuDetectEvent e) {
				System.out.println("Main: menu detected " + e);
			}
		});
		DbMain.setMainPanel(mainPanel);
	}

}
@@ -125,105 +125,8 @@
 WT;%0A
-import org.eclipse.swt.events.MenuDetectEvent;%0Aimport org.eclipse.swt.events.MenuDetectListener;%0A
 impo
@@ -163,16 +163,16 @@
 posite;%0A
+
 %0Aimport 
@@ -363,27 +363,27 @@
 %7B%0A%09%09
+Db
 Main
-Panel m
+.setM
 ainPanel
  = n
@@ -382,11 +382,9 @@
 anel
- = 
+(
 new 
@@ -414,227 +414,8 @@
 one)
-;%0A%09%09mainPanel.addMenuDetectListener(new MenuDetectListener() %7B%0A%09%09%09@Override%0A%09%09%09public void menuDetected(MenuDetectEvent e) %7B%0A%09%09%09%09System.out.println(%22Main: menu detected %22 + e);%0A%09%09%09%7D%0A%09%09%7D);%0A%09%09DbMain.setMainPanel(mainPanel
 );%0A%09

Work on RelUI