本文整理了Java中org.eclipse.emf.ecore.resource.impl.ResourceImpl.getContents
方法的一些代码示例,展示了ResourceImpl.getContents
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceImpl.getContents
方法的具体详情如下:
包路径:org.eclipse.emf.ecore.resource.impl.ResourceImpl
类名称:ResourceImpl
方法名:getContents
暂无
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.java
@Override
protected List<EObject> getUnloadingContents() {
return super.getContents();
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
/**
* Returns the resource's Definition.
*/
public Definition getDefinition()
{
return getContents().size() == 1 && getContents().get(0) instanceof Definition ? (Definition)getContents().get(0) : null;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* Returns the URI fragment root segment for reaching the given direct content object.
* This default implementation returns the position of the object, if there is more than one object,
* otherwise, the empty string.
* As a result, the URI fragment for a single root object will be <code>"/"</code>.
* @return the URI fragment root segment for reaching the given direct content object.
*/
protected String getURIFragmentRootSegment(EObject eObject)
{
List<EObject> contents = unloadingContents != null ? unloadingContents : getContents();
return contents.size() > 1 ?
Integer.toString(contents.indexOf(eObject)) :
"";
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* Returns the URI fragment root segment for reaching the given direct content object.
* This default implementation returns the position of the object, if there is more than one object,
* otherwise, the empty string.
* As a result, the URI fragment for a single root object will be <code>"/"</code>.
* @return the URI fragment root segment for reaching the given direct content object.
*/
protected String getURIFragmentRootSegment(EObject eObject)
{
List<EObject> contents = unloadingContents != null ? unloadingContents : getContents();
return contents.size() > 1 ?
Integer.toString(contents.indexOf(eObject)) :
"";
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* This implementation returns a copy of the {@link #getContents() contents}.
* It is called by {@link #unload()} to initialize the value of {@link #unloadingContents}.
* Clients populating the resource's contents on-demand
* can override this implementation to return an empty list
* when the resource's contents have not been accessed before the request to unload.
* @since 2.11
*/
protected List<EObject> getUnloadingContents()
{
return new BasicEList.FastCompare<EObject>(getContents());
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* This implementation returns a copy of the {@link #getContents() contents}.
* It is called by {@link #unload()} to initialize the value of {@link #unloadingContents}.
* Clients populating the resource's contents on-demand
* can override this implementation to return an empty list
* when the resource's contents have not been accessed before the request to unload.
* @since 2.11
*/
protected List<EObject> getUnloadingContents()
{
return new BasicEList.FastCompare<EObject>(getContents());
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* Returns the object associated with the URI fragment root segment.
* This default implementation uses the position of the object;
* an empty string is the same as <code>"0"</code>.
* @return the object associated with the URI fragment root segment.
*/
protected EObject getEObjectForURIFragmentRootSegment(String uriFragmentRootSegment)
{
int position = 0;
if (uriFragmentRootSegment.length() > 0)
{
try
{
position = Integer.parseInt(uriFragmentRootSegment);
}
catch (NumberFormatException exception)
{
throw new WrappedException(exception);
}
}
List<EObject> contents = getContents();
if (position < contents.size() && position >= 0)
{
return contents.get(position);
}
else
{
return null;
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* Does all the work of unloading the resource.
* It calls {@link #unloaded unloaded} for each object it the content {@link #getAllContents tree},
* and clears the {@link #getContents contents}, {@link #getErrors errors}, and {@link #getWarnings warnings}.
*/
protected void doUnload()
{
Iterator<EObject> allContents = getAllProperContents(unloadingContents);
// This guard is needed to ensure that clear doesn't make the resource become loaded.
//
if (!getContents().isEmpty())
{
getContents().clear();
}
getErrors().clear();
getWarnings().clear();
while (allContents.hasNext())
{
unloaded((InternalEObject)allContents.next());
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* Does all the work of unloading the resource.
* It calls {@link #unloaded unloaded} for each object it the content {@link #getAllContents tree},
* and clears the {@link #getContents contents}, {@link #getErrors errors}, and {@link #getWarnings warnings}.
*/
protected void doUnload()
{
Iterator<EObject> allContents = getAllProperContents(unloadingContents);
// This guard is needed to ensure that clear doesn't make the resource become loaded.
//
if (!getContents().isEmpty())
{
getContents().clear();
}
getErrors().clear();
getWarnings().clear();
while (allContents.hasNext())
{
unloaded((InternalEObject)allContents.next());
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
List<EObject> contents = getContents();
if (position < contents.size() && position >= 0)
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
@Override
public Iterator<EObject> getChildren(Object object)
{
return object == ResourceImpl.this ? ResourceImpl.this.getContents().iterator() : ((EObject)object).eContents().iterator();
}
};
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
@Override
public Iterator<EObject> getChildren(Object object)
{
return object == ResourceImpl.this ? ResourceImpl.this.getContents().iterator() : ((EObject)object).eContents().iterator();
}
};
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
private void handleDefinitionElement(Element element)
{
Definition definition = null;
if (element == null)
{
definition = WSDLFactory.eINSTANCE.createDefinition();
((DefinitionImpl)definition).setUseExtensionFactories(useExtensionFactories);
}
else
{
definition = DefinitionImpl.createDefinition(element, getURI().toString(), useExtensionFactories);
}
getContents().add(definition);
// Do we need the next line?
((DefinitionImpl)definition).reconcileReferences(true);
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.java
@Override
public EList<EObject> getContents() {
EList<EObject> _xsynchronizedexpression = null;
synchronized (this.getLock()) {
EList<EObject> _xblockexpression = null;
{
if ((((this.isLoaded && (!this.isLoading)) && (!this.initializing)) && (!this.initialized))) {
try {
this.eSetDeliver(false);
this.installFull();
} finally {
this.eSetDeliver(true);
}
}
_xblockexpression = super.getContents();
}
_xsynchronizedexpression = _xblockexpression;
}
return _xsynchronizedexpression;
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
for (Iterator i = getContents().iterator(); i.hasNext();)
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
modificationTrackingAdapter = null;
for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
modificationTrackingAdapter = null;
for (TreeIterator<EObject> i = getAllProperContents(getContents()); i.hasNext(); )
内容来源于网络,如有侵权,请联系作者删除!