-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
509291: Date component with default style must be fixed on Mac
Change-Id: I591de3983a92ed5656e8436adeea524bbaa68086 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=509291
- Loading branch information
1 parent
b1e6616
commit b31a685
Showing
4 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tests/org.eclipse.emf.parsley.tests/snippets/snippet/SnippetBug509291.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package snippet; | ||
|
||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.RowLayout; | ||
import org.eclipse.swt.widgets.DateTime; | ||
import org.eclipse.swt.widgets.Display; | ||
import org.eclipse.swt.widgets.Shell; | ||
|
||
public class SnippetBug509291 { | ||
public static void main(String[] args) { | ||
|
||
Display display = new Display(); | ||
Shell shell = new Shell(display); | ||
shell.setLayout(new RowLayout()); | ||
|
||
@SuppressWarnings("unused") | ||
DateTime dateTime = new DateTime(shell, SWT.DATE | SWT.DROP_DOWN); | ||
// specify also SWT.DATE, otherwise, on Mac, it won't work: | ||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=509291 | ||
|
||
shell.pack(); | ||
shell.open(); | ||
|
||
while (!shell.isDisposed()) { | ||
if (!display.readAndDispatch()) | ||
display.sleep(); | ||
} | ||
|
||
display.dispose(); | ||
} | ||
} |