Package org.eclipse.compare
Interface IEditableContentExtension
-
- All Known Implementing Classes:
DocumentRangeNode,ResourceNode,StructureRootNode
public interface IEditableContentExtensionExtends theIEditableContentinterface to support validate edit. Clients should only use this interface if they obtained the content from anIStreamContentAccessor. If content was obtained through anISharedDocumentAdapterthen validation should be performed through theIDocumentProviderExtensioninterface.- Since:
- 3.3
- See Also:
IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], Object)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisReadOnly()Return whether the typed element being displayed is read-only. a read-only element will require a call to validateEdit before the element can be modified on disk.IStatusvalidateEdit(Shell shell)If the element is read-only, this method should be called to attempt to make it writable.
-
-
-
Method Detail
-
isReadOnly
boolean isReadOnly()
Return whether the typed element being displayed is read-only. a read-only element will require a call to validateEdit before the element can be modified on disk.- Returns:
- whether the typed element is read-only
-
validateEdit
IStatus validateEdit(Shell shell)
If the element is read-only, this method should be called to attempt to make it writable.- Parameters:
shell- a shell used to prompt the user if required.- Returns:
- a status object that is
OKif things are fine, otherwise a status describing reasons why modifying the given files is not reasonable. A status with a severity ofCANCELis returned if the validation was canceled, indicating the edit should not proceed.
-
-