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 / AddContextDialog.java
index cc7f698b58401a621e0eba044a057e51960dc909..a560219f62c261b7903d87bf794bc524fa9c7e23 100644 (file)
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2014 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -56,11 +56,6 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
     // Attributes
     // ------------------------------------------------------------------------
 
-    /**
-     * The dialog composite.
-     */
-    private Composite fDialogComposite;
-
     /**
      * A tree viewer for displaying and selection of available contexts.
      */
@@ -74,7 +69,7 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
     /**
      * The contexts to add.
      */
-    private final List<String> fSelectedContexts = new ArrayList<String>();
+    private final List<String> fSelectedContexts = new ArrayList<>();
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -86,7 +81,7 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
      */
     public AddContextDialog(Shell shell) {
         super(shell);
-        setShellStyle(SWT.RESIZE);
+        setShellStyle(SWT.RESIZE | getShellStyle());
     }
 
     // ------------------------------------------------------------------------
@@ -100,7 +95,7 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
 
     @Override
     public List<String> getContexts() {
-        List<String> ret = new ArrayList<String>();
+        List<String> ret = new ArrayList<>();
         ret.addAll(fSelectedContexts);
         return ret;
     }
@@ -120,13 +115,13 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
     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));
 
         // Contexts list
-        Group contextGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+        Group contextGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
         contextGroup.setText(Messages.TraceControl_AddContextAvailableContextsLabel);
         layout = new GridLayout(1, true);
         contextGroup.setLayout(layout);
@@ -143,7 +138,7 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
 
         getShell().setMinimumSize(new Point(500, 450));
 
-        return fDialogComposite;
+        return dialogComposite;
     }
 
     @Override
@@ -325,7 +320,7 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
          *            The contexts to set
          */
         public void setAvalibleContexts(List<String> contexts) {
-            fAvailableContexts = new ArrayList<Context>();
+            fAvailableContexts = new ArrayList<>();
             if (contexts != null) {
                 for (Iterator<String> iterator = contexts.iterator(); iterator.hasNext();) {
                     String name = iterator.next();
@@ -405,21 +400,21 @@ public class AddContextDialog extends Dialog implements IAddContextDialog  {
         /**
          * @return The name of this component
          */
-        public String getName();
+        String getName();
 
         /**
          * @return The parent component
          */
-        public Object getParent();
+        Object getParent();
 
         /**
          * @return The array of children of this component
          */
-        public Object[] getChildren();
+        Object[] getChildren();
 
         /**
          * @return If this component has children or not
          */
-        public boolean hasChildren();
+        boolean hasChildren();
     }
 }
This page took 0.034821 seconds and 5 git commands to generate.