March 24, 2010
authorAlvaro Sanchez-Leon <alvsan09@gmail.com>
Wed, 24 Mar 2010 16:02:24 +0000 (16:02 +0000)
committerAlvaro Sanchez-Leon <alvsan09@gmail.com>
Wed, 24 Mar 2010 16:02:24 +0000 (16:02 +0000)
Add copyright plus cosmetic code formatting changes to new widget test stub files.

org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/TmfUITestPlugin.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/widgets/timeAnalysis/test/stub/adaption/TsfImplProvider.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/widgets/timeAnalysis/test/stub/model/EventImpl.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/widgets/timeAnalysis/test/stub/model/TraceImpl.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/widgets/timeAnalysis/test/stub/model/TraceModelImplFactory.java
org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/widgets/timeAnalysis/test/stub/views/TsfTraceAnalysisView.java

index 50c797c787ff737bdc76240945d338b030735fb5..c1b795da794e964808bc1a28318cea33fde1b3f9 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************\r
+ * Copyright (c) 2009, 2010 Ericsson\r
+ * \r
+ * All rights reserved. This program and the accompanying materials are\r
+ * made available under the terms of the Eclipse Public License v1.0 which\r
+ * accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ * \r
+ * Contributors:\r
+ *   Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r
+ *******************************************************************************/\r
 package org.eclipse.linuxtools.tmf.ui.tests;\r
 \r
 import org.eclipse.jface.resource.ImageDescriptor;\r
@@ -15,12 +26,15 @@ public class TmfUITestPlugin extends AbstractUIPlugin {
        // The shared instance\r
        private static TmfUITestPlugin plugin;\r
        \r
-       /**\r
-        * The constructor\r
-        */\r
+       // ========================================================================\r
+       // Constructor\r
+       // ========================================================================\r
        public TmfUITestPlugin() {\r
        }\r
 \r
+       // ========================================================================\r
+       // Methods\r
+       // ========================================================================\r
        /*\r
         * (non-Javadoc)\r
         * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)\r
index d5d68887297561b639d02a1edce72bbb4dc68d97..8fdf0c50414c7ac6a7169cd587a55188d0308bd4 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************\r
+ * Copyright (c) 2009, 2010 Ericsson\r
+ * \r
+ * All rights reserved. This program and the accompanying materials are\r
+ * made available under the terms of the Eclipse Public License v1.0 which\r
+ * accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ * \r
+ * Contributors:\r
+ *   Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r
+ *******************************************************************************/\r
 package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.adaption;\r
 \r
 import java.util.HashMap;\r
@@ -12,6 +23,9 @@ import org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.model.TraceI
 \r
 public class TsfImplProvider extends TmfTimeAnalysisProvider {\r
 \r
+       // ========================================================================\r
+       // Methods\r
+       // ========================================================================\r
        @Override\r
        public StateColor getEventColor(ITimeEvent event) {\r
                if (event instanceof EventImpl) {\r
index a42b2a42117d56304283f5efb95cc846602d251e..8d9d071e46dab70d0f9323bd5fe1d5ba5fec7560 100644 (file)
@@ -1,9 +1,23 @@
+/*******************************************************************************\r
+ * Copyright (c) 2009, 2010 Ericsson\r
+ * \r
+ * All rights reserved. This program and the accompanying materials are\r
+ * made available under the terms of the Eclipse Public License v1.0 which\r
+ * accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ * \r
+ * Contributors:\r
+ *   Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r
+ *******************************************************************************/\r
 package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.model;\r
 \r
 import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.ITmfTimeAnalysisEntry;\r
 import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.TimeEvent;\r
 \r
 public class EventImpl extends TimeEvent {\r
+       // ========================================================================\r
+       // Data\r
+       // ========================================================================\r
        public static enum Type {ERROR, WARNING, TIMEADJUSTMENT, ALARM, EVENT, INFORMATION, UNKNOWN, INFO1, INFO2, INFO3, INFO4, INFO5, INFO6, INFO7, INFO8, INFO9}\r
 \r
        private long time = 0;\r
@@ -11,6 +25,9 @@ public class EventImpl extends TimeEvent {
        private Type myType = Type.UNKNOWN; \r
        private long duration; \r
        \r
+       // ========================================================================\r
+       // Constructor\r
+       // ========================================================================\r
        public EventImpl(long time, ITmfTimeAnalysisEntry trace, Type type) {\r
                this.time = time;\r
                this.trace = trace;\r
@@ -18,6 +35,9 @@ public class EventImpl extends TimeEvent {
                this.setDuration(super.getDuration());\r
        }\r
        \r
+       // ========================================================================\r
+       // Methods\r
+       // ========================================================================\r
        public Type getType() {\r
                return myType;\r
        }\r
index ede64079e6c31189b45fdff5bc9d1c30c1894d19..7ffc2d1cf4a94ef0122feba013b4fe2ead9fbb29 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************\r
+ * Copyright (c) 2009, 2010 Ericsson\r
+ * \r
+ * All rights reserved. This program and the accompanying materials are\r
+ * made available under the terms of the Eclipse Public License v1.0 which\r
+ * accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ * \r
+ * Contributors:\r
+ *   Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r
+ *******************************************************************************/\r
 package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.model;\r
 \r
 import java.util.Vector;\r
@@ -7,22 +18,20 @@ import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.TimeEvent;
 \r
 \r
 public class TraceImpl implements ITmfTimeAnalysisEntry {\r
+       // ========================================================================\r
+       // Data\r
+       // ========================================================================\r
        private int id = 0;\r
        private String name = "traceDefaultName";\r
        private long startTime = 0;\r
        private long stopTime = 1;\r
        private String groupName = "defaultGroupName";\r
        private String className = "defaultClassName";\r
-       \r
-       public String getClassName() {\r
-               return className;\r
-       }\r
-\r
-       public void setClassName(String className) {\r
-               this.className = className;\r
-       }\r
-\r
        private Vector<TimeEvent> traceEvents = new Vector<TimeEvent>();\r
+       \r
+       // ========================================================================\r
+       // Constructor\r
+       // ========================================================================\r
 \r
        public TraceImpl(int id, String name, long sTime, long stopTime,\r
                        String groupName, String className) {\r
@@ -34,6 +43,18 @@ public class TraceImpl implements ITmfTimeAnalysisEntry {
                this.className = className;\r
        }\r
 \r
+       // ========================================================================\r
+       // Methods\r
+       // ========================================================================\r
+\r
+       public String getClassName() {\r
+               return className;\r
+       }\r
+\r
+       public void setClassName(String className) {\r
+               this.className = className;\r
+       }\r
+\r
        public void setGroupName(String groupName) {\r
                this.groupName = groupName;\r
        }\r
index e90c4a116ab7e2c67aa6ae4a5a74e94727fe2e8b..e364fce4610f1c56b663f42d77fcd0dcaa82eb75 100644 (file)
@@ -1,24 +1,39 @@
+/*******************************************************************************\r
+ * Copyright (c) 2009, 2010 Ericsson\r
+ * \r
+ * All rights reserved. This program and the accompanying materials are\r
+ * made available under the terms of the Eclipse Public License v1.0 which\r
+ * accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ * \r
+ * Contributors:\r
+ *   Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r
+ *******************************************************************************/\r
 package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.model;\r
 \r
 import java.util.Date;\r
 \r
 public class TraceModelImplFactory {\r
-       private class TraceStrings {\r
-               public String name = "";\r
-               public String classNmme = name + " class";\r
-               public String groupName = "group " + classNmme;\r
-       }\r
 \r
+       // ========================================================================\r
+       // Data\r
+       // ========================================================================\r
        private int count = 0;\r
        private TraceStrings[] traceNames;\r
        private static final long msTons = 1000000;\r
        private Long timeRef = new Date().getTime() * msTons;\r
 \r
+       // ========================================================================\r
+       // Constructor\r
+       // ========================================================================\r
        public TraceModelImplFactory() {\r
                traceNames = new TraceStrings[17];\r
                loadTraceNameStrings();\r
        }\r
 \r
+       // ========================================================================\r
+       // Methods\r
+       // ========================================================================\r
        public TraceImpl[] createTraces() {\r
                TraceImpl trace;\r
                TraceImpl[] traceArr = new TraceImpl[17];\r
@@ -208,4 +223,13 @@ public class TraceModelImplFactory {
                traceNames[16].groupName = "MISC";\r
 \r
        }\r
+\r
+       // ========================================================================\r
+       // Inner Class\r
+       // ========================================================================\r
+       private class TraceStrings {\r
+               public String name = "";\r
+               public String classNmme = name + " class";\r
+               public String groupName = "group " + classNmme;\r
+       }\r
 }\r
index 2cfb433c2ea220a5c29e461690559e77468975bb..56cd2e991ffe336944c8228480d94f5d164e5762 100644 (file)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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:
+ *   Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
+ *******************************************************************************/
 package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.views;
 
 import java.text.SimpleDateFormat;
@@ -45,23 +56,12 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.DrillDownAdapter;
 import org.eclipse.ui.part.ViewPart;
 
-/**
- * This sample class demonstrates how to plug-in a new workbench view. The view
- * shows data obtained from the model. The sample creates a dummy model on the
- * fly, but a real implementation would connect to the model available either in
- * this or another plug-in (e.g. the workspace). The view is connected to the
- * model using a content provider.
- * <p>
- * The view uses a label provider to define how model objects should be
- * presented in the view. Each view can present the same model objects using
- * different labels and icons, if needed. Alternatively, a single label provider
- * can be shared between views in order to ensure that objects of the same type
- * are presented in the same way everywhere.
- * <p>
- */
-
 public class TsfTraceAnalysisView extends ViewPart implements
                ITmfTimeSelectionListener, ITmfTimeScaleSelectionListener {
+
+       // ========================================================================
+       // Data
+       // ========================================================================
        private TreeViewer viewer;
        private DrillDownAdapter drillDownAdapter;
        private Action action1;
@@ -87,6 +87,9 @@ public class TsfTraceAnalysisView extends ViewPart implements
                        "yy/MM/dd HH:mm:ss");
        private TraceModelImplFactory fact;
 
+       // ========================================================================
+       // Inner Classes
+       // ========================================================================
        /*
         * The content provider class is responsible for providing objects to the
         * view. It can wrap existing objects in adapters or simply return objects
@@ -236,12 +239,9 @@ public class TsfTraceAnalysisView extends ViewPart implements
        class NameSorter extends ViewerSorter {
        }
 
-       /**
-        * The constructor.
-        */
-       public TsfTraceAnalysisView() {
-       }
-
+       // ========================================================================
+       // Methods
+       // ========================================================================
        /**
         * This is a callback that will allow us to create the viewer and initialize
         * it.
This page took 0.031833 seconds and 5 git commands to generate.