Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Example - Multi-page Editor

Introduction

The  Multi Page Editor Example adds an editor for files with the .mpe extension. It shows how to create an editor that uses multiple pages by defining both an editor and a page contributor that can add entries to an action bar.

Running the example

To start using the Multi-page Editor Example, create a new file with .mpe extension.  Select the file, bring up the popup menu, select the Open With menu and from the sub-menu select the Multi Page Editor Example menu item. You can then select the different editors by selecting the different tabs.

Creating a new mpe file

Create a new file with file extension .mpe.  From the File menu, select New and then select Other... from the sub-menu.  Click on Simple in the wizard, then select
File in the list on the left.  Click on Next to supply the file name (make sure the extension is .mpe) and the folder in which the file should be contained.
 

Details

The  Multi Page Editor Example demonstrates how to create an multi page editor with a custom page contributor.

The Multi Page Editor Example is constructed with two extensions - a document contributor (MultiPageContributor) and an editor (MultiPageEditor). The document contributor is a subclass of org.eclipse.ui.part.MultiPageEditorActionBarContributor and defines the actions that are added to an editor when the setActivePage method is called. The editor is an org.eclipse.ui.part.MultiPageEditorPart that creates 3 pages whose activation is handled by the pageChange method that in turn sends setActivePage to the contributor. These two classes do not refer to each other directly - the contributor for the editor is set using the contributorClass tag in the plugin.xml


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire