org.fosstrak.llrp.commander.editors
Class LLRPEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.ui.part.MultiPageEditorPart
                  extended by org.eclipse.ui.forms.editor.FormEditor
                      extended by org.fosstrak.llrp.commander.editors.LLRPEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.dialogs.IPageChangeProvider, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class LLRPEditor
extends org.eclipse.ui.forms.editor.FormEditor

This editor extended Eclipse FormEditor, which contains multiple pages. It provides one XML Editor page, one Graphics Editor page, and one Binary format viewer. In this multiple page editor, those three page works on the same message file, but only XML editor touch the file system. Once the message changed, XML Editor pass the LLRPBitList to Binary Viewer to update the binary format. The target file will be stored under one Eclipse project.

Version:
1.0
Author:
Haoning Zhang

Field Summary
 
Fields inherited from class org.eclipse.ui.forms.editor.FormEditor
pages
 
Fields inherited from class org.eclipse.ui.part.MultiPageEditorPart
PAGE_CONTAINER_SITE
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
LLRPEditor()
           
 
Method Summary
protected  void addPages()
          Extends FormEditor.addPages() Initial three pages involved in this FormEditor
 void doSave(org.eclipse.core.runtime.IProgressMonitor aMonitor)
          Here the XML Editor Page save the content.
 void doSaveAs()
          Here the XML Editor Page save as the content.
 boolean isSaveAsAllowed()
          Always true.
 void markXMLEditorAsDirty()
          Marks the XML Editor as dirty.
protected  void pageChange(int aNewPageIndex)
          When user change the page, the content should be synchronized here.
 void setFocus()
           
 
Methods inherited from class org.eclipse.ui.forms.editor.FormEditor
addPage, addPage, addPage, addPage, addPage, addPage, addPageChangedListener, close, commitPages, configurePage, createPageContainer, createPages, createToolkit, dispose, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, init, isDirty, removePage, removePageChangedListener, selectReveal, setActivePage, setActivePage, setActivePage, updateActionBarContributor
 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
activateSite, createPartControl, createSite, deactivateSite, findEditors, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, handlePropertyChange, initializePageSwitching, setActiveEditor, setControl, setPageImage, setPageText
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 

Constructor Detail

LLRPEditor

public LLRPEditor()
Method Detail

addPages

protected void addPages()
Extends FormEditor.addPages() Initial three pages involved in this FormEditor

Specified by:
addPages in class org.eclipse.ui.forms.editor.FormEditor

pageChange

protected void pageChange(int aNewPageIndex)
When user change the page, the content should be synchronized here.

Overrides:
pageChange in class org.eclipse.ui.forms.editor.FormEditor

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Overrides:
setFocus in class org.eclipse.ui.part.MultiPageEditorPart

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor aMonitor)
Here the XML Editor Page save the content.

Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Specified by:
doSave in class org.eclipse.ui.part.EditorPart

isSaveAsAllowed

public boolean isSaveAsAllowed()
Always true.

Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Specified by:
isSaveAsAllowed in class org.eclipse.ui.part.EditorPart

doSaveAs

public void doSaveAs()
Here the XML Editor Page save as the content.

Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Specified by:
doSaveAs in class org.eclipse.ui.part.EditorPart

markXMLEditorAsDirty

public void markXMLEditorAsDirty()
Marks the XML Editor as dirty.



Copyright © 2009. All Rights Reserved.