lttng: Add a diagram showing the dependencies between plugins
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / dialogs / ImportConfirmationDialog.java
index 75b035c467c18cb862c6ec32d63d6407eeff9bd6..f66c5d293a71bb664da8b8816f2eb93ec4687998 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
- * Copyright (c) 2012 Ericsson
- * 
+ * Copyright (c) 2012, 2013 Ericsson
+ *
  * 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: 
+ *
+ * Contributors:
  *   Bernd Hufmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs;
@@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Text;
  * <p>
  * Dialog box for collecting session creation information.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class ImportConfirmationDialog extends Dialog implements IImportConfirmationDialog {
@@ -49,10 +49,6 @@ public class ImportConfirmationDialog extends Dialog implements IImportConfirmat
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
-    /**
-     * The dialog composite.
-     */
-    private Composite fDialogComposite = null;
     /**
      * The radio button for selecting the overwrite action
      */
@@ -66,7 +62,7 @@ public class ImportConfirmationDialog extends Dialog implements IImportConfirmat
      */
     private Text fNewTraceNameText = null;
     /**
-     * The trace name which already exists in the project 
+     * The trace name which already exists in the project
      */
     private String fTraceName = null;
     /**
@@ -87,34 +83,23 @@ public class ImportConfirmationDialog extends Dialog implements IImportConfirmat
      */
     public ImportConfirmationDialog(Shell shell) {
         super(shell);
-        setShellStyle(SWT.RESIZE);
+        setShellStyle(SWT.RESIZE | getShellStyle());
     }
 
     // ------------------------------------------------------------------------
     // Accessors
     // ------------------------------------------------------------------------
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#setTraceName(java.lang.String)
-     */
+
     @Override
     public void setTraceName(String name) {
         fTraceName = name;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#getNewTraceName()
-     */
     @Override
     public String getNewTraceName() {
         return fNewTraceName;
     }
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#isOverwrite()
-     */
+
     @Override
     public boolean isOverwrite() {
         return fIsOverride;
@@ -123,10 +108,7 @@ public class ImportConfirmationDialog extends Dialog implements IImportConfirmat
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
-     */
+
     @Override
     protected void configureShell(Shell newShell) {
         super.configureShell(newShell);
@@ -134,25 +116,21 @@ public class ImportConfirmationDialog extends Dialog implements IImportConfirmat
         newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE));
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
-     */
     @Override
     protected Control createDialogArea(Composite parent) {
-        
+
         // Main dialog panel
-        fDialogComposite = new Composite(parent, SWT.NONE);
+       Composite dialogComposite = new Composite(parent, SWT.NONE);
         GridLayout layout = new GridLayout(1, true);
-        fDialogComposite.setLayout(layout);
-        fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+        dialogComposite.setLayout(layout);
+        dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
 
-        Label sessionNameLabel = new Label(fDialogComposite, SWT.RIGHT);
+        Label sessionNameLabel = new Label(dialogComposite, SWT.RIGHT);
         sessionNameLabel.setText(Messages.TraceControl_ImportDialogTraceAlreadyExistError + ": " + fTraceName); //$NON-NLS-1$
 
-        fOverwriteButton = new Button(fDialogComposite, SWT.RADIO);
+        fOverwriteButton = new Button(dialogComposite, SWT.RADIO);
         fOverwriteButton.setText(Messages.TraceControl_ImportDialogConfirmationOverwriteLabel);
-        
+
         fOverwriteButton.addSelectionListener(new SelectionAdapter() {
             @Override
             public void widgetSelected(SelectionEvent e) {
@@ -160,50 +138,42 @@ public class ImportConfirmationDialog extends Dialog implements IImportConfirmat
                 fNewTraceNameText.setText(fTraceName);
             }
         });
-        
-        fRenameButton = new Button(fDialogComposite, SWT.RADIO);
+
+        fRenameButton = new Button(dialogComposite, SWT.RADIO);
         fRenameButton.setText(Messages.TraceControl_ImportDialogConfirmationRenameLabel);
-        
+
         fRenameButton.addSelectionListener(new SelectionAdapter() {
             @Override
             public void widgetSelected(SelectionEvent e) {
                 fNewTraceNameText.setEnabled(true);
             }
         });
-        
-        fNewTraceNameText = new Text(fDialogComposite, SWT.NONE);
+
+        fNewTraceNameText = new Text(dialogComposite, SWT.NONE);
         fNewTraceNameText.setToolTipText(Messages.TraceControl_ImportDialogConfirmationNewNameLabel);
         fNewTraceNameText.setText(fTraceName);
 
         // Default
         fOverwriteButton.setSelection(true);
         fNewTraceNameText.setEnabled(false);
-        
+
 
         // layout widgets
         GridData data = new GridData(GridData.FILL_HORIZONTAL);
-        
+
         fNewTraceNameText.setLayoutData(data);
 
         getShell().setMinimumSize(new Point(300, 150));
-        
-        return fDialogComposite;
+
+        return dialogComposite;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
-     */
     @Override
     protected void createButtonsForButtonBar(Composite parent) {
         createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
         createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.dialogs.Dialog#okPressed()
-     */
     @Override
     protected void okPressed() {
 
This page took 0.029106 seconds and 5 git commands to generate.