|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.core.runtime.PlatformObject | +--org.eclipse.update.core.model.ModelObject
Root model object. Extended by all model objects.
This class cannot be instantiated and must be subclassed.
Constructor Summary | |
protected |
ModelObject()
Creates a base model object. |
Method Summary | |
protected Object[] |
arrayTypeFor(List l)
Returns a concrete array type for the elements of the specified list. |
protected Object[] |
arrayTypeFor(Set s)
Returns a concrete array type for the elements of the specified set. |
protected void |
assertIsWriteable()
Checks that this model object is writeable. |
protected String |
getPropertyName()
Method getPropertyName. |
protected ResourceBundle |
getResourceBundle(URL url)
Helper method to access resouce bundle for feature. |
boolean |
isReadOnly()
Returns whether or not this model object is read-only. |
protected void |
markListReferenceReadOnly(ModelObject[] o)
Delegate setting of read-only |
void |
markReadOnly()
Sets this model object and all of its descendents to be read-only. |
protected void |
markReferenceReadOnly(ModelObject o)
Delegate setting of read-only |
void |
resolve(URL base,
URL bundleURL)
Resolve the model element. |
protected void |
resolveListReference(ModelObject[] o,
URL url,
URL bundleURL)
Delegate resolution to list of referenced models |
protected String |
resolveNLString(URL bundleURL,
String string)
Returns a resource string corresponding to the given argument value and bundle. |
protected void |
resolveReference(ModelObject o,
URL url,
URL bundleURL)
Delegate resolution to referenced model |
protected URL |
resolveURL(URL context,
URL bundleURL,
String urlString)
Resolve a URL based on context |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
getAdapter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ModelObject()
Method Detail |
protected final void assertIsWriteable()
public void markReadOnly()
isReadOnly()
public boolean isReadOnly()
true
if this model object is read-only,
false
otherwisemarkReadOnly()
protected void markReferenceReadOnly(ModelObject o)
o
- object to delegate to. Must be of type ModelObject.isReadOnly()
protected void markListReferenceReadOnly(ModelObject[] o)
o
- object array to delegate to. Each element must be of type ModelObject.isReadOnly()
public void resolve(URL base, URL bundleURL) throws MalformedURLException
base
- base URL.bundleURL
- resource bundle URL.MalformedURLException
- protected void resolveReference(ModelObject o, URL url, URL bundleURL) throws MalformedURLException
o
- object to delegate to. Must be of type ModelObject.base
- base URL.bundle
- resource bundle.MalformedURLException
- protected void resolveListReference(ModelObject[] o, URL url, URL bundleURL) throws MalformedURLException
o
- object array to delegate to. Each element must be of type ModelObject.base
- base URL.bundle
- resource bundle.MalformedURLException
- protected URL resolveURL(URL context, URL bundleURL, String urlString) throws MalformedURLException
base
- base URL.bundle
- resource bundle.urlString
- url string from model.null
.MalformedURLException
- protected String resolveNLString(URL bundleURL, String string)
For example, assume resource bundle plugin.properties contains name = Project Name
resolveNLString(b,"Hello World") returns "Hello World" resolveNLString(b,"%name") returns "Project Name" resolveNLString(b,"%name Hello World") returns "Project Name" resolveNLString(b,"%abcd Hello World") returns "Hello World" resolveNLString(b,"%abcd") returns "%abcd" resolveNLString(b,"%%name") returns "%name"
bundle
- resource bundle.s
- translatable string from modelnull
protected Object[] arrayTypeFor(List l)
l
- listnull
if the array type
could not be determined (the list is null
or empty)protected Object[] arrayTypeFor(Set s)
s
- setnull
if the array type
could not be determined (the set is null
or empty)protected ResourceBundle getResourceBundle(URL url)
url
- base URL used to load the resource bundle.null
.protected String getPropertyName()
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |