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 64043 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/EditorAreaHelper.java (+2 lines)
Lines 44-49 Link Here
44
		this.page = page;
44
		this.page = page;
45
		this.editorArea = new EditorSashContainer(IPageLayout.ID_EDITOR_AREA, page);
45
		this.editorArea = new EditorSashContainer(IPageLayout.ID_EDITOR_AREA, page);
46
		
46
		
47
		this.editorArea.createControl(page.getClientComposite());
48
		
47
        final Shell shell = page.getWorkbenchWindow().getShell();
49
        final Shell shell = page.getWorkbenchWindow().getShell();
48
        IHandler openEditorDropDownHandler = new AbstractHandler() {
50
        IHandler openEditorDropDownHandler = new AbstractHandler() {
49
51
(-)Eclipse UI/org/eclipse/ui/internal/EditorManager.java (-1 / +11 lines)
Lines 51-56 Link Here
51
import org.eclipse.swt.graphics.ImageData;
51
import org.eclipse.swt.graphics.ImageData;
52
import org.eclipse.swt.graphics.Point;
52
import org.eclipse.swt.graphics.Point;
53
import org.eclipse.swt.program.Program;
53
import org.eclipse.swt.program.Program;
54
import org.eclipse.swt.widgets.Composite;
55
import org.eclipse.swt.widgets.Control;
54
import org.eclipse.swt.widgets.Display;
56
import org.eclipse.swt.widgets.Display;
55
import org.eclipse.swt.widgets.Shell;
57
import org.eclipse.swt.widgets.Shell;
56
import org.eclipse.ui.IEditorActionBarContributor;
58
import org.eclipse.ui.IEditorActionBarContributor;
Lines 939-945 Link Here
939
					String workbookID = ref.getMemento().getString(IWorkbenchConstants.TAG_WORKBOOK);
941
					String workbookID = ref.getMemento().getString(IWorkbenchConstants.TAG_WORKBOOK);
940
					editorPresentation.setActiveEditorWorkbookFromID(workbookID);
942
					editorPresentation.setActiveEditorWorkbookFromID(workbookID);
941
					openInternalEditor(ref, desc, editorInput, false);
943
					openInternalEditor(ref, desc, editorInput, false);
942
					ref.getPane().createChildControl();
944
					
945
					Control ctrl = ref.getPane().getControl();
946
					 if (ctrl == null)
947
					 	ref.getPane().createControl((Composite)page.getEditorPresentation().getLayoutPart().getControl());
948
					 else
949
					 	ref.getPane().createChildControl();
950
					 
951
952
943
					// TODO commented during presentation refactor ((EditorPane)ref.getPane()).getWorkbook().updateEditorTab(ref);
953
					// TODO commented during presentation refactor ((EditorPane)ref.getPane()).getWorkbook().updateEditorTab(ref);
944
				} catch (PartInitException e) {
954
				} catch (PartInitException e) {
945
					WorkbenchPlugin.log("Exception creating editor: " + e.getMessage()); //$NON-NLS-1$
955
					WorkbenchPlugin.log("Exception creating editor: " + e.getMessage()); //$NON-NLS-1$
(-)Eclipse UI/org/eclipse/ui/internal/PartPane.java (+4 lines)
Lines 120-125 Link Here
120
	if(control == null)
120
	if(control == null)
121
		return;
121
		return;
122
	
122
	
123
	// Make sure the child control has not been created yet
124
	if(control.getChildren().length != 0)
125
		return;
126
	
123
	final Composite content = new Composite(control, SWT.NONE);
127
	final Composite content = new Composite(control, SWT.NONE);
124
	content.setLayout(new FillLayout());
128
	content.setLayout(new FillLayout());
125
	
129
	
(-)Eclipse UI/org/eclipse/ui/internal/PartSashContainer.java (-14 / +48 lines)
Lines 177-182 Link Here
177
 * Find the sashs around the specified part.
177
 * Find the sashs around the specified part.
178
 */
178
 */
179
public void findSashes(LayoutPart pane,PartPane.Sashes sashes) {
179
public void findSashes(LayoutPart pane,PartPane.Sashes sashes) {
180
	if(root == null) {
181
		return;
182
	}
180
	LayoutTree part = root.find(pane);
183
	LayoutTree part = root.find(pane);
181
	if(part == null)
184
	if(part == null)
182
		return;
185
		return;
Lines 365-372 Link Here
365
		}
368
		}
366
	}
369
	}
367
	
370
	
368
	addChild(newRelationshipInfo);	
371
	addChild(newRelationshipInfo);
369
	root.updateSashes(parent);
372
	if(root != null) {
373
		root.updateSashes(parent);
374
	}
370
	resizeSashes(parent.getClientArea());
375
	resizeSashes(parent.getClientArea());
371
}
376
}
372
/**
377
/**
Lines 427-433 Link Here
427
		child.createControl(parent);
432
		child.createControl(parent);
428
	}
433
	}
429
434
430
	root.updateSashes(parent);
435
	if(root != null) {
436
		root.updateSashes(parent);
437
	}
431
	active = true;
438
	active = true;
432
	resizeSashes(parent.getClientArea());
439
	resizeSashes(parent.getClientArea());
433
}
440
}
Lines 479-485 Link Here
479
 * Dispose all sashs used in this perspective.
486
 * Dispose all sashs used in this perspective.
480
 */
487
 */
481
public void disposeSashes() {
488
public void disposeSashes() {
482
	root.disposeSashes();
489
	if(root != null) {
490
		root.disposeSashes();
491
	}
483
}
492
}
484
/**
493
/**
485
 * Return the most bottom right part or null if none.
494
 * Return the most bottom right part or null if none.
Lines 577-585 Link Here
577
		return;
586
		return;
578
587
579
	children.remove(child); 
588
	children.remove(child); 
580
	root = root.remove(child);
589
	if(root != null) {
581
	if(root != null)
590
		root = root.remove(child);
582
		root.updateSashes(parent);
591
		if(root != null) {
592
			root.updateSashes(parent);
593
		}
594
	}
583
	childRemoved(child);
595
	childRemoved(child);
584
	
596
	
585
	if (active){
597
	if (active){
Lines 595-609 Link Here
595
	if (isZoomed())
607
	if (isZoomed())
596
		zoomOut();
608
		zoomOut();
597
609
598
	if (!isChild(oldChild))return;
610
	if (!isChild(oldChild)) {
599
			
611
		return;
612
	}
613
614
	LayoutTree leaf = null;
615
	if (root != null) {
616
		leaf = root.find(oldChild);
617
	}
618
	
619
	if (leaf == null) {
620
		return;
621
	}
622
	
600
	children.remove(oldChild);
623
	children.remove(oldChild);
601
	children.add(newChild);
624
	children.add(newChild);
602
625
	
603
	childAdded(newChild);
626
	childAdded(newChild);
604
	LayoutTree leaf = root.find(oldChild);
627
605
	leaf.setPart(newChild);
628
	leaf.setPart(newChild);
606
	root.updateSashes(parent);
629
	if (root != null) {
630
		root.updateSashes(parent);
631
	}
607
632
608
	childRemoved(oldChild);
633
	childRemoved(oldChild);
609
	if (active){
634
	if (active){
Lines 617-623 Link Here
617
}
642
}
618
private void resizeSashes(Rectangle parentSize) {
643
private void resizeSashes(Rectangle parentSize) {
619
	if (!active) return;
644
	if (!active) return;
620
	root.setBounds(parentSize);
645
	if (root != null) {
646
		root.setBounds(parentSize);
647
	}
621
}
648
}
622
/**
649
/**
623
 * @see LayoutPart#setBounds
650
 * @see LayoutPart#setBounds
Lines 696-702 Link Here
696
	ILayoutContainer sourceContainer = isStackType(sourcePart) ? (ILayoutContainer)sourcePart : sourcePart.getContainer();
723
	ILayoutContainer sourceContainer = isStackType(sourcePart) ? (ILayoutContainer)sourcePart : sourcePart.getContainer();
697
	
724
	
698
	if (containerBounds.contains(position)) {
725
	if (containerBounds.contains(position)) {
699
		targetPart = root.findPart(parent.toControl(position));
726
		
727
		if (root != null) {
728
			targetPart = root.findPart(parent.toControl(position));
729
		}
700
		
730
		
701
		if (targetPart != null) {
731
		if (targetPart != null) {
702
			final Control targetControl = targetPart.getControl();
732
			final Control targetControl = targetPart.getControl();
Lines 887-892 Link Here
887
 * @param buf
917
 * @param buf
888
 */
918
 */
889
public void describeLayout(StringBuffer buf) {
919
public void describeLayout(StringBuffer buf) {
920
	if (root == null) {
921
		return;
922
	}
923
	
890
	if (isZoomed()) {
924
	if (isZoomed()) {
891
		buf.append("zoomed "); //$NON-NLS-1$
925
		buf.append("zoomed "); //$NON-NLS-1$
892
		root.describeLayout(buf);
926
		root.describeLayout(buf);

Return to bug 64043