Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #16: NullPointerException occurs after a while

  • Loading branch information...
commit 122448c473cfb4588f94d19f1c308966354d746c 1 parent cb7c277
@ystrot authored
View
8 .../com.xored.glance.ui.viewers/src/com/xored/glance/internal/ui/viewers/ViewerSelector.java
@@ -13,22 +13,24 @@
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.text.TextViewer;
-import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.custom.StyledText;
import com.xored.glance.ui.controls.text.styled.TextSelector;
public class ViewerSelector extends TextSelector {
private final TextViewer viewer;
+ private final StyledText control;
public ViewerSelector(TextViewer viewer) {
this.viewer = viewer;
+ this.control = viewer.getTextWidget();
init();
}
@Override
- protected Control getControl() {
- return viewer.getTextWidget();
+ protected StyledText getControl() {
+ return control;
}
@Override
Please sign in to comment.
Something went wrong with that request. Please try again.