imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/dialogs/LaunchIMakerDialog.java
author haismail <hussein.ismail@nokia.com>
Wed, 28 Apr 2010 13:50:48 +0300
changeset 11 217e69fc5beb
parent 0 61163b28edca
permissions -rw-r--r--
iMaker 3.1.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     1
/*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     3
* All rights reserved.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     4
* This component and the accompanying materials are made available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     6
* which accompanies this distribution, and is available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     8
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     9
* Initial Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    11
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    12
* Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    13
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    14
* Description:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    15
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    16
*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    17
package com.nokia.s60tools.imaker.internal.dialogs;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    18
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    19
import org.eclipse.jface.dialogs.IDialogConstants;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    20
import org.eclipse.jface.dialogs.TitleAreaDialog;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    21
import org.eclipse.jface.resource.ImageDescriptor;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    22
import org.eclipse.jface.viewers.ISelectionChangedListener;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    23
import org.eclipse.jface.viewers.SelectionChangedEvent;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    24
import org.eclipse.swt.SWT;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    25
import org.eclipse.swt.graphics.Image;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    26
import org.eclipse.swt.graphics.Point;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    27
import org.eclipse.swt.layout.GridData;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    28
import org.eclipse.swt.layout.GridLayout;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    29
import org.eclipse.swt.widgets.Button;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    30
import org.eclipse.swt.widgets.Composite;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    31
import org.eclipse.swt.widgets.Control;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    32
import org.eclipse.swt.widgets.Shell;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    33
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    34
import com.nokia.s60tools.imaker.IEnvironmentManager;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    35
import com.nokia.s60tools.imaker.IMakerPlugin;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    36
import com.nokia.s60tools.imaker.Messages;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    37
import com.nokia.s60tools.imaker.internal.managers.ProjectManager;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    38
import com.nokia.s60tools.imaker.internal.viewers.IMakerTabsViewer;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    39
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    40
public class LaunchIMakerDialog extends TitleAreaDialog {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    41
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    42
	/** Keep track of the currently visible dialog instance */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    43
	private static LaunchIMakerDialog fgCurrentlyVisibleLaunchIMakerDialog;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    44
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    45
	/** Id for 'Launch' button.*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    46
	protected static final int ID_LAUNCH_BUTTON = IDialogConstants.CLIENT_ID + 1;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    47
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    48
	/** Id for 'Close' button.*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    49
	protected static final int ID_CLOSE_BUTTON = IDialogConstants.CLIENT_ID + 2;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    50
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    51
	/** Id for 'Cancel' button.*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    52
	protected static final int ID_CANCEL_BUTTON = IDialogConstants.CLIENT_ID + 3;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    53
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    54
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    55
	 * Constant specifying how wide this dialog is allowed to get (as a percentage of
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    56
	 * total available screen width) as a result of tab labels in the edit area.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    57
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    58
	protected static final float MAX_DIALOG_WIDTH_PERCENT = 0.75f;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    59
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    60
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    61
	 * Constant specifying how tall this dialog is allowed to get (as a percentage of
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    62
	 * total available screen height) as a result of preferred tab size.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    63
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    64
	protected static final float MAX_DIALOG_HEIGHT_PERCENT = 0.60f;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    65
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    66
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    67
	 * Size of this dialog if there is no preference specifying a size.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    68
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    69
	protected static final Point DEFAULT_INITIAL_DIALOG_SIZE = new Point(540, 650); //(620, 690)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    70
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    71
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    72
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    73
	 * Returns the currently visible dialog
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    74
	 * @return the currently visible launch dialog
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    75
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    76
	public static LaunchIMakerDialog getCurrentlyVisibleLaunchConfigurationDialog() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    77
		return fgCurrentlyVisibleLaunchIMakerDialog;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    78
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    79
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    80
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    81
	 * Sets which launch dialog is currently the visible one
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    82
	 * @param dialog the dialog to set as the visible one
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    83
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    84
	public static void setCurrentlyVisibleLaunchConfigurationDialog(LaunchIMakerDialog dialog) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    85
		fgCurrentlyVisibleLaunchIMakerDialog = dialog;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    86
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    87
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    88
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    89
	 * widgets
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    90
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    91
	private IMakerTabsViewer fTabViewer;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    92
	private Image fBannerImage;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    93
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    94
	private Button runButton;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    95
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    96
	private IMakerTabsViewer imakerTabsViewer;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    97
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    98
	private ProjectManager projectManager;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    99
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   100
	private String filePath;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   101
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   102
	private IEnvironmentManager environmentManager;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   103
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   104
	public LaunchIMakerDialog(Shell parentShell, ProjectManager projectManager, IEnvironmentManager manager) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   105
		super(parentShell);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   106
		this.projectManager = projectManager;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   107
		this.environmentManager = manager;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   108
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   109
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   110
	public ProjectManager getProjectManager() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   111
		return projectManager;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   112
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   113
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   114
	@Override
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   115
	protected void configureShell(Shell shell) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   116
		super.configureShell(shell);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   117
		shell.setText(getShellTitle());
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   118
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   119
	private String getShellTitle() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   120
		return Messages.getString("Project.name");
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   121
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   122
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   123
	@Override
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   124
	protected Control createDialogArea(Composite parent) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   125
		Composite dialogComp = (Composite)super.createDialogArea(parent);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   126
		setTitle(Messages.getString("LaunchImakerDialog.title"));
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   127
		setMessage(Messages.getString("LaunchImakerDialog.message"));
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   128
		setImage();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   129
		
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   130
		addContent(dialogComp);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   131
		return dialogComp;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   132
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   133
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   134
	public void initialize() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   135
		getTabViewer().initialize();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   136
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   137
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   138
	 * Adds content to the dialog area
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   139
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   140
	 * @param dialogComp
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   141
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   142
	protected void addContent(Composite dialogComp) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   143
		GridData gd;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   144
		Composite topComp = new Composite(dialogComp, SWT.NONE);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   145
		gd = new GridData(GridData.FILL_BOTH);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   146
		topComp.setLayoutData(gd);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   147
		GridLayout topLayout = new GridLayout(1, false);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   148
		topComp.setLayout(topLayout);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   149
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   150
		Composite editAreaComp = createPreferenceEditArea(topComp);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   151
		gd = new GridData(GridData.FILL_BOTH);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   152
		editAreaComp.setLayoutData(gd);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   153
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   154
		dialogComp.layout(true);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   155
		initialize();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   156
		applyDialogFont(dialogComp);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   157
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   158
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   159
	private void setImage() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   160
		setTitleImage(getBannerImage());
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   161
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   162
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   163
	private Image getBannerImage() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   164
		if (fBannerImage == null) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   165
			ImageDescriptor descriptor = IMakerPlugin.getImageDescriptor("icons/imaker_dialog.png");
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   166
			if (descriptor != null) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   167
				fBannerImage = descriptor.createImage();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   168
			}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   169
		}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   170
		return fBannerImage;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   171
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   172
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   173
	private Composite createPreferenceEditArea(Composite parent) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   174
		imakerTabsViewer = new IMakerTabsViewer(parent,environmentManager, this);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   175
		setTabViewer(imakerTabsViewer);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   176
		getTabViewer().addSelectionChangedListener(new ISelectionChangedListener() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   177
			public void selectionChanged(SelectionChangedEvent event) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   178
//				handleTabSelectionChanged();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   179
			}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   180
		});
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   181
		return (Composite)getTabViewer().getControl();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   182
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   183
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   184
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   185
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   186
	 * A launch configuration dialog overrides this method
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   187
	 * to create a custom set of buttons in the button bar.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   188
	 * This dialog has 'Launch' and 'Cancel'
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   189
	 * buttons.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   190
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   191
	 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   192
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   193
	protected void createButtonsForButtonBar(Composite parent) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   194
		createButton(parent, IDialogConstants.OK_ID, Messages.getString("LaunchImakerDialog.run"), true);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   195
		createButton(parent, ID_CLOSE_BUTTON, Messages.getString("LaunchImakerDialog.close"), false);  
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   196
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   197
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   198
	public Button getRunButton() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   199
		return runButton;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   200
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   201
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   202
	 * Handle the 'close' & 'launch' buttons here, all others are handled
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   203
	 * in <code>Dialog</code>
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   204
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   205
	 * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   206
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   207
	protected void buttonPressed(int buttonId) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   208
		if (buttonId == IDialogConstants.OK_ID) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   209
			setFilePath(imakerTabsViewer.handleRunPressed());
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   210
			okPressed();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   211
		} else if (buttonId == ID_CLOSE_BUTTON) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   212
			cancelPressed();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   213
		} else {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   214
			super.buttonPressed(buttonId);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   215
		}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   216
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   217
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   218
	@Override
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   219
	protected Point getInitialSize() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   220
		return DEFAULT_INITIAL_DIALOG_SIZE;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   221
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   222
11
217e69fc5beb iMaker 3.1.0
haismail <hussein.ismail@nokia.com>
parents: 0
diff changeset
   223
	@Override
217e69fc5beb iMaker 3.1.0
haismail <hussein.ismail@nokia.com>
parents: 0
diff changeset
   224
	protected boolean isResizable() {
217e69fc5beb iMaker 3.1.0
haismail <hussein.ismail@nokia.com>
parents: 0
diff changeset
   225
		return true;
217e69fc5beb iMaker 3.1.0
haismail <hussein.ismail@nokia.com>
parents: 0
diff changeset
   226
	}
217e69fc5beb iMaker 3.1.0
haismail <hussein.ismail@nokia.com>
parents: 0
diff changeset
   227
217e69fc5beb iMaker 3.1.0
haismail <hussein.ismail@nokia.com>
parents: 0
diff changeset
   228
	
0
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   229
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   230
	 * Sets the viewer used to display the tabs for a launch configuration.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   231
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   232
	 * @param viewer the new view to set
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   233
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   234
	protected void setTabViewer(IMakerTabsViewer viewer) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   235
		fTabViewer = viewer;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   236
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   237
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   238
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   239
	 * Returns the viewer used to display the tabs for a launch configuration.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   240
	 * 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   241
	 * @return LaunchConfigurationTabGroupViewer
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   242
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   243
	protected IMakerTabsViewer getTabViewer() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   244
		return fTabViewer;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   245
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   246
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   247
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   248
	 * @param filePath the filePath to set
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   249
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   250
	public void setFilePath(String path) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   251
		this.filePath = path;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   252
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   253
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   254
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   255
	 * @return the filePath
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   256
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   257
	public String getFilePath() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   258
		return filePath;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   259
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   260
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   261
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   262
}