mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
fixed NPE
Change-Id: I817d227711384551e88fc59c124ffead5284ef06
This commit is contained in:
parent
2388bb65c5
commit
a6062a2b98
1 changed files with 7 additions and 3 deletions
|
@ -50,6 +50,7 @@ import org.eclipse.jface.viewers.ISelectionProvider;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
|
import org.eclipse.swt.custom.StyledText;
|
||||||
import org.eclipse.swt.graphics.Font;
|
import org.eclipse.swt.graphics.Font;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
@ -122,8 +123,8 @@ public class BuildConsolePage extends Page
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
private ClearOutputAction fClearOutputAction;
|
private ClearOutputAction fClearOutputAction;
|
||||||
private Map<String, IAction> fGlobalActions = new HashMap<String, IAction>(10);
|
private Map<String, IAction> fGlobalActions = new HashMap<>(10);
|
||||||
private List<String> fSelectionActions = new ArrayList<String>(3);
|
private List<String> fSelectionActions = new ArrayList<>(3);
|
||||||
private CopyBuildLogAction fSaveLogAction;
|
private CopyBuildLogAction fSaveLogAction;
|
||||||
|
|
||||||
// menus
|
// menus
|
||||||
|
@ -521,7 +522,10 @@ public class BuildConsolePage extends Page
|
||||||
* tab width
|
* tab width
|
||||||
*/
|
*/
|
||||||
protected void setTabs(int tabs) {
|
protected void setTabs(int tabs) {
|
||||||
getViewer().getTextWidget().setTabs(tabs);
|
StyledText textWidget = getViewer().getTextWidget();
|
||||||
|
if (textWidget != null) {
|
||||||
|
textWidget.setTabs(tabs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue