Java Doc for PreferencePersistence.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » internal » services » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui.internal.services 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.internal.services.RegistryPersistence
      org.eclipse.ui.internal.services.PreferencePersistence

All known Subclasses:   org.eclipse.ui.internal.keys.BindingPersistence,
PreferencePersistence
abstract public class PreferencePersistence extends RegistryPersistence (Code)

A manager for items parsed from the preference store. This attaches a listener to the registry after the first read, and monitors the preference for changes from that point on. When PreferencePersistence.dispose() is called, the listener is detached.

This class is only intended for internal use within the org.eclipse.ui.workbench plug-in.


since:
   3.2


Field Summary
protected  booleanpreferenceListenerAttached
     Whether the preference and registry change listeners have been attached yet.

Constructor Summary
protected  PreferencePersistence()
     Constructs a new instance of PreferencePersistence .

Method Summary
final protected static  voidaddElementToIndexedArray(IMemento elementToAdd, IMemento[][] indexedArray, int index, int currentCount)
     Inserts the given element into the indexed two-dimensional array in the array at the index.
final protected static  voidaddWarning(List warningsToLog, String message)
     Adds a warning to be logged at some later point in time.
final protected static  voidaddWarning(List warningsToLog, String message, String id)
     Adds a warning to be logged at some later point in time.
final protected static  voidaddWarning(List warningsToLog, String message, String id, String extraAttributeName, String extraAttributeValue)
     Adds a warning to be logged at some later point in time.
final public  voiddispose()
     Detaches the preference change listener from the registry.
abstract protected  booleanisChangeImportant(PropertyChangeEvent event)
     Checks whether the preference change could affect this persistence class.
Parameters:
  event - The event indicating the preference change; must not benull.
protected  voidread()
     Reads the various elements from the registry.
final protected static  booleanreadBoolean(IMemento memento, String attribute, boolean defaultValue)
     Reads a boolean attribute from a memnto.
Parameters:
  memento - The memento from which to read the attribute; must not benull.
Parameters:
  attribute - The attribute to read; must not be null.
Parameters:
  defaultValue - The default boolean value.
final protected static  StringreadOptional(IMemento memento, String attribute)
     Reads an optional attribute from a memento.
final protected static  ParameterizedCommandreadParameterizedCommand(IMemento memento, ICommandService commandService, List warningsToLog, String message, String id)
     Reads the parameterized command from a parent memento.
final protected static  ParameterizedCommandreadParameters(IMemento memento, List warningsToLog, Command command)
     Reads the parameters from a parent memento.
final protected static  StringreadRequired(IMemento memento, String attribute, List warningsToLog, String message)
     Reads a required attribute from the memento.
Parameters:
  memento - The memento from which to read; must not be null.
Parameters:
  attribute - The attribute to read; must not be null.
Parameters:
  warningsToLog - The list of warnings; must not be null.
Parameters:
  message - The warning message to use if the attribute is missing; mustnot be null.
final protected static  StringreadRequired(IMemento memento, String attribute, List warningsToLog, String message, String id)
     Reads a required attribute from the memento.

Field Detail
preferenceListenerAttached
protected boolean preferenceListenerAttached(Code)
Whether the preference and registry change listeners have been attached yet.




Constructor Detail
PreferencePersistence
protected PreferencePersistence()(Code)
Constructs a new instance of PreferencePersistence . A preference change listener is created.




Method Detail
addElementToIndexedArray
final protected static void addElementToIndexedArray(IMemento elementToAdd, IMemento[][] indexedArray, int index, int currentCount)(Code)
Inserts the given element into the indexed two-dimensional array in the array at the index. The array is grown as necessary.
Parameters:
  elementToAdd - The element to add to the indexed array; may benull
Parameters:
  indexedArray - The two-dimensional array that is indexed by element type;must not be null.
Parameters:
  index - The index at which the element should be added; must be avalid index.
Parameters:
  currentCount - The current number of items in the array at the index.



addWarning
final protected static void addWarning(List warningsToLog, String message)(Code)
Adds a warning to be logged at some later point in time.
Parameters:
  warningsToLog - The collection of warnings to be logged; must not benull.
Parameters:
  message - The mesaage to log; must not be null.



addWarning
final protected static void addWarning(List warningsToLog, String message, String id)(Code)
Adds a warning to be logged at some later point in time. This logs the identifier of the item.
Parameters:
  warningsToLog - The collection of warnings to be logged; must not benull.
Parameters:
  message - The mesaage to log; must not be null.
Parameters:
  id - The identifier of the item for which a warning is beinglogged; may be null.



addWarning
final protected static void addWarning(List warningsToLog, String message, String id, String extraAttributeName, String extraAttributeValue)(Code)
Adds a warning to be logged at some later point in time. This logs the identifier of the item, as well as an extra attribute.
Parameters:
  warningsToLog - The collection of warnings to be logged; must not benull.
Parameters:
  message - The mesaage to log; must not be null.
Parameters:
  id - The identifier of the item for which a warning is beinglogged; may be null.
Parameters:
  extraAttributeName - The name of extra attribute to be logged; may benull.
Parameters:
  extraAttributeValue - The value of the extra attribute to be logged; may benull.



dispose
final public void dispose()(Code)
Detaches the preference change listener from the registry.



isChangeImportant
abstract protected boolean isChangeImportant(PropertyChangeEvent event)(Code)
Checks whether the preference change could affect this persistence class.
Parameters:
  event - The event indicating the preference change; must not benull. true if the persistence instance is affected bythis change; false otherwise.



read
protected void read()(Code)
Reads the various elements from the registry. Subclasses should extend, but must not override.



readBoolean
final protected static boolean readBoolean(IMemento memento, String attribute, boolean defaultValue)(Code)
Reads a boolean attribute from a memnto.
Parameters:
  memento - The memento from which to read the attribute; must not benull.
Parameters:
  attribute - The attribute to read; must not be null.
Parameters:
  defaultValue - The default boolean value. The attribute's value; may be null if none.



readOptional
final protected static String readOptional(IMemento memento, String attribute)(Code)
Reads an optional attribute from a memento. This converts zero-length strings into null.
Parameters:
  memento - The memento from which to read the attribute; must not benull.
Parameters:
  attribute - The attribute to read; must not be null. The attribute's value; may be null if none.



readParameterizedCommand
final protected static ParameterizedCommand readParameterizedCommand(IMemento memento, ICommandService commandService, List warningsToLog, String message, String id)(Code)
Reads the parameterized command from a parent memento. This is used to read the parameter sub-elements from a key element, as well as the command id. Each parameter is guaranteed to be valid. If invalid parameters are found, then a warning status will be appended to the warningsToLog list. The command id is required, or a warning will be logged.
Parameters:
  memento - The memento from which the parameters should be read; must notbe null.
Parameters:
  commandService - The service providing commands for the workbench; must not benull.
Parameters:
  warningsToLog - The list of warnings found during parsing. Warnings found willparsing the parameters will be appended to this list. Thisvalue must not be null.
Parameters:
  message - The message to print if the command identifier is not present;must not be null. The array of parameters found for this configuration element;null if none can be found.



readParameters
final protected static ParameterizedCommand readParameters(IMemento memento, List warningsToLog, Command command)(Code)
Reads the parameters from a parent memento. This is used to read the parameter sub-elements from a key element. Each parameter is guaranteed to be valid. If invalid parameters are found, then a warning status will be appended to the warningsToLog list.
Parameters:
  memento - The memento from which the parameters should be read; must notbe null.
Parameters:
  warningsToLog - The list of warnings found during parsing. Warnings found willparsing the parameters will be appended to this list. Thisvalue must not be null.
Parameters:
  command - The command around which the parameterization should becreated; must not be null. The array of parameters found for this memento; nullif none can be found.



readRequired
final protected static String readRequired(IMemento memento, String attribute, List warningsToLog, String message)(Code)
Reads a required attribute from the memento.
Parameters:
  memento - The memento from which to read; must not be null.
Parameters:
  attribute - The attribute to read; must not be null.
Parameters:
  warningsToLog - The list of warnings; must not be null.
Parameters:
  message - The warning message to use if the attribute is missing; mustnot be null. The required attribute; may be null if missing.



readRequired
final protected static String readRequired(IMemento memento, String attribute, List warningsToLog, String message, String id)(Code)
Reads a required attribute from the memento. This logs the identifier of the item if this required element cannot be found.
Parameters:
  memento - The memento from which to read; must not be null.
Parameters:
  attribute - The attribute to read; must not be null.
Parameters:
  warningsToLog - The list of warnings; must not be null.
Parameters:
  message - The warning message to use if the attribute is missing; mustnot be null.
Parameters:
  id - The identifier of the element for which this is a requiredattribute; may be null. The required attribute; may be null if missing.



Fields inherited from org.eclipse.ui.internal.services.RegistryPersistence
final protected static Expression ERROR_EXPRESSION(Code)(Java Doc)
protected boolean registryListenerAttached(Code)(Java Doc)

Methods inherited from org.eclipse.ui.internal.services.RegistryPersistence
final protected static void addElementToIndexedArray(IConfigurationElement elementToAdd, IConfigurationElement[][] indexedArray, int index, int currentCount)(Code)(Java Doc)
final protected static void addWarning(List warningsToLog, String message, IConfigurationElement element)(Code)(Java Doc)
final protected static void addWarning(List warningsToLog, String message, IConfigurationElement element, String id)(Code)(Java Doc)
final protected static void addWarning(List warningsToLog, String message, IConfigurationElement element, String id, String extraAttributeName, String extraAttributeValue)(Code)(Java Doc)
final protected static boolean checkClass(IConfigurationElement configurationElement, List warningsToLog, String message, String id)(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
abstract protected boolean isChangeImportant(IRegistryChangeEvent event)(Code)(Java Doc)
final protected static boolean isPulldown(IConfigurationElement element)(Code)(Java Doc)
final protected static void logWarnings(List warningsToLog, String message)(Code)(Java Doc)
protected void read()(Code)(Java Doc)
final protected static boolean readBoolean(IConfigurationElement configurationElement, String attribute, boolean defaultValue)(Code)(Java Doc)
final protected static String readOptional(IConfigurationElement configurationElement, String attribute)(Code)(Java Doc)
final protected static ParameterizedCommand readParameterizedCommand(IConfigurationElement configurationElement, ICommandService commandService, List warningsToLog, String message, String id)(Code)(Java Doc)
final protected static ParameterizedCommand readParameters(IConfigurationElement configurationElement, List warningsToLog, Command command)(Code)(Java Doc)
final protected static String readRequired(IConfigurationElement configurationElement, String attribute, List warningsToLog, String message)(Code)(Java Doc)
final protected static String readRequired(IConfigurationElement configurationElement, String attribute, List warningsToLog, String message, String id)(Code)(Java Doc)
final protected static Expression readWhenElement(IConfigurationElement parentElement, String whenElementName, String id, List warningsToLog)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.