From 41ac47d732eed8392d60d0f6773e5a279d49b999 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 12 Dec 2013 13:36:50 +0100 Subject: initial commit of Enea Linux 3.1 Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau --- .../remotetools/actions/SimpleSettingDialog.java | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SimpleSettingDialog.java (limited to 'plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SimpleSettingDialog.java') diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SimpleSettingDialog.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SimpleSettingDialog.java new file mode 100644 index 0000000..140d892 --- /dev/null +++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SimpleSettingDialog.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2010 Intel Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Intel - initial API and implementation + *******************************************************************************/ +package org.yocto.sdk.remotetools.actions; + +import org.yocto.sdk.remotetools.Activator; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; + +public class SimpleSettingDialog extends BaseSettingDialog { + + private final String connPropName; + /* + protected SimpleSettingDialog(Shell parentShell, String title, String conn) { + super(parentShell,title,conn); + } + */ + + public SimpleSettingDialog(Shell parentShell, String title, String connPropertyName) { + super(parentShell, + title, + Activator.getDefault().getDialogSettings().get(connPropertyName) + ); + connPropName=connPropertyName; + } + + @Override + protected Control createDialogArea(Composite parent) { + return super.createDialogArea(parent); + } + + @Override + protected void okPressed() { + IDialogSettings settings = Activator.getDefault().getDialogSettings(); + // store the value of the generate sections checkbox + if(getCurrentConnection()==null) { + settings.put(connPropName, + (String)null); + }else { + settings.put(connPropName, + getCurrentConnection().getAliasName()); + } + super.okPressed(); + } +} -- cgit v1.2.3-54-g00ecf