[174073] Attributes that exceeds page size doesn't show up; Updated copyright date
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractExtensionsSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractExtensionsSection.java
index 1e31aa8..8cff6f9 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractExtensionsSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractExtensionsSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2007 IBM Corporation and others.
* 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
@@ -29,6 +29,7 @@
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -212,7 +213,9 @@
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = GridData.FILL;
gridData.horizontalAlignment = GridData.FILL;
- gridData.widthHint = w;
+ // The initial size should be set, not the widthHint, which forces the width
+ // to remain constant.
+ sashForm.setSize(w, SWT.DEFAULT);
sashForm.setLayoutData(gridData);
sashForm.setForeground(ColorConstants.white);
sashForm.setBackground(ColorConstants.white);
@@ -546,7 +549,31 @@
// if nothing is selected then don't show any details
//
extensionDetailsViewer.setInput(null);
- }
+ }
+
+ // Upon element selection, the details view populates fine, but there is no vertical scrollbar,
+ // so it misleads the user into thinking there are no other attributes available
+ // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=174073
+ // This is a workaround to force a layout of the tab composite
+ IWorkbenchPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
+ if (part instanceof PropertySheet)
+ {
+ PropertySheet sheet = (PropertySheet)part;
+ if (sheet.getCurrentPage() instanceof TabbedPropertySheetPage)
+ {
+ TabbedPropertySheetPage tabbedPage = (TabbedPropertySheetPage)sheet.getCurrentPage();
+ if (tabbedPage.getControl() instanceof Composite)
+ {
+ Composite c = (Composite)tabbedPage.getControl();
+ Point p = c.getSize();
+ // c.layout(true, true) doesn't appear to work.
+ // But this forces a relayout:
+ c.setSize(p.x, p.y + 1);
+ // Change the size back to the original
+ c.setSize(p.x, p.y);
+ }
+ }
+ }
}
removeButton.setEnabled(isDeleteEnabled);
}