Class Editor
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.part.WorkbenchPart
-
- org.eclipse.ui.part.EditorPart
-
- org.eclipse.ui.part.MultiPageEditorPart
-
- net.ssehub.easy.producer.ui.productline_editor.Editor
-
- All Implemented Interfaces:
java.util.Observer,IProductLineProjectListener,IEASyPageListener,org.eclipse.core.runtime.IAdaptable,org.eclipse.core.runtime.IExecutableExtension,org.eclipse.jface.dialogs.IPageChangeProvider,org.eclipse.ui.IEditorPart,org.eclipse.ui.IPropertyListener,org.eclipse.ui.ISaveablePart,org.eclipse.ui.IWorkbenchPart,org.eclipse.ui.IWorkbenchPart2,org.eclipse.ui.IWorkbenchPart3,org.eclipse.ui.part.IWorkbenchPartOrientation
public class Editor extends org.eclipse.ui.part.MultiPageEditorPart implements java.util.Observer, org.eclipse.ui.IPropertyListener, IEASyPageListener, IProductLineProjectListener
Multipage editor for editing and configuring one product line project.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisDirtyprivate java.util.List<AbstractEASyEditorPage>pagesprivate ProductLineProjectplpprivate static java.util.Set<IEASyEditorPageCreator>SPECIALIZED_EDITOR_PAGES
-
Constructor Summary
Constructors Constructor Description Editor()Sole constructor for this class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddConditionalPage(AbstractEASyEditorPage page)Adds an editor page.voidbuildScriptChanged()This method is called, if thePLPInfo.getBuildScript()was changed.voidconfigurationPulled()This method is called, if the configuration is pulled.protected voidcreatePages()voiddispose()voiddoSave(org.eclipse.core.runtime.IProgressMonitor monitor)voiddoSaveAs()voidinit(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput)booleanisDirty()booleanisSaveAsAllowed()voidpageBecomesDirty(AbstractEASyEditorPage page)Informs the listener that the page becomes dirty.voidprojectClosed()This method is called, if the relatedPLPInfois closed.voidpropertyChanged(java.lang.Object source, int propId)static voidregisterNewPage(IEASyEditorPageCreator pageCreator)Registers aIEASyEditorPageCreatorfrom an extension plug-in to this class.voidupdate(java.util.Observable obs, java.lang.Object arg)-
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart
activateSite, addPage, addPage, addPage, addPage, addPageChangedListener, createContainer, createItem, createPageContainer, createPartControl, createSite, deactivateSite, findEditors, getActiveEditor, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, getSelectedPage, handlePropertyChange, initializePageSwitching, pageChange, removePage, removePageChangedListener, setActiveEditor, setActivePage, setControl, setFocus, 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
-
-
-
-
Field Detail
-
SPECIALIZED_EDITOR_PAGES
private static final java.util.Set<IEASyEditorPageCreator> SPECIALIZED_EDITOR_PAGES
-
plp
private ProductLineProject plp
-
isDirty
private boolean isDirty
-
pages
private java.util.List<AbstractEASyEditorPage> pages
-
-
Method Detail
-
init
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException- Specified by:
initin interfaceorg.eclipse.ui.IEditorPart- Overrides:
initin classorg.eclipse.ui.part.MultiPageEditorPart- Throws:
org.eclipse.ui.PartInitException
-
addConditionalPage
private void addConditionalPage(AbstractEASyEditorPage page)
Adds an editor page.- Parameters:
page- the editor page (ignored if null)
-
createPages
protected void createPages()
- Specified by:
createPagesin classorg.eclipse.ui.part.MultiPageEditorPart
-
dispose
public void dispose()
- Specified by:
disposein interfaceorg.eclipse.ui.IWorkbenchPart- Overrides:
disposein classorg.eclipse.ui.part.MultiPageEditorPart
-
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
doSavein interfaceorg.eclipse.ui.ISaveablePart- Specified by:
doSavein classorg.eclipse.ui.part.EditorPart
-
doSaveAs
public void doSaveAs()
- Specified by:
doSaveAsin interfaceorg.eclipse.ui.ISaveablePart- Specified by:
doSaveAsin classorg.eclipse.ui.part.EditorPart
-
isSaveAsAllowed
public boolean isSaveAsAllowed()
- Specified by:
isSaveAsAllowedin interfaceorg.eclipse.ui.ISaveablePart- Specified by:
isSaveAsAllowedin classorg.eclipse.ui.part.EditorPart
-
update
public void update(java.util.Observable obs, java.lang.Object arg)- Specified by:
updatein interfacejava.util.Observer
-
isDirty
public boolean isDirty()
- Specified by:
isDirtyin interfaceorg.eclipse.ui.ISaveablePart- Overrides:
isDirtyin classorg.eclipse.ui.part.MultiPageEditorPart
-
propertyChanged
public void propertyChanged(java.lang.Object source, int propId)- Specified by:
propertyChangedin interfaceorg.eclipse.ui.IPropertyListener
-
pageBecomesDirty
public void pageBecomesDirty(AbstractEASyEditorPage page)
Description copied from interface:IEASyPageListenerInforms the listener that the page becomes dirty.- Specified by:
pageBecomesDirtyin interfaceIEASyPageListener- Parameters:
page- The page which becomes dirty.
-
configurationPulled
public void configurationPulled()
Description copied from interface:IProductLineProjectListenerThis method is called, if the configuration is pulled.- Specified by:
configurationPulledin interfaceIProductLineProjectListener
-
projectClosed
public void projectClosed()
Description copied from interface:IProductLineProjectListenerThis method is called, if the relatedPLPInfois closed.- Specified by:
projectClosedin interfaceIProductLineProjectListener
-
registerNewPage
public static void registerNewPage(IEASyEditorPageCreator pageCreator)
Registers aIEASyEditorPageCreatorfrom an extension plug-in to this class. New instances of this editor will now also create a nested page for the editor of the givenIEASyEditorPageCreator. This method should be called during the startup of eclipse and before the first editor was opened.- Parameters:
pageCreator- AIEASyEditorPageCreatorof a extension plug-in which provides a newAbstractEASyEditorPage.
-
buildScriptChanged
public void buildScriptChanged()
Description copied from interface:IProductLineProjectListenerThis method is called, if thePLPInfo.getBuildScript()was changed.- Specified by:
buildScriptChangedin interfaceIProductLineProjectListener
-
-