|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
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.url
- base URL.bundleURL
- resource bundle URL.
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.url
- base URL.bundleURL
- resource bundle URL.
MalformedURLException
protected URL resolveURL(URL context, URL bundleURL, String urlString) throws MalformedURLException
context
- base URL.bundleURL
- resource bundle URL.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"
bundleURL
- resource bundle url.string
- translatable string from model
null
protected Object[] arrayTypeFor(List l)
l
- list
null
if the array type
could not be determined (the list is null
or empty)protected Object[] arrayTypeFor(Set s)
s
- set
null
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 Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.