Skip to content

Commit 65f92ed

Browse files
committedJan 13, 2020
Bump to new README format.
1 parent b3df331 commit 65f92ed

File tree

2 files changed

+34
-38
lines changed

2 files changed

+34
-38
lines changed
 

‎CONTRIBUTING.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Pull requests are welcome, preferably against `master`.
44

5-
Every successful Travis CI build on branch `master` is automatically published to [`https://oss.sonatype.org/content/repositories/snapshots`](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/), and its javadoc are published [here](http://diffplug.github.io/durian-swt/javadoc/snapshot/).
6-
75
## Build instructions
86

97
It's a bog-standard gradle build.
@@ -30,13 +28,13 @@ By contributing your code, you agree to license your contribution under the term
3028
All files are released with the Apache 2.0 license as such:
3129

3230
```
33-
Copyright 2015 DiffPlug
31+
Copyright 2020 DiffPlug
3432
3533
Licensed under the Apache License, Version 2.0 (the "License");
3634
you may not use this file except in compliance with the License.
3735
You may obtain a copy of the License at
3836
39-
http://www.apache.org/licenses/LICENSE-2.0
37+
https://www.apache.org/licenses/LICENSE-2.0
4038
4139
Unless required by applicable law or agreed to in writing, software
4240
distributed under the License is distributed on an "AS IS" BASIS,

‎README.md

+32-34
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,34 @@
22

33
<!---freshmark shields
44
output = [
5-
link(shield('Maven artifact', 'mavenCentral', 'com.diffplug.durian:durian-swt', 'blue'), 'https://bintray.com/diffplug/opensource/durian-swt/view'),
6-
link(shield('Latest version', 'latest', '{{versionLast}}', 'blue'), 'https://github.com/diffplug/durian-swt/releases/latest'),
7-
link(shield('Javadoc', 'javadoc', 'OK', 'blue'), 'https://diffplug.github.io/durian-swt/javadoc/{{versionLast}}/'),
8-
link(shield('License Apache', 'license', 'Apache', 'blue'), 'https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)'),
9-
'',
10-
link(shield('Changelog', 'changelog', '{{versionLast}}', 'brightgreen'), 'CHANGES.md'),
11-
link(image('Travis CI', 'https://travis-ci.org/diffplug/durian-swt.svg?branch=master'), 'https://travis-ci.org/diffplug/durian-swt'),
12-
link(shield('Live chat', 'gitter', 'live chat', 'brightgreen'), 'https://gitter.im/diffplug/durian')
13-
].join('\n');
5+
link(shield('Maven central', 'mavencentral', 'com.diffplug.durian:durian-swt', 'blue'), 'https://search.maven.org/artifact/com.diffplug.durian/durian-swt'),
6+
link(shield('Apache 2.0', 'license', 'apache-2.0', 'blue'), 'https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)'),
7+
'',
8+
link(shield('Changelog', 'changelog', versionLast, 'brightgreen'), 'CHANGES.md'),
9+
link(shield('Javadoc', 'javadoc', 'yes', 'brightgreen'), 'https://javadoc.io/doc/com.diffplug.durian/durian-swt/{{versionLast}}/'),
10+
link(shield('Live chat', 'gitter', 'chat', 'brightgreen'), 'https://gitter.im/diffplug/durian'),
11+
link(image('Travis CI', 'https://travis-ci.org/diffplug/durian-swt.svg?branch=master'), 'https://travis-ci.org/diffplug/durian-swt'),
12+
].join('\n');
1413
-->
15-
[![Maven artifact](https://img.shields.io/badge/mavenCentral-com.diffplug.durian%3Adurian--swt-blue.svg)](https://bintray.com/diffplug/opensource/durian-swt/view)
16-
[![Latest version](https://img.shields.io/badge/latest-3.3.0-blue.svg)](https://github.com/diffplug/durian-swt/releases/latest)
17-
[![Javadoc](https://img.shields.io/badge/javadoc-OK-blue.svg)](https://diffplug.github.io/durian-swt/javadoc/3.3.0/)
18-
[![License Apache](https://img.shields.io/badge/license-Apache-blue.svg)](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))
14+
[![Maven central](https://img.shields.io/badge/mavencentral-com.diffplug.durian%3Adurian--swt-blue.svg)](https://search.maven.org/artifact/com.diffplug.durian/durian-swt)
15+
[![Apache 2.0](https://img.shields.io/badge/license-apache--2.0-blue.svg)](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))
1916

2017
[![Changelog](https://img.shields.io/badge/changelog-3.3.0-brightgreen.svg)](CHANGES.md)
18+
[![Javadoc](https://img.shields.io/badge/javadoc-yes-brightgreen.svg)](https://javadoc.io/doc/com.diffplug.durian/durian-swt/3.3.0/)
19+
[![Live chat](https://img.shields.io/badge/gitter-chat-brightgreen.svg)](https://gitter.im/diffplug/durian)
2120
[![Travis CI](https://travis-ci.org/diffplug/durian-swt.svg?branch=master)](https://travis-ci.org/diffplug/durian-swt)
22-
[![Live chat](https://img.shields.io/badge/gitter-live_chat-brightgreen.svg)](https://gitter.im/diffplug/durian)
2321
<!---freshmark /shields -->
2422

2523
<!---freshmark javadoc
26-
output = prefixDelimiterReplace(input, 'https://diffplug.github.io/durian-swt/javadoc/', '/', versionLast);
24+
output = prefixDelimiterReplace(input, 'https://javadoc.io/static/com.diffplug.durian/durian-swt/', '/', versionLast);
2725
-->
2826
### Infrastructure
2927

30-
* [`ControlWrapper`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/ControlWrapper.html) - create custom widgets which properly encapsulate their base control.
31-
* [`Coat`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/Coat.html) - a functional interface for populating an empty Composite.
32-
* [`CoatMux`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/CoatMux.html) - a mechanism for layering and swapping Coats.
33-
* [`SwtExec`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/SwtExec.html) - an `ExecutorService` which executes on the SWT thread.
34-
* [`SwtExec.Guarded`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/SwtExec.Guarded.html) - an `ExecutorService` which is tied to the lifetime of an SWT widget. Say goodbye to `SWTException: Widget is disposed` forever! It can also subscribe to any kind of observable (Guava's ListenableFuture or RxJava's Observable), see [DurianRx](https://github.com/diffplug/durian-rx) for more info.
28+
* [`ControlWrapper`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/ControlWrapper.html) - create custom widgets which properly encapsulate their base control.
29+
* [`Coat`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/Coat.html) - a functional interface for populating an empty Composite.
30+
* [`CoatMux`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/CoatMux.html) - a mechanism for layering and swapping Coats.
31+
* [`SwtExec`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/SwtExec.html) - an `ExecutorService` which executes on the SWT thread.
32+
* [`SwtExec.Guarded`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/SwtExec.Guarded.html) - an `ExecutorService` which is tied to the lifetime of an SWT widget. Say goodbye to `SWTException: Widget is disposed` forever! It can also subscribe to any kind of observable (Guava's ListenableFuture or RxJava's Observable), see [DurianRx](https://github.com/diffplug/durian-rx) for more info.
3533

3634
```java
3735
SwtExec.async().guardOn(textBox).subscribe(serverResponse, txt -> {
@@ -41,7 +39,7 @@ SwtExec.async().guardOn(textBox).subscribe(serverResponse, txt -> {
4139

4240
### Fluent builders
4341

44-
* [`Layouts`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/Layouts.html) - all the layouts you'll need in SWT
42+
* [`Layouts`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/Layouts.html) - all the layouts you'll need in SWT
4543

4644
```java
4745
void textOkCanel(Composite cmp) {
@@ -60,7 +58,7 @@ void textOkCanel(Composite cmp) {
6058
}
6159
```
6260

63-
* [`Shells`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/Shells.html) - dialogs without boilerplate
61+
* [`Shells`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/Shells.html) - dialogs without boilerplate
6462

6563
```java
6664
Shells.builder(SWT.DIALOG_TRIM, this::textOkCanel)
@@ -69,13 +67,13 @@ Shells.builder(SWT.DIALOG_TRIM, this::textOkCanel)
6967
.openOnDisplayBlocking();
7068
```
7169

72-
* [`Actions`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/jface/Actions.html) - builder and one-liner:
70+
* [`Actions`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/jface/Actions.html) - builder and one-liner:
7371
`Actions.create("Redo", this::redo);`
7472

75-
* [`LabelProviders`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/jface/LabelProviders.html) - builder and one-liner:
73+
* [`LabelProviders`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/jface/LabelProviders.html) - builder and one-liner:
7674
`LabelProviders.createWithText(Person::getName)`
7775

78-
* [`ColumnFormat`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/ColumnFormat.html) and [`ColumnViewerFormat`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/jface/ColumnViewerFormat.html) - tables and trees without boilerplate
76+
* [`ColumnFormat`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/ColumnFormat.html) and [`ColumnViewerFormat`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/jface/ColumnViewerFormat.html) - tables and trees without boilerplate
7977

8078
```java
8179
ColumnViewerFormat<Person> format = ColumnViewerFormat.builder();
@@ -89,15 +87,15 @@ TreeViewer tree = format.buildTree(parent);
8987

9088
### Resource management
9189

92-
* [`OnePerWidget`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/OnePerWidget.html) - a cache tied to the lifetime of an SWT Widget.
93-
* [`ColorPool`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/ColorPool.html) - a pool of colors tied to the lifetime of a widget. `ColorPool.forWidget(widget).getColor(rgbValue)`
94-
* [`ImageDescriptors`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/jface/ImageDescriptors.html) - use ImageDescriptors with proper resource sharing. `ImageDescriptors.set(btn, imageDescriptor)`
90+
* [`OnePerWidget`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/OnePerWidget.html) - a cache tied to the lifetime of an SWT Widget.
91+
* [`ColorPool`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/ColorPool.html) - a pool of colors tied to the lifetime of a widget. `ColorPool.forWidget(widget).getColor(rgbValue)`
92+
* [`ImageDescriptors`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/jface/ImageDescriptors.html) - use ImageDescriptors with proper resource sharing. `ImageDescriptors.set(btn, imageDescriptor)`
9593

9694
### Interactive testing
9795

9896
Ideally, all UI code would have fully automated UI testing, but
9997
such tests are time-consuming to write, so they often just don't
100-
get written at all. [`InteractiveTest`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/InteractiveTest.html)
98+
get written at all. [`InteractiveTest`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/InteractiveTest.html)
10199
bridges the gap by making it easy to write user-in-the-loop guided tests. Furthermore,
102100
these tests can even be run in a [headless enviroment on a CI server](https://github.com/diffplug/durian-swt/blob/master/build.gradle#L66-L93), where the test UI
103101
will be opened, then automatically closed after a timeout. This ensures that the tests
@@ -129,23 +127,23 @@ InteractiveTest.testCoat(message, cmp -> {
129127

130128
### Miscellaneous stuff
131129

132-
* [`SwtMisc`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/SwtMisc.html) - useful static methods.
130+
* [`SwtMisc`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/SwtMisc.html) - useful static methods.
133131
+ `blockForError`, `blockForSuccess`, `blockForQuestion`, etc. - opens a dialog and blocks for the user's response, can be called from any thread.
134132
+ `loopUntil`, `loopUntilDisposed`, `loopUntilGet` - spins the SWT display loop until some condition is satisfied.
135133
+ `systemFontHeight/Width`, `scaleByFont`, `scaleByFontHeight` - resolution-independent sizes.
136134
+ `treeDefControl`, `treeDefComposite` - a [`TreeDef`](http://diffplug.github.io/durian/javadoc/snapshot/com/diffplug/common/base/TreeDef.html) for traversing UI elements.
137135
+ `setEnabledDeep` - sets the enabled status of every child, grandchild, etc. of the given composite.
138-
* [`SwtRx`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/SwtRx.html) - methods for converting SWT events and models to RxJava Observables.
139-
* [`SwtDebug`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/SwtDebug.html) - utilities for debugging SWT events.
140-
* [`OS`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/os/OS.html), [`Arch`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/os/Arch.html), and [`SwtPlatform`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/os/SwtPlatform.html) - detect things about the running system, and manipulate the SWT jars for build tools.
136+
* [`SwtRx`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/SwtRx.html) - methods for converting SWT events and models to RxJava Observables.
137+
* [`SwtDebug`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/SwtDebug.html) - utilities for debugging SWT events.
138+
* [`OS`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/os/OS.html), [`Arch`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/os/Arch.html), and [`SwtPlatform`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/os/SwtPlatform.html) - detect things about the running system, and manipulate the SWT jars for build tools.
141139
+ These do not require SWT or JFace, so you can add DurianSwt to your gradle or maven dependencies without needing to also figure out the SWT messiness.
142140
+ You can also just copy-paste these straight into your own code - they have no external dependencies.
143141
```java
144142
String installerExtension = OS.getNative().winMacLinux("exe","dmg","sh");
145143
String helperBinary = "driver_" + Arch.getNative().x86x64("", "_64") + ".dll";
146144
String swtJarName = "org.eclipse.swt." + SwtPlatform.getRunning();
147145
```
148-
* [`ViewerMisc`](https://diffplug.github.io/durian-swt/javadoc/3.3.0/com/diffplug/common/swt/jface/ViewerMisc.html) - useful static methods for JFace viewers.
146+
* [`ViewerMisc`](https://javadoc.io/static/com.diffplug.durian/durian-swt/3.3.0/com/diffplug/common/swt/jface/ViewerMisc.html) - useful static methods for JFace viewers.
149147
+ `singleSelection`, `multiSelection` - returns an RxBox for listening to and setting the selection of a viewer.
150148
+ `setTreeContentProvider`, `setLazyTreeContentProvider` - uses a TreeDef to provide the content of a TreeViewer.
151149

0 commit comments

Comments
 (0)