Class AbstractSetting
java.lang.Object
com._1c.g5.v8.dt.internal.ui.validation.AbstractSetting
- Direct Known Subclasses:
ProblemFilters
,ProblemSettings
Abstract setting for filtering and presentation sources in view with persistance and change callbacks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Describes what changed.static interface
Settings listener interface. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds change listener.protected abstract String
Additional suffix for storing setting to plugin preferences.void
load()
Loads from plugin preferences by given id.abstract void
load
(org.eclipse.ui.IMemento memento) Loads setting form given memento.protected abstract void
Loads default setting.void
Removes change listener.void
save()
Stories to plugin preferences.abstract void
save
(org.eclipse.ui.IMemento memento) Adds setting in given memento.protected void
setChange
(AbstractSetting.Change... change) Sets the specific type of change.protected void
setDirty
(boolean dirty) Inner flag for storing.void
update()
Notifies change listeners if needed and clear changes.
-
Field Details
-
ELEMENTS_SEPARATOR
- See Also:
-
-
Constructor Details
-
AbstractSetting
Creates new setting.- Parameters:
ownerId
- - id for storing setting to plugin preferences, may benull
if setting must not storing.
-
-
Method Details
-
addChangeListener
Adds change listener.- Parameters:
listener
- - change listener, cannot benull
-
removeChangeListener
Removes change listener.- Parameters:
listener
- - change listener, may benull
-
update
public void update()Notifies change listeners if needed and clear changes. -
save
public void save()Stories to plugin preferences. -
load
public void load()Loads from plugin preferences by given id. -
save
public abstract void save(org.eclipse.ui.IMemento memento) throws org.eclipse.core.runtime.CoreException Adds setting in given memento.- Parameters:
memento
- - memento, cannot benull
- Throws:
org.eclipse.core.runtime.CoreException
-
load
public abstract void load(org.eclipse.ui.IMemento memento) throws org.eclipse.core.runtime.CoreException Loads setting form given memento.- Parameters:
memento
- - memento, cannot benull
- Throws:
org.eclipse.core.runtime.CoreException
-
setDirty
protected void setDirty(boolean dirty) Inner flag for storing.- Parameters:
dirty
- the dirty to set
-
getRootTag
Additional suffix for storing setting to plugin preferences. Default path isownerId + "." + getRootTag()
.- Returns:
- root tag, must not be
null
-
loadDefaults
protected abstract void loadDefaults()Loads default setting. Doesn`t change dirty flags. -
setChange
Sets the specific type of change.- Parameters:
change
- what is changed, cannot benull
.
-