org.eclipse.ui.IEditorActionBarContributor Java Examples

The following examples show how to use org.eclipse.ui.IEditorActionBarContributor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractMultiPageEditor.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Notifies action bar contributor about page change.
 * 
 * @param pageIndex
 *            the index of the new page
 */
protected void updateActionBarContributor( int pageIndex )
{
	super.updateActionBarContributor( pageIndex );
	// Overwrite this method to implement multi-editor action bar
	// contributor
	IEditorActionBarContributor contributor = getEditorSite( ).getActionBarContributor( );
	if ( contributor instanceof IMultiPageEditorActionBarContributor
			&& pageIndex >= 0
			&& pageIndex < pages.size( ) )
	{
		Object page = pages.get( pageIndex );
		if ( page instanceof IFormPage )
		{
			( (IMultiPageEditorActionBarContributor) contributor ).setActivePage( (IFormPage) page );
		}
	}

}
 
Example #2
Source File: FormPageDef.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public IEditorActionBarContributor createActionBarContributor( )
{
	Object def = loadClass( element, ATTRIBUTE_ACTION_BAR_CONTRIBUTOR );
	if ( def instanceof IEditorActionBarContributor )
	{
		return (IEditorActionBarContributor) def;
	}
	return null;
}
 
Example #3
Source File: EditorUtils.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
public static IStatusLineManager getStatusLineManager(ITextEditor editor) {
    IEditorActionBarContributor contributor = editor.getEditorSite().getActionBarContributor();
    if (!(contributor instanceof EditorActionBarContributor)) {
        return null;
    }

    IActionBars actionBars = ((EditorActionBarContributor) contributor).getActionBars();
    if (actionBars == null) {
        return null;
    }

    return actionBars.getStatusLineManager();
}
 
Example #4
Source File: MultiPageEditorActionBarContributor.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public SubActionBarDef( IActionBars rootBar,
		IEditorActionBarContributor actionBarContrubutor )
{
	this.subActionBar = new SubActionBars( rootBar );
	this.actionBarContrubutor = actionBarContrubutor;
}
 
Example #5
Source File: DummyEditorSite.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
@Override
public IEditorActionBarContributor getActionBarContributor() {
    return null;
}
 
Example #6
Source File: EmbeddedEditorSite.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
@Override
public IEditorActionBarContributor getActionBarContributor() {
    return null;
}
 
Example #7
Source File: BibtexEditor.java    From slr-toolkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
public IEditorActionBarContributor getActionBarContributor() {
	return getEditorSite().getActionBarContributor();
}