Permalink
Browse files

IDE-857

  • Loading branch information...
1 parent 2155a07 commit 3df75bf5b502c3e281a7cd6d71fdce989bd7e24b @cinnndy9 cinnndy9 committed with gamerson Mar 11, 2013
@@ -129,26 +129,19 @@ public Object getAdapter( Class adapter )
if( IContentOutlinePage.class.equals( adapter ) )
{
- if( this.multiOutlinePage == null )
+ if( this.multiOutlinePage == null && sourceEditor != null && visualEditor != null )
{
// get outline pages for both source and visual editors
- IContentOutlinePage sourceOutlinePage = null;
+ IContentOutlinePage sourceOutlinePage = (IContentOutlinePage) sourceEditor.getAdapter( adapter );
- if( sourceEditor != null )
- {
- sourceOutlinePage = (IContentOutlinePage) sourceEditor.getAdapter( adapter );
- }
+ IContentOutlinePage visualOutlinePage = (IContentOutlinePage) visualEditor.getAdapter( adapter );
- IContentOutlinePage visualOutlinePage = null;
-
- if( visualEditor != null )
+ if( sourceOutlinePage != null && visualOutlinePage != null )
{
- visualOutlinePage = (IContentOutlinePage) visualEditor.getAdapter( adapter );
+ LayoutTplMultiOutlinePage outlinePage =
+ new LayoutTplMultiOutlinePage( this, sourceOutlinePage, visualOutlinePage );
+ this.multiOutlinePage = outlinePage;
}
-
- LayoutTplMultiOutlinePage outlinePage =
- new LayoutTplMultiOutlinePage( this, sourceOutlinePage, visualOutlinePage );
- this.multiOutlinePage = outlinePage;
}
return multiOutlinePage;

0 comments on commit 3df75bf

Please sign in to comment.