package org.tizen.emulator.manager.ui.dialog;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
import org.tizen.emulator.manager.EmulatorManager;
import org.tizen.emulator.manager.logging.EMLogger;
+import org.tizen.emulator.manager.platform.ProfileList;
+import org.tizen.emulator.manager.plugin.EMPlugin;
import org.tizen.emulator.manager.resources.FilePathResources;
import org.tizen.emulator.manager.resources.ImageResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.tool.About;
import org.tizen.emulator.manager.ui.MainDialog;
import org.tizen.emulator.manager.ui.Messages;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
public class AboutDialog {
private static Shell dialog = null;
private static int height = 290; // 180 + 110
static {
About.initAboutContents();
- textContents = StringResources.NEW_LINE
- + Messages.getString("AboutDialog.0") //$NON-NLS-1$
- + StringResources.NEW_LINE + StringResources.NEW_LINE
- + Messages.getString("AboutDialog.2") + About.getInstance().getAboutVersion() //$NON-NLS-1$
+ textContents = Messages.getString("AboutDialog.2") + About.getInstance().getAboutVersion() //$NON-NLS-1$
+ StringResources.NEW_LINE
- + Messages.getString("AboutDialog.3") + About.getInstance().getBuildTime(); //$NON-NLS-1$
-
+ + Messages.getString("AboutDialog.3") + About.getInstance().getBuildTime()
+ + StringResources.NEW_LINE
+ + "Package Version: " + About.getInstance().getPackageVersion(); //$NON-NLS-1$
}
public static void open() {
okButton.setText(StringResources.OK);
okButton.setFocus();
okButton.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetSelected(SelectionEvent e) {
dialog.close();
}
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
}
});
"<a>" + FilePathResources.getTizenVmsPath() + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
workspace.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
workspace.addSelectionListener(new SelectionListener(){
+ @Override
public void widgetDefaultSelected(SelectionEvent arg0) {
}
+ @Override
public void widgetSelected(SelectionEvent arg0) {
try {
org.eclipse.swt.program.Program.launch(FilePathResources.getTizenVmsPath());
// link to tizen developer site
Link visit = new Link(textComposite, SWT.NONE);
visit.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false));
- visit.setText(StringResources.NEW_LINE + StringResources.NEW_LINE +
- Messages.getString("AboutDialog.8")); //$NON-NLS-1$
+ visit.setText(StringResources.NEW_LINE +
+ Messages.getString("AboutDialog.8")
+ + StringResources.NEW_LINE);
visit.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
visit.addSelectionListener(new SelectionListener(){
+ @Override
public void widgetDefaultSelected(SelectionEvent arg0) {
}
+ @Override
public void widgetSelected(SelectionEvent arg0) {
try {
String url = Messages.getString("AboutDialog.9"); //$NON-NLS-1$
}
}
});
+
+ Text plugin = new Text(textComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
+ plugin.setEditable(false);
+ String list = "";
+ for (EMPlugin p : ProfileList.getPluginList()) {
+ if (!list.isEmpty()) {
+ list = list + StringResources.NEW_LINE;
+ }
+ list = list + p.getPlatformName() + ": " + p.getPackageVersion();
+ }
+ plugin.setText(list);
+ plugin.setLayoutData(new GridData(270, 38));
}
private static GridLayout getGridLayout(int numColumns, boolean makeColumnEqualWidth) {
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.renewal.resources.ImageResources;
import org.tizen.emulator.manager.resources.StringResources;
+import org.tizen.emulator.manager.tool.About;
import org.tizen.emulator.manager.ui.renewal.tableviewer.AbstractTableViewer;
import org.tizen.emulator.manager.ui.renewal.tableviewer.VMListTableViewer;
import org.tizen.emulator.manager.vms.helper.CheckingRunningEmulator;
shell.setSize(WIDTH + frameX, HEIGHT + frameY);
- shell.setText(StringResources.MAIN_TITLE);
+ String title = StringResources.MAIN_TITLE;
+ String pkgVersion = About.getInstance().getPackageVersion();
+
+ if (pkgVersion != null) {
+ title = title + " (" + pkgVersion + ")";
+ }
+ shell.setText(title);
InputStream is = this.getClass().getClassLoader().getResourceAsStream(ICON_FILE_NAME);
if(is != null) {