Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 173451 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/tptp/test/auto/gui/internal/dialogs/AutoGUITestControllerDialog.java (-8 / +16 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 573-586 Link Here
573
	 * @param status The status to be printed
573
	 * @param status The status to be printed
574
	 */
574
	 */
575
	public void setStatus (String status)
575
	public void setStatus (String status)
576
	{		
576
	{	
577
		
577
		/* The delegator has to handle this (if one exists) */
578
		/* The delegator has to handle this (if one exists) */
578
		if (isRoot && delegator != null)
579
		if (isRoot && delegator != null && !delegator.isShellDisposed)
579
		{
580
		{
580
			delegator.setStatus(status);
581
			delegator.setStatus(status);
581
			return;
582
			return;
582
		}
583
		}
583
			
584
		//added for defect 173451 to ensure that in case where the widget is disposed
585
		// we switch to the correct reference (for Linux platform)
586
		// Liz Dancy
587
		else if (statuslbl.isDisposed() && delegator.isShellDisposed){
588
			
589
			this.updateDelegator(this.realParent, this.realParent);
590
			statuslbl = this.delegator.statuslbl;
591
		}	
584
		if (status == null)
592
		if (status == null)
585
			return;
593
			return;
586
		
594
		
Lines 590-600 Link Here
590
		if (finalStatus.length() > 30)
598
		if (finalStatus.length() > 30)
591
			toolong = true;
599
			toolong = true;
592
		
600
		
593
		
601
	
594
		statuslbl.setToolTipText(finalStatus);
602
		statuslbl.setToolTipText(finalStatus);
595
		if (toolong)
603
		if (toolong)
596
			finalStatus = finalStatus.substring (0, 30) + "...";
604
			finalStatus = finalStatus.substring (0, 30) + "...";
597
		
598
			
605
			
599
		statuslbl.setText (finalStatus);
606
		statuslbl.setText (finalStatus);
600
	}
607
	}
Lines 697-704 Link Here
697
		
704
		
698
		AutoGUITestControllerDialog delegator = rootControl.getDelegator();
705
		AutoGUITestControllerDialog delegator = rootControl.getDelegator();
699
		/* Get rid of the last delegator */					
706
		/* Get rid of the last delegator */					
700
		if (activeControlDialog != null)
707
		if (activeControlDialog != null ){
701
			activeControlDialog.dispose();
708
			activeControlDialog.dispose();
709
		}
702
		
710
		
703
		delegator = new AutoGUITestControllerDialog(guardian, AutoGUITestControllerDialog.this);																
711
		delegator = new AutoGUITestControllerDialog(guardian, AutoGUITestControllerDialog.this);																
704
		delegator.setLocation(location);
712
		delegator.setLocation(location);
Lines 708-714 Link Here
708
		delegator.setStatus(lastStatus);	
716
		delegator.setStatus(lastStatus);	
709
		delegator.actualParent = guardian;
717
		delegator.actualParent = guardian;
710
		delegator.realParent = realParent;
718
		delegator.realParent = realParent;
711
				
719
		
712
		rootControl.setDelegator(delegator);
720
		rootControl.setDelegator(delegator);
713
	}
721
	}
714
	
722
	
(-)src/org/eclipse/tptp/test/auto/gui/internal/editor/AutoGUITestCasesForm.java (-2 / +9 lines)
Lines 1690-1696 Link Here
1690
				
1690
				
1691
				IActionBars actionBar = AutoGUITestCasesForm.this.getEditorSite().getActionBars();
1691
				IActionBars actionBar = AutoGUITestCasesForm.this.getEditorSite().getActionBars();
1692
				if (actionBar != null)
1692
				if (actionBar != null)
1693
				{
1693
				{					
1694
					undoAction.setEnabled(undoAction.isEnabled());
1694
					undoAction.setEnabled(undoAction.isEnabled());
1695
					redoAction.setEnabled(redoAction.isEnabled());
1695
					redoAction.setEnabled(redoAction.isEnabled());
1696
					actionBar.updateActionBars();
1696
					actionBar.updateActionBars();
Lines 1704-1710 Link Here
1704
			
1704
			
1705
		public boolean isEnabled()
1705
		public boolean isEnabled()
1706
		{
1706
		{
1707
			return undo ? linearOperationHistory.canUndo(getUndoContext()) : linearOperationHistory.canRedo(getUndoContext());
1707
			try
1708
			{
1709
				return undo ? linearOperationHistory.canUndo(getUndoContext()) : linearOperationHistory.canRedo(getUndoContext());
1710
			}
1711
			catch(Exception e)
1712
			{
1713
				return false;
1714
			}
1708
		}
1715
		}
1709
	}
1716
	}
1710
1717

Return to bug 173451