Java 类org.eclipse.ui.part.MessagePage 实例源码

项目:LogViewer    文件:ResourceUtils.java   
public static ITextViewer getViewer(IPage page) {
    if(page == null){
        return null;
    }
    if(page instanceof TextConsolePage) {
        return ((TextConsolePage)page).getViewer();
    }
    if(page.getClass().equals(MessagePage.class)){
        // empty page placeholder
        return null;
    }
    try {
        /*
         * org.eclipse.cdt.internal.ui.buildconsole.BuildConsolePage does not
         * extend TextConsolePage, so we get access to the viewer with dirty tricks
         */
        Method method = page.getClass().getDeclaredMethod("getViewer", (Class<?>[])null);
        method.setAccessible(true);
        return (ITextViewer) method.invoke(page, (Object[])null);
    } catch (Exception e) {
        // AnyEditToolsPlugin.logError("Can't get page viewer from the console page", e);
    }
    return null;
}
项目:SPELL    文件:ProcedurePageView.java   
@Override
protected IPage createDefaultPage(PageBook book)
{
    MessagePage defaultPage = new MessagePage();
    initPage(defaultPage);
    defaultPage.setMessage(m_defaultMsg);
    defaultPage.createControl(book);
    setPartName(m_defaultTitle);
    return defaultPage;
}
项目:OpenSPIFe    文件:DefaultPageBookView.java   
/**
 * {@inheritDoc}
 */
@Override
protected IPage createDefaultPage(PageBook book) {
    MessagePage page = new MessagePage();
    initPage(page);
    page.createControl(book);
    page.setMessage("default page");
    return page;
}
项目:OpenSPIFe    文件:DetailView.java   
@Override
protected IPage createDefaultPage(PageBook book) {
       IPage page = super.createDefaultPage(book);
       if (page instanceof MessagePage) {
           ((MessagePage)page).setMessage("Nothing currently selected.");
       }
       return page;
   }
项目:OpenSPIFe    文件:PlanPageBookView.java   
/**
 * Creates, initializes and returns the default page for this view, giving it the default
 * message. Implements the abstract method from Eclipse class PageBookView.
 * @param book the PageBook control that will become the parent of the new page
 * @return the newly-created page
 */
@Override
protected IPage createDefaultPage(PageBook book) {
    MessagePage page = new MessagePage();
    initPage(page);
    page.createControl(book);
    page.setMessage(defaultMessage);
       return page;
}
项目:tesb-studio-se    文件:SpringConfigurationView.java   
@Override
protected IPage createDefaultPage(PageBook book) {
    MessagePage page = new MessagePage();
    initPage(page);
    page.createControl(book);
    page.setMessage(CamelDesignerMessages.getString("SpringConfigurationView_defaultMessage")); //$NON-NLS-1$
    return page;
}
项目:gef-gwt    文件:PaletteView.java   
/**
 * Creates a default page saying that a palette is not available.
 * 
 * @see org.eclipse.ui.part.PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook)
 */
protected IPage createDefaultPage(PageBook book) {
    MessagePage page = new MessagePage();
    initPage(page);
    page.createControl(book);
    page.setMessage(GEFMessages.Palette_Not_Available);
    return page;
}
项目:birt    文件:LibraryExplorerView.java   
/**
 * Creates and returns the default page for this view.
 * 
 * @param book
 *            the pagebook control
 * @return the default page
 */
protected IPage createDefaultPage( PageBook book )
{
    MessagePage page = new MessagePage( );
    initPage( page );
    page.createControl( book );
    page.setMessage( defaultText );
    return page;
}
项目:birt    文件:DataView.java   
/**
 * Creates and returns the default page for this view.
 * 
 * @param book
 *            the pagebook control
 * @return the default page
 */
protected IPage createDefaultPage( PageBook book )
{
    MessagePage page = new MessagePage( );
    initPage( page );
    page.createControl( book );
    page.setMessage( defaultText );
    return page;
}
项目:birt    文件:AttributeView.java   
protected IPage createDefaultPage( PageBook book )
{
    MessagePage page = new MessagePage( );
    initPage( page );
    page.createControl( book );
    page.setMessage( defaultText );
    if ( defaultPartName == null )
    {
        defaultPartName = getPartName( );
    }
    return page;
}