org.eclipse.emf.emfstore.internal.client.ui.dialogs
Class CommitDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.TrayDialog
              extended by org.eclipse.jface.dialogs.TitleAreaDialog
                  extended by org.eclipse.emf.emfstore.internal.client.ui.dialogs.EMFStoreTitleAreaDialog
                      extended by org.eclipse.emf.emfstore.internal.client.ui.dialogs.CommitDialog
All Implemented Interfaces:
EventListener, org.eclipse.jface.window.IShellProvider, org.eclipse.swt.events.KeyListener, org.eclipse.swt.internal.SWTEventListener

public class CommitDialog
extends EMFStoreTitleAreaDialog
implements org.eclipse.swt.events.KeyListener

This class shows a ChangesTreeComposite and a Text control to enter commit message.

Author:
Hodaie, Shterev

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
CommitDialog(org.eclipse.swt.widgets.Shell parentShell, ChangePackage changes, ProjectSpace activeProjectSpace, ModelElementIdToEObjectMapping idToEObjectMapping)
          Constructor.
 
Method Summary
 boolean close()
           
 ProjectSpace getActiveProjectSpace()
          Returns the active project space.
 ChangePackage getChangePackage()
          Returns the change package displayed by the commit dialog.
 String getLogText()
           
 List<AbstractOperation> getOperations()
           
 void keyPressed(org.eclipse.swt.events.KeyEvent e)
          handles the pressing of Ctrl+ENTER: OKpressed() is called.
 void keyReleased(org.eclipse.swt.events.KeyEvent e)
          does nothing.
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
getErrorMessage, getMessage, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
 
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, create, getBlockedHandler, getImage, setBlockedHandler, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
getDefaultImage, getDefaultImages, getDefaultOrientation, getReturnCode, getShell, getWindowManager, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setWindowManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommitDialog

public CommitDialog(org.eclipse.swt.widgets.Shell parentShell,
                    ChangePackage changes,
                    ProjectSpace activeProjectSpace,
                    ModelElementIdToEObjectMapping idToEObjectMapping)
Constructor.

Parameters:
parentShell - shell
changes - the ChangePackage to be displayed
activeProjectSpace - ProjectSpace that will be committed
idToEObjectMapping - a mapping between ModelElementIds and EObjects. This is needed correctly infer information about deleted model elements
Method Detail

getChangePackage

public ChangePackage getChangePackage()
Returns the change package displayed by the commit dialog.

Returns:
the change package

getActiveProjectSpace

public ProjectSpace getActiveProjectSpace()
Returns the active project space.

Returns:
the active project space

close

public boolean close()
Overrides:
close in class org.eclipse.jface.dialogs.Dialog

getLogText

public String getLogText()
Returns:
the log message that has been set by the user.

keyPressed

public void keyPressed(org.eclipse.swt.events.KeyEvent e)
handles the pressing of Ctrl+ENTER: OKpressed() is called.

Specified by:
keyPressed in interface org.eclipse.swt.events.KeyListener
See Also:
KeyListener.keyPressed(org.eclipse.swt.events.KeyEvent)

keyReleased

public void keyReleased(org.eclipse.swt.events.KeyEvent e)
does nothing.

Specified by:
keyReleased in interface org.eclipse.swt.events.KeyListener
See Also:
KeyListener.keyReleased(org.eclipse.swt.events.KeyEvent)

getOperations

public List<AbstractOperation> getOperations()
Returns:
the operations.


Copyright © 2015. All Rights Reserved.