Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[hyades-dev] Commiter vote required for M10 check-in


3 defects to be fixed for M10:


Defect:
bugzilla_62467 -- Execution History model is not incrementally updated during test execution.
Rationale:
This is a fix to have a lost feature apparently loose when we updated the execution history viewer: the viewer had the capability to be updated every 5s in order to update the current execution history.
Risk Assessment
No breaking API changes.
Low risk change.
Dates
fix: May 27
regression test: May 28 (Jerome Gout)



Defect:
bugzilla_63682 -- Need a programmatic way to open the highlighting rectangle from the time compression bar to the interested lifeline
Rationale:
This is a fix to have the capability to programatically hightlight an event in the sequence diagram. This is required for BlueRat for hightlighting a event (between 2 consecutive messages) when we move the event bar in the thread view.
Risk Assessment:
Isolated code changes in three files:
        org.eclipse.hyades.uml2sd.ui.TimeCompressionBar.java
        org.eclipse.hyades.uml2sd.ui.SDWidget.java
        org.eclipse.hyades.uml2sd.trace.loaders.BaseTraceInteraction.java
No breaking API changes, but a new API is added
Low risk change.
Here is a patch containing what we plan to update:

Dates
fix: as soon as we have the agreement
regression test: May 28 (Sebastien Veyriere)



Defect:
bugzilla_63860 -- Launch Configuration: Launch Progress Monitor should stop when TEH fails
Rationale:
This is a fix to  avoid infinite "Launching..." jobs in the Progress view when a Test launch fails because the Test Execution Harness throws an exception. These jobs never ends, and cannot be cancelled. They are not blocking, but they are very confusing for the user who might think the Test is still running.
Risk Assessment:
No API change. The fix consists in adding a try { ... } finally { monitor.done(); } block around an existing portion of code in AbstractLaunchConfigurationDelegate class in test.ui.
Low risk change.
Dates
fix: May 27
regression test: May 28 (Julien canches)

Thanks

Dominique Guilbaud
Sr. Software Manager
Automated Software Quality
Rational Software
IBM Software Group
Direct: +33 5 62 16 56 52
Mobile: +33 6 16 47 13 12
dguilbaud@xxxxxxxxxx
Index: src/org/eclipse/hyades/uml2sd/ui/view/NGC.java
===================================================================
RCS file: /home/tools/org.eclipse.hyades.uml2sd.ui/src/org/eclipse/hyades/uml2sd/ui/view/NGC.java,v
retrieving revision 1.9
diff -u -r1.9 NGC.java
--- src/org/eclipse/hyades/uml2sd/ui/view/NGC.java	7 Apr 2004 12:34:10 -0000	1.9
+++ src/org/eclipse/hyades/uml2sd/ui/view/NGC.java	26 May 2004 14:02:21 -0000
@@ -42,7 +42,7 @@
 	private int yx ;
 	private int xx;
 	
-	private static int vscreen_bounds = 5;
+	private static int vscreen_bounds = 0;
 
 	public NGC (SDWidget scrollView, GC gc)
 	{
Index: src/org/eclipse/hyades/uml2sd/ui/view/SDView.java
===================================================================
RCS file: /home/tools/org.eclipse.hyades.uml2sd.ui/src/org/eclipse/hyades/uml2sd/ui/view/SDView.java,v
retrieving revision 1.23
diff -u -r1.23 SDView.java
--- src/org/eclipse/hyades/uml2sd/ui/view/SDView.java	4 May 2004 14:27:49 -0000	1.23
+++ src/org/eclipse/hyades/uml2sd/ui/view/SDView.java	26 May 2004 14:02:22 -0000
@@ -37,7 +37,6 @@
 import org.eclipse.hyades.uml2sd.ui.load.IUml2SDLoader;
 import org.eclipse.hyades.uml2sd.ui.load.LoadersManager;
 import org.eclipse.hyades.uml2sd.ui.preferences.SDViewPref;
-//import org.eclipse.hyades.uml2sd.ztest.testLoaders;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.IAction;
@@ -88,12 +87,6 @@
 	private String extFilterId = null;
 	private String extFindId = null;
 	
-/*	public SDView()
-	{
-		Sleak sleak = new Sleak();
-		sleak.open();
-	}*/
-	
 	static private ArrayList toto = null;
 	
 	private MenuManager menuMgr = null;
@@ -162,8 +155,6 @@
 		} 
 		else {
 			loadBlank();
-//			launchTest();
-			//temporary test if no loader registered
 		}
 	}
 	
@@ -199,17 +190,6 @@
 		setTitle(l.getTitleString());
 	}
 	
-//	public void launchTest()
-//	{
-////		testLogLoader l = new testLogLoader();
-//		testLoaders l= new testLoaders();
-//		l.setViewer(this);
-//		setSDFindProvider(l);
-//		setSDFilterProvider(l);
-////		setExtendedFindProvider(l);
-//		setSDPagingProvider(l);
-//	}
-	
 	public void setFocus()
 	{
 		if (sdWidget != null)
@@ -720,8 +700,7 @@
 	public void setFrameAndEnsureVisibleSync(final Frame frame, final GraphNode sm) {
 		getSDWidget().getDisplay().syncExec(new Runnable() {
 			public void run() {
-				setFrame(frame,false);
-				getSDWidget().ensureVisible(sm);
+				setFrameAndEnsureVisible(frame,sm);
 			}
 		});
 	}
@@ -765,6 +744,15 @@
 				}
 			}
 		});
+	}
+	
+	/**
+	 * Return the time compression bar widget
+	 * @return the time compression bar
+	 */
+	public TimeCompressionBar getTimeCompressionBar()
+	{
+		return timeCompressionBar;
 	}
 	
 	/**
Index: src/org/eclipse/hyades/uml2sd/ui/view/SDWidget.java
===================================================================
RCS file: /home/tools/org.eclipse.hyades.uml2sd.ui/src/org/eclipse/hyades/uml2sd/ui/view/SDWidget.java,v
retrieving revision 1.21
diff -u -r1.21 SDWidget.java
--- src/org/eclipse/hyades/uml2sd/ui/view/SDWidget.java	5 May 2004 15:56:50 -0000	1.21
+++ src/org/eclipse/hyades/uml2sd/ui/view/SDWidget.java	26 May 2004 14:02:22 -0000
@@ -554,20 +554,28 @@
 		int y = Math.round(node.getY() * zoomValue);
 		int width = node.getWidth();
 		int height = node.getHeight();
+		if (node instanceof Lifeline)
+		{
+			y=getContentsY()+Metrics.LIFELINE_VT_MAGIN;
+			height=getVisibleHeight()-Metrics.LIFELINE_VT_MAGIN;
+			x = Math.round(node.getX() * zoomValue)+width/2;
+			width=getVisibleWidth()/2;
+		}
 		if (node instanceof SyncMessage)
 		{
 			height = Metrics.getMessagesSpacing();
 		}
-/*		if (x < getVisibleWidth()) {
+		if (x < getVisibleWidth()) {
 			x = 0;
-		} else if (x + width + getVisibleWidth() > getContentsWidth()) {
+		} else if (x + getVisibleWidth() > getContentsWidth()) {
 			x = getContentsWidth() - width;
 		}
 		if (y < getVisibleHeight()) {
 			y = height;
-		} else if (y - height + getVisibleHeight() > getContentsHeight()) {
+		} else if (y + getVisibleHeight() > getContentsHeight()) {
 			y = getContentsHeight() + height;
-		}*/
+		}
+		
 		ensureVisible(x,y-Metrics.LIFELINE_VT_MAGIN,width,height+Metrics.LIFELINE_VT_MAGIN,SWT.CENTER);
 		redraw();
 	}
@@ -646,7 +654,9 @@
 	public void deltaSelected(Lifeline lifeline, int startEvent, int nbEvent, IColor color)
 	{
 		frame.highlightTimeCompression(lifeline,startEvent,nbEvent,color);
+		ensureVisible(lifeline);
 		redraw();
+		update();
 	}
 	
 	public void resetZoomFactor()
Index: src/org/eclipse/hyades/uml2sd/ui/view/TimeCompressionBar.java
===================================================================
RCS file: /home/tools/org.eclipse.hyades.uml2sd.ui/src/org/eclipse/hyades/uml2sd/ui/view/TimeCompressionBar.java,v
retrieving revision 1.8
diff -u -r1.8 TimeCompressionBar.java
--- src/org/eclipse/hyades/uml2sd/ui/view/TimeCompressionBar.java	2 Apr 2004 18:02:39 -0000	1.8
+++ src/org/eclipse/hyades/uml2sd/ui/view/TimeCompressionBar.java	26 May 2004 14:02:22 -0000
@@ -420,6 +420,12 @@
 								list.deltaSelected(mes1.getEndLifeline(),
 								m1.getEvent(), m2.getEvent()-m1.getEvent(),col[colIndex]);
 							}
+							else if (m2.getGraphNode() instanceof BaseMessage &&
+									 ((BaseMessage)m2.getGraphNode()).getStartLifeline()!=null)
+							{
+								list.deltaSelected(((BaseMessage)m2.getGraphNode()).getStartLifeline(),
+								m1.getEvent(), m2.getEvent()-m1.getEvent(),col[colIndex]);
+							}
 							else list.deltaSelected(mes1.getStartLifeline(),
 								m1.getEvent(), m2.getEvent()-m1.getEvent(),col[colIndex]);
 						} else if (m1.getGraphNode() instanceof ExecutionOccurrence) {
@@ -440,6 +446,133 @@
 		super.contentsMouseUpEvent(event);
 	}
 	
+	/**
+	 * Force the time compression bar to hightlight the event occurrences 
+	 * between the two given messages. The event occurrences are hightlighted on the first
+	 * message's end lifeline
+	 * @param mes1 the first message
+	 * @param mes2
+	 */
+	public void highlightRegion(BaseMessage mes1, BaseMessage mes2)
+	{
+		if (frame == null)
+			return;
+		if (!(mes1 instanceof ITimeRange))
+			return;
+		if (!(mes2 instanceof ITimeRange))
+			return;
+		ITimeRange t1=(ITimeRange)mes1;
+		ITimeRange t2=(ITimeRange)mes2;
+
+		double time1=t1.getFirstTime();
+		double time2=t2.getFirstTime();
+		int event1=mes1.getEventOccurrence();
+		int event2=mes2.getEventOccurrence();
+				
+		if (mes1 instanceof AsyncMessage)
+		{
+			AsyncMessage as = (AsyncMessage)mes2;
+			time1=as.getLastTime();
+			event1=as.getEndOccurrence();
+		}
+		if (mes2 instanceof AsyncMessage)
+		{
+			AsyncMessage as = (AsyncMessage)mes2;
+			if (as.getEndOccurrence()>as.getStartOccurrence())
+			{
+				time1=as.getLastTime();
+				event1=as.getEndOccurrence();
+			}
+			else 
+			{
+				time1=as.getFirstTime();
+				event1=as.getStartOccurrence();
+			}
+		}
+		
+		if (event1>event2)
+		{
+			BaseMessage tempMes=mes2;
+			mes2=mes1;
+			mes1=tempMes;
+			
+			t1=(ITimeRange)mes1;
+			t2=(ITimeRange)mes2;
+
+			time1=t1.getFirstTime();
+			time2=t2.getFirstTime();
+			event1=mes1.getEventOccurrence();
+			event2=mes2.getEventOccurrence();
+					
+			if (mes1 instanceof AsyncMessage)
+			{
+				AsyncMessage as = (AsyncMessage)mes2;
+				time1=as.getLastTime();
+				event1=as.getEndOccurrence();
+			}
+			if (mes2 instanceof AsyncMessage)
+			{
+				AsyncMessage as = (AsyncMessage)mes2;
+				if (as.getEndOccurrence()>as.getStartOccurrence())
+				{
+					time1=as.getLastTime();
+					event1=as.getEndOccurrence();
+				}
+				else 
+				{
+					time1=as.getFirstTime();
+					event1=as.getStartOccurrence();
+				}
+			}
+		}
+		
+		double gr = (max - min)/10;
+	
+		double delta = Math.abs(time2-time1-min);
+		int colIndex = 0;
+		if (gr!=0)
+		{
+			colIndex = Math.round((float)(delta/gr));
+			if (colIndex >= col.length)
+				colIndex = col.length -1;
+			else if (colIndex < 0)
+				colIndex = 0;
+		}
+		else colIndex = 0;			
+		for (int j=0; j<listenerList.size();j++)
+		{
+			ITimeCompressionListener list = (ITimeCompressionListener)listenerList.get(j);
+			if (mes1.getEndLifeline()!=null)
+			{
+				list.deltaSelected(mes1.getEndLifeline(),
+				event1, event2-event1,col[colIndex]);
+			}
+			else if (mes2.getStartLifeline()!=null) {
+				list.deltaSelected(mes2.getStartLifeline(),
+				event1, event2-event1,col[colIndex]);
+			}
+			else
+				list.deltaSelected(mes1.getStartLifeline(),
+				event1, event2-event1,col[colIndex]);
+		}
+	}
+	
+	/**
+	 * Force the time compression bar to hightlight the event occurrences 
+	 * between the two given messages. The event occurrences are hightlighted on the first
+	 * message's end lifeline
+	 * @param mes1 the first message
+	 * @param mes2
+	 */
+	public void highlightRegionSync(final BaseMessage mes1, final BaseMessage mes2)
+	{
+		getDisplay().syncExec(new Runnable() {
+			public void run() {
+				highlightRegion(mes1, mes2);
+			}
+		});
+	}
+
 	public void scrollBy(int x, int y)
 	{
 	}

Back to the top