|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.part.MultiPageEditorPart
org.infai.emo.matcher.editor.ModelMatcherEditor
public class ModelMatcherEditor
This class is the editorClass that provides the MultiPageEditor for the comparison, mapping, ...
The first Page visualizes the matching between both models and the second page shows the mapping and the differences of the models.
MultiPageEditorPart
Field Summary | |
---|---|
private ModelComparatorPage |
comparatorPage
The page of this MultiPageEditor that visualizes the matching between both models. |
private DifferencePage |
differencePage
The page of this MultiPageEditor that visualizes the mapping of the models and contains the difference-model. |
private ModelMatcherEditor |
editor
The current instance of this class. |
private Input |
input
The Editor Input used for a reload of a saved difference. |
private ModelComparator |
modelComparator
The comparator that is responsible for the whole model-initializing and comparison. |
private org.eclipse.jface.action.Action |
reloadAction
The action that is activated when the user clicks on the "reload" button on the menu-bar. |
private org.eclipse.jface.action.Action |
saveDiffAction
The action that is activated when the user clicks on the "save diff" button on the menubar. |
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 | |
---|---|
ModelMatcherEditor()
|
Method Summary | |
---|---|
private void |
createActions()
Method creates the actions for the editor which are intended to be available at the editor-startup. |
(package private) void |
createPage0(org.eclipse.swt.widgets.Composite parent)
This method creates the first page of the editor. |
(package private) void |
createPage2(org.eclipse.swt.widgets.Composite parent)
This method creates the third page of the editor. |
protected void |
createPages()
Method creates the pages of this editor. |
private void |
createToolBar()
Sets the created actions to the editors toolBar. |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
doSaveAs()
|
ModelComparatorPage |
getComparatorPage()
|
private org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(java.lang.String fileName)
Returns an ImageDescriptor for an image file. |
ModelComparator |
getModelComparator()
|
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput editorInput)
|
void |
initInput(java.lang.String leftModelPath,
java.lang.String rightModelPath,
java.lang.String metaModelPath,
java.util.Hashtable<java.lang.String,java.lang.Double> weightings,
boolean useCrossProduct)
Initialize the Models and call the Methods of the ModelMatcherTreeViewers to initialize their input by giving them the resource of the model they are responsible for. |
boolean |
isSaveAsAllowed()
|
private void |
loadDiffModel(Input input)
This method loads the difference-model from the given input. |
protected void |
pageChange(int newPageIndex)
|
void |
setComparatorPage(ModelComparatorPage comparatorPage)
|
void |
setFocus()
|
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
---|
activateSite, addPage, addPage, addPage, addPage, createPageContainer, createPartControl, createSite, deactivateSite, dispose, findEditors, getActiveEditor, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, handlePropertyChange, initializePageSwitching, isDirty, removePage, setActiveEditor, setActivePage, 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 |
---|
private ModelComparator modelComparator
ModelComparator
private org.eclipse.jface.action.Action saveDiffAction
Action
private org.eclipse.jface.action.Action reloadAction
Action
private ModelMatcherEditor editor
private ModelComparatorPage comparatorPage
ModelComparatorPage
private DifferencePage differencePage
DifferencePage
private Input input
Input
Constructor Detail |
---|
public ModelMatcherEditor()
Method Detail |
---|
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException
init
in interface org.eclipse.ui.IEditorPart
init
in class org.eclipse.ui.part.MultiPageEditorPart
org.eclipse.ui.PartInitException
protected void createPages()
createPages
in class org.eclipse.ui.part.MultiPageEditorPart
private void loadDiffModel(Input input)
input
- the input for the editor.input
void createPage0(org.eclipse.swt.widgets.Composite parent)
parent
- the composite on which the page shall be located.Composite
void createPage2(org.eclipse.swt.widgets.Composite parent)
parent
- the composite on which the page shall be located.Composite
private void createActions()
private void createToolBar()
private org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String fileName)
fileName
- the name of the file that contains the image.
ImageDescriptor
public void initInput(java.lang.String leftModelPath, java.lang.String rightModelPath, java.lang.String metaModelPath, java.util.Hashtable<java.lang.String,java.lang.Double> weightings, boolean useCrossProduct)
ModelMatcherTreeViewers
to initialize their input by giving them the resource of the model they are responsible for.
metaModelPath
- the path of the metamodel.leftModelPath
- the path of the first model.rightModelPath
- the path of the second model.weightings
- the Hashtable
that contains the weightings for the comparison criteria.useCrossProduct
- indicates if a full cross product shall be used to match the models.public void setFocus()
setFocus
in interface org.eclipse.ui.IWorkbenchPart
setFocus
in class org.eclipse.ui.part.MultiPageEditorPart
public ModelComparator getModelComparator()
ModelComparator
that controlled the comparison of both models.public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave
in interface org.eclipse.ui.ISaveablePart
doSave
in class org.eclipse.ui.part.EditorPart
public void doSaveAs()
doSaveAs
in interface org.eclipse.ui.ISaveablePart
doSaveAs
in class org.eclipse.ui.part.EditorPart
public boolean isSaveAsAllowed()
isSaveAsAllowed
in interface org.eclipse.ui.ISaveablePart
isSaveAsAllowed
in class org.eclipse.ui.part.EditorPart
public ModelComparatorPage getComparatorPage()
comparatorPage
public void setComparatorPage(ModelComparatorPage comparatorPage)
comparatorPage
- the ComparatorPage
to be set.protected void pageChange(int newPageIndex)
pageChange
in class org.eclipse.ui.part.MultiPageEditorPart
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |