public class CodeStyleSchemesModel extends java.lang.Object implements SchemesModel<CodeStyleScheme>
Modifier and Type | Class and Description |
---|---|
static class |
CodeStyleSchemesModel.ModelSettings |
static class |
CodeStyleSchemesModel.OverridingStatus |
Constructor and Description |
---|
CodeStyleSchemesModel(Project project) |
public CodeStyleSchemesModel(Project project)
public void selectScheme(CodeStyleScheme selected, java.lang.Object source)
public void addScheme(CodeStyleScheme newScheme, boolean changeSelection)
public void removeScheme(CodeStyleScheme scheme)
removeScheme
in interface SchemesModel<CodeStyleScheme>
public CodeStyleSettings getCloneSettings(CodeStyleScheme scheme)
public CodeStyleScheme getSelectedScheme()
public void addListener(CodeStyleSchemesModelListener listener)
public java.util.List<CodeStyleScheme> getSchemes()
public void reset()
public boolean isUsePerProjectSettings()
public boolean isSchemeListModified()
public void apply()
@Deprecated public static boolean cannotBeModified(CodeStyleScheme currentScheme)
public void fireBeforeCurrentSettingsChanged()
public void fireSchemeListChanged()
public void fireAfterCurrentSettingsChanged()
public void copyToProject(CodeStyleScheme selectedScheme)
public CodeStyleScheme exportProjectScheme(java.lang.String name)
public CodeStyleScheme createNewScheme(java.lang.String preferredName, CodeStyleScheme parentScheme)
public CodeStyleScheme getProjectScheme()
public boolean canDuplicateScheme(CodeStyleScheme scheme)
canDuplicateScheme
in interface SchemesModel<CodeStyleScheme>
scheme
- The scheme to check.public boolean canResetScheme(CodeStyleScheme scheme)
canResetScheme
in interface SchemesModel<CodeStyleScheme>
scheme
- The scheme to check.SchemesModel.differsFromDefault(Scheme)
public boolean canDeleteScheme(CodeStyleScheme scheme)
canDeleteScheme
in interface SchemesModel<CodeStyleScheme>
scheme
- The scheme to check.public boolean isProjectScheme(CodeStyleScheme scheme)
isProjectScheme
in interface SchemesModel<CodeStyleScheme>
scheme
- The scheme to check.false
if project schemes are not supported.public boolean canRenameScheme(CodeStyleScheme scheme)
canRenameScheme
in interface SchemesModel<CodeStyleScheme>
scheme
- The scheme to check.public boolean containsScheme(java.lang.String name, boolean isProjectScheme)
containsScheme
in interface SchemesModel<CodeStyleScheme>
name
- The scheme to check.isProjectScheme
- Level of the scheme to check. If schemes model does not support project level schemes
then the parameter is always equal to false.public boolean differsFromDefault(CodeStyleScheme scheme)
differsFromDefault
in interface SchemesModel<CodeStyleScheme>
scheme
- The scheme to check.SchemesModel.canResetScheme(Scheme)
returns true
.public java.util.List<CodeStyleScheme> getAllSortedSchemes()
public Project getProject()
public void restoreDefaults(CodeStyleScheme scheme)
public boolean containsModifiedCodeStyleSettings()
public void updateOverridingStatus()
public CodeStyleSchemesModel.OverridingStatus getOverridingStatus()
public void setUiEventsEnabled(boolean enabled)
public boolean isUiEventsEnabled()