Update of /cvsroot/csseditor/net.sourceforge.csseditor/src/net/sourceforge/csseditor/internal/outline
In directory sc8-pr-cvs1:/tmp/cvs-serv18121/src/net/sourceforge/csseditor/internal/outline
Modified Files:
CssOutlinePage.java
Log Message:
Be conservative: retrieve the stylesheet before populating the outline page, and check whether it's null
Index: CssOutlinePage.java
===================================================================
RCS file: /cvsroot/csseditor/net.sourceforge.csseditor/src/net/sourceforge/csseditor/internal/outline/CssOutlinePage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CssOutlinePage.java 27 Dec 2003 18:46:55 -0000 1.2
--- CssOutlinePage.java 13 Jan 2004 16:19:22 -0000 1.3
***************
*** 286,297 ****
*/
public void update() {
! TreeViewer viewer = getTreeViewer();
! if (viewer != null) {
! Control control = viewer.getControl();
! if ((control != null) && !control.isDisposed()) {
! control.setRedraw(false);
! viewer.setInput(getStyleSheet());
! viewer.expandAll();
! control.setRedraw(true);
}
}
--- 286,300 ----
*/
public void update() {
! IStyleSheet styleSheet = getStyleSheet();
! if (styleSheet != null) {
! TreeViewer viewer = getTreeViewer();
! if (viewer != null) {
! Control control = viewer.getControl();
! if ((control != null) && !control.isDisposed()) {
! control.setRedraw(false);
! viewer.setInput(styleSheet);
! viewer.expandAll();
! control.setRedraw(true);
! }
}
}
|