org.drools.eclipse.editors
Class DRLRuleEditor2

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.drools.eclipse.editors.DRLRuleEditor2
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 DRLRuleEditor2
extends org.eclipse.ui.forms.editor.FormEditor

This is a multi table editor wrapper for both the text editor and the RETE viewer.


Field Summary
protected  ReteGraph graph
           
 
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
DRLRuleEditor2()
           
 
Method Summary
protected  void addPages()
          Adds Text Editor for rules and Rete graph viewer
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void doSaveAs()
           
 Object getAdapter(Class adapter)
           
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
           
 boolean isSaveAsAllowed()
           
 void setActivePage(int pageIndex)
          Increasing visibility to allow switching tabs by page index
 void setFocus()
           
 void setZoomComboContributionItem(org.eclipse.gef.ui.actions.ZoomComboContributionItem zitem)
          Sets ZoomComboContributionItem to be used for updating it's ZoomManager when multipage tab is switched.
 void setZoomInAction(ZoomInAction2 zoomInAction)
          Sets ZoomInAction to be used for updating it's ZoomManager when multipage tab is switched.
 void setZoomOutAction(ZoomOutAction2 zoomOutAction)
          Sets ZoomOutAction2 to be used for updating it's ZoomManager when multipage tab is switched.
 
Methods inherited from class org.eclipse.ui.forms.editor.FormEditor
addPage, addPage, addPage, addPage, addPage, addPage, close, commitPages, configurePage, createPageContainer, createPages, createToolkit, dispose, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, isDirty, pageChange, removePage, selectReveal, setActivePage, setActivePage, updateActionBarContributor
 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
activateSite, addPageChangedListener, createPartControl, createSite, deactivateSite, findEditors, getActivePage, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, handlePropertyChange, initializePageSwitching, removePageChangedListener, 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
 

Field Detail

graph

protected ReteGraph graph
Constructor Detail

DRLRuleEditor2

public DRLRuleEditor2()
Method Detail

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput input)
          throws org.eclipse.ui.PartInitException
Specified by:
init in interface org.eclipse.ui.IEditorPart
Overrides:
init in class org.eclipse.ui.forms.editor.FormEditor
Throws:
org.eclipse.ui.PartInitException

addPages

protected void addPages()
Adds Text Editor for rules and Rete graph viewer

Specified by:
addPages in class org.eclipse.ui.forms.editor.FormEditor
See Also:
FormEditor.addPages()

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Specified by:
doSave in class org.eclipse.ui.part.EditorPart

doSaveAs

public void doSaveAs()
Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Specified by:
doSaveAs in class org.eclipse.ui.part.EditorPart

isSaveAsAllowed

public boolean isSaveAsAllowed()
Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Specified by:
isSaveAsAllowed in class org.eclipse.ui.part.EditorPart

getAdapter

public Object getAdapter(Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class org.eclipse.ui.part.MultiPageEditorPart

setZoomComboContributionItem

public void setZoomComboContributionItem(org.eclipse.gef.ui.actions.ZoomComboContributionItem zitem)
Sets ZoomComboContributionItem to be used for updating it's ZoomManager when multipage tab is switched.

Parameters:
zitem - contribution item

setZoomOutAction

public void setZoomOutAction(ZoomOutAction2 zoomOutAction)
Sets ZoomOutAction2 to be used for updating it's ZoomManager when multipage tab is switched.

Parameters:
zoomOutAction - zoom action

setZoomInAction

public void setZoomInAction(ZoomInAction2 zoomInAction)
Sets ZoomInAction to be used for updating it's ZoomManager when multipage tab is switched.

Parameters:
zoomInAction - zoom action

setFocus

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

setActivePage

public void setActivePage(int pageIndex)
Increasing visibility to allow switching tabs by page index

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


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.