diff options
author | Alena Laskavaia | 2016-07-26 16:35:06 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-09-07 16:35:38 +0000 |
commit | bb01906828d12cfbf440ed83139c7fa32fc1a66d (patch) | |
tree | 83c573a32efd2ad8ba2bb8985a50c59648e132b2 | |
parent | 16c4e9af52609ae9db09beca97a11c182fb7890f (diff) | |
download | org.eclipse.cdt-cdt_9_0.tar.gz org.eclipse.cdt-cdt_9_0.tar.xz org.eclipse.cdt-cdt_9_0.zip |
fixed NPEcdt_9_0
Change-Id: I817d227711384551e88fc59c124ffead5284ef06
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java index b576ccb110d..936780cf1f4 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java @@ -50,6 +50,7 @@ import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -122,8 +123,8 @@ public class BuildConsolePage extends Page // actions private ClearOutputAction fClearOutputAction; - private Map<String, IAction> fGlobalActions = new HashMap<String, IAction>(10); - private List<String> fSelectionActions = new ArrayList<String>(3); + private Map<String, IAction> fGlobalActions = new HashMap<>(10); + private List<String> fSelectionActions = new ArrayList<>(3); private CopyBuildLogAction fSaveLogAction; // menus @@ -521,7 +522,10 @@ public class BuildConsolePage extends Page * tab width */ protected void setTabs(int tabs) { - getViewer().getTextWidget().setTabs(tabs); + StyledText textWidget = getViewer().getTextWidget(); + if (textWidget != null) { + textWidget.setTabs(tabs); + } } /** |