Package org.eclipse.mat.ui.internal.views

# Class NotesView

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.mat.ui.internal.views.NotesView

All Implemented Interfaces:
  `IAdaptable`, `IExecutableExtension`, `IPartListener`, `IPersistable`, `ISaveablePart`, `ISaveablePart2`, `IViewPart`, `IWorkbenchPart`, `IWorkbenchPart2`, `IWorkbenchPart3`, `IWorkbenchPartOrientation`

public class NotesView extends ViewPart implements IPartListener, ISaveablePart, ISaveablePart2

## Field Summary

### Fields inherited from interface org.eclipse.ui.ISaveablePart

`PROP_DIRTY`

### Fields inherited from interface org.eclipse.ui.ISaveablePart2

`CANCEL, DEFAULT, NO, YES`

### Fields inherited from interface org.eclipse.ui.IWorkbenchPart

`PROP_TITLE`

## Constructor Summary

Constructors
Constructor
Description
`NotesView()`

## Method Summary

Modifier and Type
Method
Description
`void`
`createPartControl(Composite parent)`
`void`
`dispose()`
`void`
`doSave(IProgressMonitor monitor)`
`void`
`doSaveAs()`
`boolean`
`isDirty()`
`boolean`
`isSaveAsAllowed()`
`boolean`
`isSaveOnCloseNeeded()`
`void`
`partActivated(IWorkbenchPart part)`
`void`
`partBroughtToTop(IWorkbenchPart part)`
`void`
`partClosed(IWorkbenchPart part)`
`void`
`partDeactivated(IWorkbenchPart part)`
`void`
`partOpened(IWorkbenchPart part)`
`int`
`promptToSaveOnClose()`
`static String`
`readNotes(File resourcePath)`
Read the contents of the notes file, based on the snapshot resource.
`void`
`resetUndoManager()`
`void`
`setFocus()`

### Methods inherited from class org.eclipse.ui.part.ViewPart

`getViewSite, init, init, saveState, setInitializationData`

### Methods inherited from class org.eclipse.ui.part.WorkbenchPart

`addPartPropertyListener, addPropertyListener, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Methods inherited from interface org.eclipse.ui.IWorkbenchPart

`addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

## Constructor Details

### NotesView

public NotesView()

## Method Details

### createPartControl

public void createPartControl(Composite parent)

Specified by:
  `createPartControl` in interface `IWorkbenchPart`
Specified by:
  `createPartControl` in class `WorkbenchPart`

### setFocus

public void setFocus()

Specified by:
  `setFocus` in interface `IWorkbenchPart`
Specified by:
  `setFocus` in class `WorkbenchPart`

### partActivated

public void partActivated(IWorkbenchPart part)

Specified by:
  `partActivated` in interface `IPartListener`

### partBroughtToTop

public void partBroughtToTop(IWorkbenchPart part)

Specified by:
  `partBroughtToTop` in interface `IPartListener`

### partClosed

public void partClosed(IWorkbenchPart part)

Specified by:
  `partClosed` in interface `IPartListener`

### partDeactivated

public void partDeactivated(IWorkbenchPart part)

Specified by:
  `partDeactivated` in interface `IPartListener`

### partOpened

public void partOpened(IWorkbenchPart part)

Specified by:
  `partOpened` in interface `IPartListener`

### dispose

public void dispose()

Specified by:
  `dispose` in interface `IWorkbenchPart`
Overrides:
  `dispose` in class `WorkbenchPart`

### resetUndoManager

public void resetUndoManager()

### readNotes

public static String readNotes(File resourcePath)
Read the contents of the notes file, based on the snapshot resource.

Parameters:
  `resourcePath` - The editor file (snapshot or index file).
Returns:
  The contents of the notes file, lines separated by \n.
Throws:
  `UncheckedIOException` - for some IO errors.

### doSave

public void doSave(IProgressMonitor monitor)

Specified by:
  `doSave` in interface `ISaveablePart`

### doSaveAs

public void doSaveAs()

Specified by:
  `doSaveAs` in interface `ISaveablePart`

### isDirty

public boolean isDirty()

Specified by:
  `isDirty` in interface `ISaveablePart`

### isSaveAsAllowed

public boolean isSaveAsAllowed()

Specified by:
  `isSaveAsAllowed` in interface `ISaveablePart`

### isSaveOnCloseNeeded

public boolean isSaveOnCloseNeeded()

Specified by:
  `isSaveOnCloseNeeded` in interface `ISaveablePart`

### promptToSaveOnClose

public int promptToSaveOnClose()

Specified by:
  `promptToSaveOnClose` in interface `ISaveablePart2`