Class PropertiesElement
- java.lang.Object
-
- org.eclipse.emf.ecp.internal.core.util.Element
-
- org.eclipse.emf.ecp.internal.core.util.PropertiesElement
-
- All Implemented Interfaces:
java.lang.Comparable<ECPElement>
,ECPElement
,ECPPropertiesAware
,PropertiesStore.StorableElement
- Direct Known Subclasses:
ECPProjectImpl
,ECPRepositoryImpl
public abstract class PropertiesElement extends Element implements PropertiesStore.StorableElement, ECPPropertiesAware
An element holdingECPProperties
.- Author:
- Eike Stepper
-
-
Constructor Summary
Constructors Constructor Description PropertiesElement(java.io.ObjectInput in)
Create aPropertiesElement
from anObjectInput
.PropertiesElement(java.lang.String name, ECPProperties properties)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cleanup()
Cleans up after the PropertiesElement.ECPProperties
getProperties()
This returns theECPProperties
attached to this object.protected void
propertiesChanged(java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> oldProperties, java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> newProperties)
Called if the properties of the element change.void
write(java.io.ObjectOutput out)
-
Methods inherited from class org.eclipse.emf.ecp.internal.core.util.Element
compareTo, equals, getName, getType, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPElement
getName
-
Methods inherited from interface org.eclipse.emf.ecp.internal.core.util.PropertiesStore.StorableElement
isStorable
-
-
-
-
Constructor Detail
-
PropertiesElement
public PropertiesElement(java.lang.String name, ECPProperties properties)
Constructor.- Parameters:
name
- the name of the elementsproperties
- the initial properties
-
PropertiesElement
public PropertiesElement(java.io.ObjectInput in) throws java.io.IOException
Create aPropertiesElement
from anObjectInput
.- Parameters:
in
- theObjectInput
- Throws:
java.io.IOException
- if there a problem while reading the input
-
-
Method Detail
-
write
public void write(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
write
in interfacePropertiesStore.StorableElement
- Throws:
java.io.IOException
-
getProperties
public final ECPProperties getProperties()
This returns theECPProperties
attached to this object.- Specified by:
getProperties
in interfaceECPPropertiesAware
- Returns:
- the
ECPProperties
this object knows of
-
propertiesChanged
protected void propertiesChanged(java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> oldProperties, java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> newProperties)
Called if the properties of the element change. Can be implemented by subclasses- Parameters:
oldProperties
- the old propertiesnewProperties
- the new properties
-
cleanup
protected void cleanup()
Cleans up after the PropertiesElement. This call unregisters theECPPropertiesObserver
from theECPProperties
.
-
-