Skip to content

Commit

Permalink
Add CTabFolder support to tests
Browse files Browse the repository at this point in the history
The method verifyCompositeText in DialogCheck verifies various aspects
of composites, with
eclipse-platform/eclipse.platform.team#14 this
now needs to understand CTabFolder (in addition to TabFolder)

Also-by: Torbjörn Svensson <torbjorn.svensson@st.com>
  • Loading branch information
jonahgraham committed Apr 22, 2022
1 parent ad0c27b commit 0618bdf
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
Expand Down Expand Up @@ -122,6 +123,12 @@ private static void verifyCompositeText(Composite composite) {
for (int j = 0; j < numPages; j++) {
folder.setSelection(j);
}
} else if (child instanceof CTabFolder) {
CTabFolder folder = (CTabFolder) child;
int numPages = folder.getItemCount();
for (int j = 0; j < numPages; j++) {
folder.setSelection(j);
}
}
else if (child instanceof Button) {
//verify the text if the child is a button
Expand Down

0 comments on commit 0618bdf

Please sign in to comment.