mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
Get rid of some warnings 💄
This commit is contained in:
parent
d46e8af5eb
commit
b97a5ed574
31 changed files with 99 additions and 145 deletions
|
@ -31,7 +31,7 @@ class BuildContext {
|
|||
ClusteringStorageAwareResourceLoader loader
|
||||
|
||||
def <T> Iterable<T> executeClustered(Iterable<URI> uri, (Resource)=>T operation) {
|
||||
if(loader == null)
|
||||
if(loader === null)
|
||||
loader = new ClusteringStorageAwareResourceLoader(this)
|
||||
return loader.executeClustered(uri.filter[canHandle], operation)
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class BuildRequest {
|
|||
|
||||
URI baseDir
|
||||
def URI getBaseDir() {
|
||||
if (baseDir == null) {
|
||||
if (baseDir === null) {
|
||||
val userDir = System.getProperty('user.dir')
|
||||
baseDir = UriUtil.createFolderURI(new File(userDir))
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ import org.eclipse.xtext.generator.GeneratorContext
|
|||
val configs = serviceProvider.get(IContextualOutputConfigurationProvider2).getOutputConfigurations(request.resourceSet)
|
||||
val configName = newSource2GeneratedMapping.getOutputConfigName(generated)
|
||||
val config = configs.findFirst[name == configName]
|
||||
if (config!=null && config.isCleanUpDerivedResources) {
|
||||
if (config !== null && config.isCleanUpDerivedResources) {
|
||||
context.resourceSet.getURIConverter.delete(generated, emptyMap)
|
||||
request.afterDeleteFile.apply(generated)
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ import org.eclipse.xtext.generator.GeneratorContext
|
|||
request.cancelIndicator.checkCanceled
|
||||
val resolvedDeltas = newArrayList
|
||||
// add deleted deltas
|
||||
resolvedDeltas += result.resourceDeltas.filter[getNew == null]
|
||||
resolvedDeltas += result.resourceDeltas.filter[getNew === null]
|
||||
// add changed and added as fully resolved
|
||||
resolvedDeltas += result.resourceDeltas.filter[getNew != null].map[uri]
|
||||
resolvedDeltas += result.resourceDeltas.filter[getNew !== null].map[uri]
|
||||
.executeClustered [
|
||||
Resource resource |
|
||||
request.cancelIndicator.checkCanceled
|
||||
|
@ -106,7 +106,7 @@ import org.eclipse.xtext.generator.GeneratorContext
|
|||
|
||||
def protected boolean validate(Resource resource) {
|
||||
val resourceValidator = getResourceServiceProvider(resource.getURI).getResourceValidator();
|
||||
if (resourceValidator == null) {
|
||||
if (resourceValidator === null) {
|
||||
return true
|
||||
}
|
||||
LOG.info("Starting validation for input: '" + resource.getURI.lastSegment + "'");
|
||||
|
@ -117,7 +117,7 @@ import org.eclipse.xtext.generator.GeneratorContext
|
|||
protected def void generate(Resource resource, BuildRequest request, Source2GeneratedMapping newMappings) {
|
||||
val serviceProvider = resource.getURI.getResourceServiceProvider
|
||||
val generator = serviceProvider.get(GeneratorDelegate)
|
||||
if (generator == null) {
|
||||
if (generator === null) {
|
||||
return;
|
||||
}
|
||||
val previous = newMappings.deleteSource(resource.getURI)
|
||||
|
@ -137,7 +137,7 @@ import org.eclipse.xtext.generator.GeneratorContext
|
|||
fileSystemAccess.context = resource
|
||||
if (request.isWriteStorageResources) {
|
||||
switch resource {
|
||||
StorageAwareResource case resource.resourceStorageFacade != null: {
|
||||
StorageAwareResource case resource.resourceStorageFacade !== null: {
|
||||
resource.resourceStorageFacade.saveResource(resource, fileSystemAccess)
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ import org.eclipse.xtext.generator.GeneratorContext
|
|||
|
||||
postProcessor = serviceProvider.get(IFilePostProcessor)
|
||||
val newEncodingProvider = serviceProvider.get(IEncodingProvider)
|
||||
if (newEncodingProvider != null)
|
||||
if (newEncodingProvider !== null)
|
||||
encodingProvider = newEncodingProvider
|
||||
traceFileNameProvider = serviceProvider.get(TraceFileNameProvider)
|
||||
traceRegionSerializer = serviceProvider.get(TraceRegionSerializer)
|
||||
|
|
|
@ -89,10 +89,10 @@ import org.eclipse.xtext.resource.persistence.SerializableEObjectDescriptionProv
|
|||
protected def List<Delta> getDeltasForDeletedResources(BuildRequest request, ResourceDescriptionsData oldIndex,
|
||||
extension BuildContext context) {
|
||||
val deltas = <Delta>newArrayList()
|
||||
request.deletedFiles.filter[context.getResourceServiceProvider(it) != null].forEach [
|
||||
request.deletedFiles.filter[context.getResourceServiceProvider(it) !== null].forEach [
|
||||
context.cancelIndicator.checkCanceled
|
||||
val IResourceDescription oldDescription = oldIndex?.getResourceDescription(it)
|
||||
if (oldDescription != null) {
|
||||
if (oldDescription !== null) {
|
||||
val delta = new DefaultResourceDescriptionDelta(oldDescription, null)
|
||||
deltas += delta
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ import org.eclipse.xtext.resource.persistence.SerializableEObjectDescriptionProv
|
|||
result.eSetProxyURI(from.getEObjectURI)
|
||||
var Map<String, String> userData = null
|
||||
for (key : from.userDataKeys) {
|
||||
if (userData == null)
|
||||
if (userData === null)
|
||||
userData = Maps.newHashMapWithExpectedSize(2)
|
||||
userData.put(key, from.getUserData(key))
|
||||
}
|
||||
|
|
|
@ -61,10 +61,10 @@ class URIBasedFileSystemAccess extends AbstractFileSystemAccess2 {
|
|||
|
||||
override getURI(String path, String outputConfiguration) {
|
||||
val outlet = pathes.get(outputConfiguration)
|
||||
if (outlet == null)
|
||||
if (outlet === null)
|
||||
throw new IllegalArgumentException("A slot with name '" + outputConfiguration + "' has not been configured.");
|
||||
val uri = URI.createFileURI(outlet + File.separator + path)
|
||||
if (baseDir != null) {
|
||||
if (baseDir !== null) {
|
||||
val resolved = uri.resolve(baseDir);
|
||||
return resolved
|
||||
} else {
|
||||
|
|
|
@ -81,7 +81,7 @@ import static extension com.google.common.collect.Multimaps.*
|
|||
|
||||
def protected boolean shouldInclude(AbstractTraceRegion region) {
|
||||
val frame = getLocalFrame()
|
||||
if (frame == null)
|
||||
if (frame === null)
|
||||
return true
|
||||
else
|
||||
return frame.contains(region.myRegion)
|
||||
|
@ -89,7 +89,7 @@ import static extension com.google.common.collect.Multimaps.*
|
|||
|
||||
def protected boolean shouldInclude(AbstractTraceRegion region, ILocationData location) {
|
||||
val frame = getRemoteFrame(location.srcRelativePath ?: region.associatedSrcRelativePath)
|
||||
if (frame == null)
|
||||
if (frame === null)
|
||||
return true
|
||||
else
|
||||
return frame.contains(location)
|
||||
|
@ -139,7 +139,7 @@ import static extension com.google.common.collect.Multimaps.*
|
|||
|
||||
def protected int sortKey(Insert it) {
|
||||
val base = (region.id * Short.MAX_VALUE)
|
||||
return if(location != null && location.id >= 0) base + location.id else base
|
||||
return if(location !== null && location.id >= 0) base + location.id else base
|
||||
}
|
||||
|
||||
def protected String render(Collection<Insert> inserts, int width) {
|
||||
|
@ -151,8 +151,8 @@ import static extension com.google.common.collect.Multimaps.*
|
|||
}
|
||||
|
||||
def protected List<String> render(File file, int width) {
|
||||
val text = if(file.uri == null) localText else file.uri.remoteText
|
||||
val frame = (if(file.uri == null) localFrame else file.uri.remoteFrame) ?: new TextRegion(0, text.length)
|
||||
val text = if(file.uri === null) localText else file.uri.remoteText
|
||||
val frame = (if(file.uri === null) localFrame else file.uri.remoteFrame) ?: new TextRegion(0, text.length)
|
||||
val inframe = file.inserts.filter[offset >= frame.offset && offset <= frame.offset + frame.length]
|
||||
val offsets = inframe.index[offset].asMap.entrySet.toList.sortBy[key]
|
||||
var last = frame.offset
|
||||
|
|
|
@ -32,7 +32,6 @@ public class DefaultHiddenTokenHelper extends AbstractHiddenTokenHelper {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public AbstractRule getWhitespaceRuleFor(String whitespace) {
|
||||
return wsRule;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ class ProjectDescriptionBasedContainerManager implements IContainer.Manager {
|
|||
|
||||
public def boolean shouldUseProjectDescriptionBasedContainers(IResourceDescriptions resourceDescriptions) {
|
||||
if (resourceDescriptions instanceof ChunkedResourceDescriptions) {
|
||||
if (ProjectDescription.findInEmfObject(resourceDescriptions.resourceSet) != null) {
|
||||
if (ProjectDescription.findInEmfObject(resourceDescriptions.resourceSet) !== null) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,11 +66,11 @@ import org.eclipse.xtext.util.internal.EmfAdaptable
|
|||
}
|
||||
|
||||
protected def void setResourceSet(ResourceSet resourceSet) {
|
||||
if (this.resourceSet != null) {
|
||||
if (this.resourceSet !== null) {
|
||||
throw new IllegalStateException("This "+class.name+" is already associated with a different resource set.")
|
||||
}
|
||||
val index = findInEmfObject(resourceSet)
|
||||
if (index != null) {
|
||||
if (index !== null) {
|
||||
throw new IllegalStateException("There is already a different "+class.name+" installed in the given resource set.")
|
||||
}
|
||||
this.resourceSet = resourceSet
|
||||
|
@ -96,7 +96,7 @@ import org.eclipse.xtext.util.internal.EmfAdaptable
|
|||
override getResourceDescription(URI uri) {
|
||||
for (selectable : chunk2resourceDescriptions.values) {
|
||||
val result = selectable.getResourceDescription(uri)
|
||||
if (result != null)
|
||||
if (result !== null)
|
||||
return result
|
||||
}
|
||||
return null
|
||||
|
@ -105,7 +105,7 @@ import org.eclipse.xtext.util.internal.EmfAdaptable
|
|||
def ResourceDescriptionsData getContainer(URI uri) {
|
||||
for (container : chunk2resourceDescriptions.values) {
|
||||
val result = container.getResourceDescription(uri)
|
||||
if (result != null)
|
||||
if (result !== null)
|
||||
return container
|
||||
}
|
||||
return null
|
||||
|
|
|
@ -69,7 +69,7 @@ class PortableURIs {
|
|||
mock.EType = desc.descriptionEClass
|
||||
val scope = globalScopeProvider.getScope(resource, mock, Predicates.alwaysTrue)
|
||||
val description = scope.getElements(desc.descriptionQualifiedName).head
|
||||
if (description == null) {
|
||||
if (description === null) {
|
||||
return null
|
||||
}
|
||||
val container = EcoreUtil.resolve(description.EObjectOrProxy, resource)
|
||||
|
@ -89,9 +89,9 @@ class PortableURIs {
|
|||
def URI toPortableURI(StorageAwareResource sourceResource, URI targetURI) {
|
||||
val to = sourceResource.resourceSet.getResource(targetURI.trimFragment, false)?.getEObject(targetURI.fragment)
|
||||
// if it points to some registered ecore, there's no resourceSet and the result is not portable
|
||||
if (to == null || to.eResource?.resourceSet != null) {
|
||||
if (to === null || to.eResource?.resourceSet !== null) {
|
||||
val result = toPortableURI(sourceResource, to);
|
||||
if (result != null) {
|
||||
if (result !== null) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
@ -109,11 +109,11 @@ class PortableURIs {
|
|||
* @return a portable URI or <code>null</code>
|
||||
*/
|
||||
def URI toPortableURI(StorageAwareResource sourceResource, EObject targetObject) {
|
||||
if (targetObject == null || targetObject.eIsProxy) {
|
||||
if (targetObject === null || targetObject.eIsProxy) {
|
||||
return sourceResource.URI.appendFragment(StorageAwareResource.UNRESOLVABLE_FRAGMENT)
|
||||
}
|
||||
val portableFragment = getPortableURIFragment(targetObject)
|
||||
if (portableFragment != null) {
|
||||
if (portableFragment !== null) {
|
||||
return sourceResource.URI.appendFragment(portableFragment)
|
||||
}
|
||||
return null
|
||||
|
@ -125,14 +125,14 @@ class PortableURIs {
|
|||
protected def String getPortableURIFragment(EObject obj) {
|
||||
val descriptions = resourceDescriptionsProvider.getResourceDescriptions(obj.eResource)
|
||||
val desc = descriptions.getResourceDescription(obj.eResource.URI)
|
||||
if (desc == null) {
|
||||
if (desc === null) {
|
||||
return null
|
||||
}
|
||||
val containerDesc = desc.exportedObjects.findFirst [
|
||||
val possibleContainer = EcoreUtil.resolve(EObjectOrProxy, obj.eResource)
|
||||
obj==possibleContainer || EcoreUtil.isAncestor(obj, possibleContainer)
|
||||
]
|
||||
if (containerDesc != null) {
|
||||
if (containerDesc !== null) {
|
||||
val fragmentDescription = createPortableFragmentDescription(containerDesc, obj)
|
||||
return toFragmentString(fragmentDescription)
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ class PortableURIs {
|
|||
val eclassUriAsString = URI.encodeFragment(EcoreUtil.getURI(desc.descriptionEClass).toString, false)
|
||||
val segments = desc.descriptionQualifiedName.segments
|
||||
var uriFragment = PORTABLE_SCHEME + '#' + eclassUriAsString + '#'+ URI.encodeFragment(segments.join(':'), false)
|
||||
if (desc.descriptionRelativeFragment != null) {
|
||||
if (desc.descriptionRelativeFragment !== null) {
|
||||
uriFragment += '#' + URI.encodeFragment(desc.descriptionRelativeFragment, false)
|
||||
}
|
||||
return uriFragment
|
||||
|
@ -184,10 +184,10 @@ class PortableURIs {
|
|||
var lastChild = toChild as InternalEObject
|
||||
var lastContainer = lastChild.eInternalContainer
|
||||
var result = lastContainer.eURIFragmentSegment(lastChild.eContainingFeature, lastChild)
|
||||
while (lastContainer != null && fromContainer != lastContainer) {
|
||||
while (lastContainer !== null && fromContainer != lastContainer) {
|
||||
lastChild = lastContainer
|
||||
lastContainer = lastContainer.eInternalContainer
|
||||
if (lastContainer == null) {
|
||||
if (lastContainer === null) {
|
||||
throw new IllegalStateException("No more containers for element "+lastChild)
|
||||
}
|
||||
result = lastContainer.eURIFragmentSegment(lastChild.eContainingFeature, lastChild)+'/'+result
|
||||
|
@ -204,7 +204,7 @@ class PortableURIs {
|
|||
* @return the resolved EObject based. If the given fragment is <code>null</null>, the given EObject itself will be returned.
|
||||
*/
|
||||
public def EObject getEObject(EObject from, String toFragment) {
|
||||
if (toFragment == null)
|
||||
if (toFragment === null)
|
||||
return from
|
||||
val splitted = Splitter.on("/").split(toFragment)
|
||||
return splitted.fold(from) [
|
||||
|
|
|
@ -39,7 +39,7 @@ class ResourceStorageFacade implements IResourceStorageFacade {
|
|||
*/
|
||||
override boolean shouldLoadFromStorage(StorageAwareResource resource) {
|
||||
val adapter = SourceLevelURIsAdapter.findInstalledAdapter(resource.resourceSet)
|
||||
if (adapter == null) {
|
||||
if (adapter === null) {
|
||||
return false;
|
||||
} else {
|
||||
if (adapter.sourceLevelURIs.contains(resource.URI))
|
||||
|
@ -57,9 +57,9 @@ class ResourceStorageFacade implements IResourceStorageFacade {
|
|||
*/
|
||||
override ResourceStorageLoadable getOrCreateResourceStorageLoadable(StorageAwareResource resource) {
|
||||
val stateProvider = resource.resourceSet.eAdapters.filter(ResourceStorageProviderAdapter).head
|
||||
if (stateProvider != null) {
|
||||
if (stateProvider !== null) {
|
||||
val inputStream = stateProvider.getResourceStorageLoadable(resource)
|
||||
if (inputStream != null)
|
||||
if (inputStream !== null)
|
||||
return inputStream
|
||||
}
|
||||
val inputStream = if (resource.resourceSet.URIConverter.exists(resource.URI.getBinaryStorageURI, emptyMap)) {
|
||||
|
@ -99,7 +99,7 @@ class ResourceStorageFacade implements IResourceStorageFacade {
|
|||
*/
|
||||
protected def doesStorageExist(StorageAwareResource resource) {
|
||||
val stateProvider = resource.resourceSet.eAdapters.filter(ResourceStorageProviderAdapter).head
|
||||
if (stateProvider!=null && stateProvider.getResourceStorageLoadable(resource) != null)
|
||||
if (stateProvider !== null && stateProvider.getResourceStorageLoadable(resource) !== null)
|
||||
return true;
|
||||
// check for next to original location, i.e. jars
|
||||
if (resource.resourceSet.URIConverter.exists(resource.URI.getBinaryStorageURI, emptyMap)) {
|
||||
|
|
|
@ -159,7 +159,7 @@ interface SerializableEObjectDescriptionProvider {
|
|||
}
|
||||
|
||||
override getEObjectOrProxy() {
|
||||
if (eObjectOrProxy == null) {
|
||||
if (eObjectOrProxy === null) {
|
||||
val proxy = EcoreUtil.create(eClass)
|
||||
(proxy as InternalEObject).eSetProxyURI(eObjectURI)
|
||||
eObjectOrProxy = proxy
|
||||
|
@ -264,7 +264,7 @@ package class SerializationExtensions {
|
|||
}
|
||||
|
||||
def static void writeURI(ObjectOutput out, URI uri) throws IOException {
|
||||
if (uri == null) {
|
||||
if (uri === null) {
|
||||
out.writeUTF("NULL")
|
||||
} else {
|
||||
out.writeUTF(uri.toString)
|
||||
|
|
|
@ -34,7 +34,7 @@ class StorageAwareResource extends LazyLinkingResource {
|
|||
@Accessors IResourceDescription resourceDescription = null;
|
||||
|
||||
override load(Map<?, ?> options) throws IOException {
|
||||
if (!isLoaded && !isLoading && resourceStorageFacade!=null && resourceStorageFacade.shouldLoadFromStorage(this)) {
|
||||
if (!isLoaded && !isLoading && resourceStorageFacade !== null && resourceStorageFacade.shouldLoadFromStorage(this)) {
|
||||
if (LOG.isDebugEnabled) {
|
||||
LOG.debug("Loading "+URI+" from storage.")
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class StorageAwareResource extends LazyLinkingResource {
|
|||
}
|
||||
|
||||
def void loadFromStorage(ResourceStorageLoadable storageInputStream) throws IOException {
|
||||
if (storageInputStream == null) {
|
||||
if (storageInputStream === null) {
|
||||
throw new NullPointerException('storageInputStream')
|
||||
}
|
||||
val task = Stopwatches.forTask("Loading from storage")
|
||||
|
|
|
@ -20,7 +20,7 @@ class StorageAwareResourceDescriptionManager extends DefaultResourceDescriptionM
|
|||
|
||||
override getResourceDescription(Resource resource) {
|
||||
switch resource {
|
||||
StorageAwareResource case resource.resourceDescription != null
|
||||
StorageAwareResource case resource.resourceDescription !== null
|
||||
: resource.resourceDescription
|
||||
default : super.getResourceDescription(resource)
|
||||
}
|
||||
|
|
|
@ -115,7 +115,6 @@ public class NodeModelSemanticSequencer extends AbstractSemanticSequencer {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void createSequence(EObject context, EObject semanticObject) {
|
||||
createSequence(SerializationContext.fromEObject(context, semanticObject), semanticObject);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class OperationCanceledManager {
|
|||
}
|
||||
|
||||
def isOperationCanceledException(Throwable t) {
|
||||
t.platformOperationCanceledException != null
|
||||
t.platformOperationCanceledException !== null
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,7 +58,7 @@ class OperationCanceledManager {
|
|||
return throwable
|
||||
}
|
||||
val platform = getPlatformOperationCanceledException(throwable)
|
||||
if (platform != null) {
|
||||
if (platform !== null) {
|
||||
return new OperationCanceledError(platform)
|
||||
}
|
||||
return null
|
||||
|
@ -73,7 +73,7 @@ class OperationCanceledManager {
|
|||
}
|
||||
|
||||
def void checkCanceled(CancelIndicator indicator) {
|
||||
if (indicator != null && indicator.isCanceled) {
|
||||
if (indicator !== null && indicator.isCanceled) {
|
||||
throwOperationCanceledException
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.build;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.xtend.lib.annotations.Accessors;
|
||||
|
@ -46,8 +45,7 @@ public class BuildContext {
|
|||
private ClusteringStorageAwareResourceLoader loader;
|
||||
|
||||
public <T extends Object> Iterable<T> executeClustered(final Iterable<URI> uri, final Function1<? super Resource, ? extends T> operation) {
|
||||
boolean _equals = Objects.equal(this.loader, null);
|
||||
if (_equals) {
|
||||
if ((this.loader == null)) {
|
||||
ClusteringStorageAwareResourceLoader _clusteringStorageAwareResourceLoader = new ClusteringStorageAwareResourceLoader(this);
|
||||
this.loader = _clusteringStorageAwareResourceLoader;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.build;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import org.apache.log4j.Logger;
|
||||
|
@ -80,8 +79,7 @@ public class BuildRequest {
|
|||
private URI baseDir;
|
||||
|
||||
public URI getBaseDir() {
|
||||
boolean _equals = Objects.equal(this.baseDir, null);
|
||||
if (_equals) {
|
||||
if ((this.baseDir == null)) {
|
||||
final String userDir = System.getProperty("user.dir");
|
||||
File _file = new File(userDir);
|
||||
URI _createFolderURI = UriUtil.createFolderURI(_file);
|
||||
|
|
|
@ -181,7 +181,7 @@ public class IncrementalBuilder {
|
|||
return Boolean.valueOf(Objects.equal(_name, configName));
|
||||
};
|
||||
final OutputConfiguration config = IterableExtensions.<OutputConfiguration>findFirst(configs, _function_2);
|
||||
if (((!Objects.equal(config, null)) && config.isCleanUpDerivedResources())) {
|
||||
if (((config != null) && config.isCleanUpDerivedResources())) {
|
||||
XtextResourceSet _resourceSet_1 = this.context.getResourceSet();
|
||||
URIConverter _uRIConverter = _resourceSet_1.getURIConverter();
|
||||
Map<Object, Object> _emptyMap = CollectionLiterals.<Object, Object>emptyMap();
|
||||
|
@ -203,14 +203,14 @@ public class IncrementalBuilder {
|
|||
List<IResourceDescription.Delta> _resourceDeltas = result.getResourceDeltas();
|
||||
final Function1<IResourceDescription.Delta, Boolean> _function_1 = (IResourceDescription.Delta it) -> {
|
||||
IResourceDescription _new = it.getNew();
|
||||
return Boolean.valueOf(Objects.equal(_new, null));
|
||||
return Boolean.valueOf((_new == null));
|
||||
};
|
||||
Iterable<IResourceDescription.Delta> _filter = IterableExtensions.<IResourceDescription.Delta>filter(_resourceDeltas, _function_1);
|
||||
Iterables.<IResourceDescription.Delta>addAll(resolvedDeltas, _filter);
|
||||
List<IResourceDescription.Delta> _resourceDeltas_1 = result.getResourceDeltas();
|
||||
final Function1<IResourceDescription.Delta, Boolean> _function_2 = (IResourceDescription.Delta it) -> {
|
||||
IResourceDescription _new = it.getNew();
|
||||
return Boolean.valueOf((!Objects.equal(_new, null)));
|
||||
return Boolean.valueOf((_new != null));
|
||||
};
|
||||
Iterable<IResourceDescription.Delta> _filter_1 = IterableExtensions.<IResourceDescription.Delta>filter(_resourceDeltas_1, _function_2);
|
||||
final Function1<IResourceDescription.Delta, URI> _function_3 = (IResourceDescription.Delta it) -> {
|
||||
|
@ -255,8 +255,7 @@ public class IncrementalBuilder {
|
|||
URI _uRI = resource.getURI();
|
||||
IResourceServiceProvider _resourceServiceProvider = this.context.getResourceServiceProvider(_uRI);
|
||||
final IResourceValidator resourceValidator = _resourceServiceProvider.getResourceValidator();
|
||||
boolean _equals = Objects.equal(resourceValidator, null);
|
||||
if (_equals) {
|
||||
if ((resourceValidator == null)) {
|
||||
return true;
|
||||
}
|
||||
URI _uRI_1 = resource.getURI();
|
||||
|
@ -274,8 +273,7 @@ public class IncrementalBuilder {
|
|||
URI _uRI = resource.getURI();
|
||||
final IResourceServiceProvider serviceProvider = this.context.getResourceServiceProvider(_uRI);
|
||||
final GeneratorDelegate generator = serviceProvider.<GeneratorDelegate>get(GeneratorDelegate.class);
|
||||
boolean _equals = Objects.equal(generator, null);
|
||||
if (_equals) {
|
||||
if ((generator == null)) {
|
||||
return;
|
||||
}
|
||||
URI _uRI_1 = resource.getURI();
|
||||
|
@ -307,8 +305,8 @@ public class IncrementalBuilder {
|
|||
boolean _matched = false;
|
||||
if (resource instanceof StorageAwareResource) {
|
||||
IResourceStorageFacade _resourceStorageFacade = ((StorageAwareResource)resource).getResourceStorageFacade();
|
||||
boolean _notEquals = (!Objects.equal(_resourceStorageFacade, null));
|
||||
if (_notEquals) {
|
||||
boolean _tripleNotEquals = (_resourceStorageFacade != null);
|
||||
if (_tripleNotEquals) {
|
||||
_matched=true;
|
||||
IResourceStorageFacade _resourceStorageFacade_1 = ((StorageAwareResource)resource).getResourceStorageFacade();
|
||||
_resourceStorageFacade_1.saveResource(((StorageAwareResource)resource), fileSystemAccess);
|
||||
|
@ -363,8 +361,7 @@ public class IncrementalBuilder {
|
|||
IFilePostProcessor _get = serviceProvider.<IFilePostProcessor>get(IFilePostProcessor.class);
|
||||
it.setPostProcessor(_get);
|
||||
final IEncodingProvider newEncodingProvider = serviceProvider.<IEncodingProvider>get(IEncodingProvider.class);
|
||||
boolean _notEquals = (!Objects.equal(newEncodingProvider, null));
|
||||
if (_notEquals) {
|
||||
if ((newEncodingProvider != null)) {
|
||||
it.setEncodingProvider(newEncodingProvider);
|
||||
}
|
||||
TraceFileNameProvider _get_1 = serviceProvider.<TraceFileNameProvider>get(TraceFileNameProvider.class);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.build;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -158,8 +157,7 @@ public class Indexer {
|
|||
String[] _userDataKeys = from.getUserDataKeys();
|
||||
for (final String key : _userDataKeys) {
|
||||
{
|
||||
boolean _equals = Objects.equal(userData, null);
|
||||
if (_equals) {
|
||||
if ((userData == null)) {
|
||||
HashMap<String, String> _newHashMapWithExpectedSize = Maps.<String, String>newHashMapWithExpectedSize(2);
|
||||
userData = _newHashMapWithExpectedSize;
|
||||
}
|
||||
|
@ -285,7 +283,7 @@ public class Indexer {
|
|||
List<URI> _deletedFiles = request.getDeletedFiles();
|
||||
final Function1<URI, Boolean> _function = (URI it) -> {
|
||||
IResourceServiceProvider _resourceServiceProvider = context.getResourceServiceProvider(it);
|
||||
return Boolean.valueOf((!Objects.equal(_resourceServiceProvider, null)));
|
||||
return Boolean.valueOf((_resourceServiceProvider != null));
|
||||
};
|
||||
Iterable<URI> _filter = IterableExtensions.<URI>filter(_deletedFiles, _function);
|
||||
final Consumer<URI> _function_1 = (URI it) -> {
|
||||
|
@ -296,8 +294,7 @@ public class Indexer {
|
|||
_resourceDescription=oldIndex.getResourceDescription(it);
|
||||
}
|
||||
final IResourceDescription oldDescription = _resourceDescription;
|
||||
boolean _notEquals = (!Objects.equal(oldDescription, null));
|
||||
if (_notEquals) {
|
||||
if ((oldDescription != null)) {
|
||||
final DefaultResourceDescriptionDelta delta = new DefaultResourceDescriptionDelta(oldDescription, null);
|
||||
deltas.add(delta);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.generator;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import com.google.common.io.CharStreams;
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
@ -95,13 +94,11 @@ public class URIBasedFileSystemAccess extends AbstractFileSystemAccess2 {
|
|||
public URI getURI(final String path, final String outputConfiguration) {
|
||||
Map<String, String> _pathes = this.getPathes();
|
||||
final String outlet = _pathes.get(outputConfiguration);
|
||||
boolean _equals = Objects.equal(outlet, null);
|
||||
if (_equals) {
|
||||
if ((outlet == null)) {
|
||||
throw new IllegalArgumentException((("A slot with name \'" + outputConfiguration) + "\' has not been configured."));
|
||||
}
|
||||
final URI uri = URI.createFileURI(((outlet + File.separator) + path));
|
||||
boolean _notEquals = (!Objects.equal(this.baseDir, null));
|
||||
if (_notEquals) {
|
||||
if ((this.baseDir != null)) {
|
||||
final URI resolved = uri.resolve(this.baseDir);
|
||||
return resolved;
|
||||
} else {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
package org.eclipse.xtext.generator.trace;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.collect.ImmutableListMultimap;
|
||||
|
@ -214,8 +213,7 @@ public abstract class AbstractTraceRegionToString {
|
|||
|
||||
protected boolean shouldInclude(final AbstractTraceRegion region) {
|
||||
final ITextRegion frame = this.getLocalFrame();
|
||||
boolean _equals = Objects.equal(frame, null);
|
||||
if (_equals) {
|
||||
if ((frame == null)) {
|
||||
return true;
|
||||
} else {
|
||||
ITextRegionWithLineInformation _myRegion = region.getMyRegion();
|
||||
|
@ -233,8 +231,7 @@ public abstract class AbstractTraceRegionToString {
|
|||
_elvis = _associatedSrcRelativePath;
|
||||
}
|
||||
final ITextRegion frame = this.getRemoteFrame(_elvis);
|
||||
boolean _equals = Objects.equal(frame, null);
|
||||
if (_equals) {
|
||||
if ((frame == null)) {
|
||||
return true;
|
||||
} else {
|
||||
return frame.contains(location);
|
||||
|
@ -329,7 +326,7 @@ public abstract class AbstractTraceRegionToString {
|
|||
protected int sortKey(final AbstractTraceRegionToString.Insert it) {
|
||||
final int base = (it.region.id * Short.MAX_VALUE);
|
||||
int _xifexpression = (int) 0;
|
||||
if (((!Objects.equal(it.location, null)) && (it.location.id >= 0))) {
|
||||
if (((it.location != null) && (it.location.id >= 0))) {
|
||||
_xifexpression = (base + it.location.id);
|
||||
} else {
|
||||
_xifexpression = base;
|
||||
|
@ -387,8 +384,7 @@ public abstract class AbstractTraceRegionToString {
|
|||
protected List<String> render(final AbstractTraceRegionToString.File file, final int width) {
|
||||
try {
|
||||
String _xifexpression = null;
|
||||
boolean _equals = Objects.equal(file.uri, null);
|
||||
if (_equals) {
|
||||
if ((file.uri == null)) {
|
||||
_xifexpression = this.getLocalText();
|
||||
} else {
|
||||
_xifexpression = this.getRemoteText(file.uri);
|
||||
|
@ -396,8 +392,7 @@ public abstract class AbstractTraceRegionToString {
|
|||
final String text = _xifexpression;
|
||||
ITextRegion _elvis = null;
|
||||
ITextRegion _xifexpression_1 = null;
|
||||
boolean _equals_1 = Objects.equal(file.uri, null);
|
||||
if (_equals_1) {
|
||||
if ((file.uri == null)) {
|
||||
_xifexpression_1 = this.getLocalFrame();
|
||||
} else {
|
||||
_xifexpression_1 = this.getRemoteFrame(file.uri);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
package org.eclipse.xtext.resource.containers;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.common.base.Objects;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -34,8 +33,8 @@ public class ProjectDescriptionBasedContainerManager implements IContainer.Manag
|
|||
if ((resourceDescriptions instanceof ChunkedResourceDescriptions)) {
|
||||
ResourceSet _resourceSet = ((ChunkedResourceDescriptions)resourceDescriptions).getResourceSet();
|
||||
ProjectDescription _findInEmfObject = ProjectDescription.findInEmfObject(_resourceSet);
|
||||
boolean _notEquals = (!Objects.equal(_findInEmfObject, null));
|
||||
if (_notEquals) {
|
||||
boolean _tripleNotEquals = (_findInEmfObject != null);
|
||||
if (_tripleNotEquals) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
package org.eclipse.xtext.resource.impl;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Iterables;
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
|
@ -102,8 +101,7 @@ public class ChunkedResourceDescriptions extends AbstractCompoundSelectable impl
|
|||
}
|
||||
|
||||
protected void setResourceSet(final ResourceSet resourceSet) {
|
||||
boolean _notEquals = (!Objects.equal(this.resourceSet, null));
|
||||
if (_notEquals) {
|
||||
if ((this.resourceSet != null)) {
|
||||
Class<? extends ChunkedResourceDescriptions> _class = this.getClass();
|
||||
String _name = _class.getName();
|
||||
String _plus = ("This " + _name);
|
||||
|
@ -111,8 +109,7 @@ public class ChunkedResourceDescriptions extends AbstractCompoundSelectable impl
|
|||
throw new IllegalStateException(_plus_1);
|
||||
}
|
||||
final ChunkedResourceDescriptions index = ChunkedResourceDescriptions.findInEmfObject(resourceSet);
|
||||
boolean _notEquals_1 = (!Objects.equal(index, null));
|
||||
if (_notEquals_1) {
|
||||
if ((index != null)) {
|
||||
Class<? extends ChunkedResourceDescriptions> _class_1 = this.getClass();
|
||||
String _name_1 = _class_1.getName();
|
||||
String _plus_2 = ("There is already a different " + _name_1);
|
||||
|
@ -152,8 +149,7 @@ public class ChunkedResourceDescriptions extends AbstractCompoundSelectable impl
|
|||
for (final ResourceDescriptionsData selectable : _values) {
|
||||
{
|
||||
final IResourceDescription result = selectable.getResourceDescription(uri);
|
||||
boolean _notEquals = (!Objects.equal(result, null));
|
||||
if (_notEquals) {
|
||||
if ((result != null)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -166,8 +162,7 @@ public class ChunkedResourceDescriptions extends AbstractCompoundSelectable impl
|
|||
for (final ResourceDescriptionsData container : _values) {
|
||||
{
|
||||
final IResourceDescription result = container.getResourceDescription(uri);
|
||||
boolean _notEquals = (!Objects.equal(result, null));
|
||||
if (_notEquals) {
|
||||
if ((result != null)) {
|
||||
return container;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,8 +173,7 @@ public class PortableURIs {
|
|||
final IScope scope = this.globalScopeProvider.getScope(resource, mock, _alwaysTrue);
|
||||
Iterable<IEObjectDescription> _elements = scope.getElements(desc.descriptionQualifiedName);
|
||||
final IEObjectDescription description = IterableExtensions.<IEObjectDescription>head(_elements);
|
||||
boolean _equals = Objects.equal(description, null);
|
||||
if (_equals) {
|
||||
if ((description == null)) {
|
||||
return null;
|
||||
}
|
||||
EObject _eObjectOrProxy = description.getEObjectOrProxy();
|
||||
|
@ -203,8 +202,7 @@ public class PortableURIs {
|
|||
}
|
||||
final EObject to = _eObject;
|
||||
boolean _or = false;
|
||||
boolean _equals = Objects.equal(to, null);
|
||||
if (_equals) {
|
||||
if ((to == null)) {
|
||||
_or = true;
|
||||
} else {
|
||||
Resource _eResource = to.eResource();
|
||||
|
@ -212,13 +210,12 @@ public class PortableURIs {
|
|||
if (_eResource!=null) {
|
||||
_resourceSet_1=_eResource.getResourceSet();
|
||||
}
|
||||
boolean _notEquals = (!Objects.equal(_resourceSet_1, null));
|
||||
_or = _notEquals;
|
||||
boolean _tripleNotEquals = (_resourceSet_1 != null);
|
||||
_or = _tripleNotEquals;
|
||||
}
|
||||
if (_or) {
|
||||
final URI result = this.toPortableURI(sourceResource, to);
|
||||
boolean _notEquals_1 = (!Objects.equal(result, null));
|
||||
if (_notEquals_1) {
|
||||
if ((result != null)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -236,13 +233,12 @@ public class PortableURIs {
|
|||
* @return a portable URI or <code>null</code>
|
||||
*/
|
||||
public URI toPortableURI(final StorageAwareResource sourceResource, final EObject targetObject) {
|
||||
if ((Objects.equal(targetObject, null) || targetObject.eIsProxy())) {
|
||||
if (((targetObject == null) || targetObject.eIsProxy())) {
|
||||
URI _uRI = sourceResource.getURI();
|
||||
return _uRI.appendFragment(StorageAwareResource.UNRESOLVABLE_FRAGMENT);
|
||||
}
|
||||
final String portableFragment = this.getPortableURIFragment(targetObject);
|
||||
boolean _notEquals = (!Objects.equal(portableFragment, null));
|
||||
if (_notEquals) {
|
||||
if ((portableFragment != null)) {
|
||||
URI _uRI_1 = sourceResource.getURI();
|
||||
return _uRI_1.appendFragment(portableFragment);
|
||||
}
|
||||
|
@ -258,8 +254,7 @@ public class PortableURIs {
|
|||
Resource _eResource_1 = obj.eResource();
|
||||
URI _uRI = _eResource_1.getURI();
|
||||
final IResourceDescription desc = descriptions.getResourceDescription(_uRI);
|
||||
boolean _equals = Objects.equal(desc, null);
|
||||
if (_equals) {
|
||||
if ((desc == null)) {
|
||||
return null;
|
||||
}
|
||||
Iterable<IEObjectDescription> _exportedObjects = desc.getExportedObjects();
|
||||
|
@ -274,8 +269,7 @@ public class PortableURIs {
|
|||
return Boolean.valueOf(_xblockexpression);
|
||||
};
|
||||
final IEObjectDescription containerDesc = IterableExtensions.<IEObjectDescription>findFirst(_exportedObjects, _function);
|
||||
boolean _notEquals = (!Objects.equal(containerDesc, null));
|
||||
if (_notEquals) {
|
||||
if ((containerDesc != null)) {
|
||||
final PortableURIs.PortableFragmentDescription fragmentDescription = this.createPortableFragmentDescription(containerDesc, obj);
|
||||
return this.toFragmentString(fragmentDescription);
|
||||
}
|
||||
|
@ -299,8 +293,7 @@ public class PortableURIs {
|
|||
String _join = IterableExtensions.join(segments, ":");
|
||||
String _encodeFragment = URI.encodeFragment(_join, false);
|
||||
String uriFragment = ((((PortableURIs.PORTABLE_SCHEME + "#") + eclassUriAsString) + "#") + _encodeFragment);
|
||||
boolean _notEquals = (!Objects.equal(desc.descriptionRelativeFragment, null));
|
||||
if (_notEquals) {
|
||||
if ((desc.descriptionRelativeFragment != null)) {
|
||||
String _uriFragment = uriFragment;
|
||||
String _encodeFragment_1 = URI.encodeFragment(desc.descriptionRelativeFragment, false);
|
||||
String _plus = ("#" + _encodeFragment_1);
|
||||
|
@ -371,13 +364,12 @@ public class PortableURIs {
|
|||
InternalEObject lastContainer = lastChild.eInternalContainer();
|
||||
EStructuralFeature _eContainingFeature = lastChild.eContainingFeature();
|
||||
String result = lastContainer.eURIFragmentSegment(_eContainingFeature, lastChild);
|
||||
while (((!Objects.equal(lastContainer, null)) && (!Objects.equal(fromContainer, lastContainer)))) {
|
||||
while (((lastContainer != null) && (!Objects.equal(fromContainer, lastContainer)))) {
|
||||
{
|
||||
lastChild = lastContainer;
|
||||
InternalEObject _eInternalContainer = lastContainer.eInternalContainer();
|
||||
lastContainer = _eInternalContainer;
|
||||
boolean _equals_1 = Objects.equal(lastContainer, null);
|
||||
if (_equals_1) {
|
||||
if ((lastContainer == null)) {
|
||||
throw new IllegalStateException(("No more containers for element " + lastChild));
|
||||
}
|
||||
EStructuralFeature _eContainingFeature_1 = lastChild.eContainingFeature();
|
||||
|
@ -399,8 +391,7 @@ public class PortableURIs {
|
|||
* @return the resolved EObject based. If the given fragment is <code>null</null>, the given EObject itself will be returned.
|
||||
*/
|
||||
public EObject getEObject(final EObject from, final String toFragment) {
|
||||
boolean _equals = Objects.equal(toFragment, null);
|
||||
if (_equals) {
|
||||
if ((toFragment == null)) {
|
||||
return from;
|
||||
}
|
||||
Splitter _on = Splitter.on("/");
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.resource.persistence;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -77,8 +76,7 @@ public class ResourceStorageFacade implements IResourceStorageFacade {
|
|||
public boolean shouldLoadFromStorage(final StorageAwareResource resource) {
|
||||
ResourceSet _resourceSet = resource.getResourceSet();
|
||||
final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findInstalledAdapter(_resourceSet);
|
||||
boolean _equals = Objects.equal(adapter, null);
|
||||
if (_equals) {
|
||||
if ((adapter == null)) {
|
||||
return false;
|
||||
} else {
|
||||
ImmutableSet<URI> _sourceLevelURIs = adapter.getSourceLevelURIs();
|
||||
|
@ -105,11 +103,9 @@ public class ResourceStorageFacade implements IResourceStorageFacade {
|
|||
EList<Adapter> _eAdapters = _resourceSet.eAdapters();
|
||||
Iterable<ResourceStorageProviderAdapter> _filter = Iterables.<ResourceStorageProviderAdapter>filter(_eAdapters, ResourceStorageProviderAdapter.class);
|
||||
final ResourceStorageProviderAdapter stateProvider = IterableExtensions.<ResourceStorageProviderAdapter>head(_filter);
|
||||
boolean _notEquals = (!Objects.equal(stateProvider, null));
|
||||
if (_notEquals) {
|
||||
if ((stateProvider != null)) {
|
||||
final ResourceStorageLoadable inputStream = stateProvider.getResourceStorageLoadable(resource);
|
||||
boolean _notEquals_1 = (!Objects.equal(inputStream, null));
|
||||
if (_notEquals_1) {
|
||||
if ((inputStream != null)) {
|
||||
return inputStream;
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +182,7 @@ public class ResourceStorageFacade implements IResourceStorageFacade {
|
|||
EList<Adapter> _eAdapters = _resourceSet.eAdapters();
|
||||
Iterable<ResourceStorageProviderAdapter> _filter = Iterables.<ResourceStorageProviderAdapter>filter(_eAdapters, ResourceStorageProviderAdapter.class);
|
||||
final ResourceStorageProviderAdapter stateProvider = IterableExtensions.<ResourceStorageProviderAdapter>head(_filter);
|
||||
if (((!Objects.equal(stateProvider, null)) && (!Objects.equal(stateProvider.getResourceStorageLoadable(resource), null)))) {
|
||||
if (((stateProvider != null) && (stateProvider.getResourceStorageLoadable(resource) != null))) {
|
||||
return true;
|
||||
}
|
||||
ResourceSet _resourceSet_1 = resource.getResourceSet();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.resource.persistence;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import java.io.Externalizable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInput;
|
||||
|
@ -52,8 +51,7 @@ public class SerializableEObjectDescription implements IEObjectDescription, Exte
|
|||
|
||||
@Override
|
||||
public EObject getEObjectOrProxy() {
|
||||
boolean _equals = Objects.equal(this.eObjectOrProxy, null);
|
||||
if (_equals) {
|
||||
if ((this.eObjectOrProxy == null)) {
|
||||
final EObject proxy = EcoreUtil.create(this.eClass);
|
||||
((InternalEObject) proxy).eSetProxyURI(this.eObjectURI);
|
||||
this.eObjectOrProxy = proxy;
|
||||
|
|
|
@ -68,8 +68,7 @@ class SerializationExtensions {
|
|||
}
|
||||
|
||||
public static void writeURI(final ObjectOutput out, final URI uri) throws IOException {
|
||||
boolean _equals = Objects.equal(uri, null);
|
||||
if (_equals) {
|
||||
if ((uri == null)) {
|
||||
out.writeUTF("NULL");
|
||||
} else {
|
||||
String _string = uri.toString();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.resource.persistence;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.inject.Inject;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
@ -55,7 +54,7 @@ public class StorageAwareResource extends LazyLinkingResource {
|
|||
|
||||
@Override
|
||||
public void load(final Map<?, ?> options) throws IOException {
|
||||
if (((((!this.isLoaded) && (!this.isLoading)) && (!Objects.equal(this.resourceStorageFacade, null))) && this.resourceStorageFacade.shouldLoadFromStorage(this))) {
|
||||
if (((((!this.isLoaded) && (!this.isLoading)) && (this.resourceStorageFacade != null)) && this.resourceStorageFacade.shouldLoadFromStorage(this))) {
|
||||
boolean _isDebugEnabled = StorageAwareResource.LOG.isDebugEnabled();
|
||||
if (_isDebugEnabled) {
|
||||
URI _uRI = this.getURI();
|
||||
|
@ -82,8 +81,7 @@ public class StorageAwareResource extends LazyLinkingResource {
|
|||
}
|
||||
|
||||
public void loadFromStorage(final ResourceStorageLoadable storageInputStream) throws IOException {
|
||||
boolean _equals = Objects.equal(storageInputStream, null);
|
||||
if (_equals) {
|
||||
if ((storageInputStream == null)) {
|
||||
throw new NullPointerException("storageInputStream");
|
||||
}
|
||||
final Stopwatches.StoppedTask task = Stopwatches.forTask("Loading from storage");
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
package org.eclipse.xtext.resource.persistence;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.xtext.resource.IResourceDescription;
|
||||
import org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager;
|
||||
|
@ -26,8 +25,8 @@ public class StorageAwareResourceDescriptionManager extends DefaultResourceDescr
|
|||
boolean _matched = false;
|
||||
if (resource instanceof StorageAwareResource) {
|
||||
IResourceDescription _resourceDescription = ((StorageAwareResource)resource).getResourceDescription();
|
||||
boolean _notEquals = (!Objects.equal(_resourceDescription, null));
|
||||
if (_notEquals) {
|
||||
boolean _tripleNotEquals = (_resourceDescription != null);
|
||||
if (_tripleNotEquals) {
|
||||
_matched=true;
|
||||
_switchResult = ((StorageAwareResource)resource).getResourceDescription();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class OperationCanceledManager {
|
|||
|
||||
public boolean isOperationCanceledException(final Throwable t) {
|
||||
RuntimeException _platformOperationCanceledException = this.getPlatformOperationCanceledException(t);
|
||||
return (!Objects.equal(_platformOperationCanceledException, null));
|
||||
return (_platformOperationCanceledException != null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,8 +84,7 @@ public class OperationCanceledManager {
|
|||
return ((Error)throwable);
|
||||
}
|
||||
final RuntimeException platform = this.getPlatformOperationCanceledException(throwable);
|
||||
boolean _notEquals = (!Objects.equal(platform, null));
|
||||
if (_notEquals) {
|
||||
if ((platform != null)) {
|
||||
return new OperationCanceledError(platform);
|
||||
}
|
||||
return null;
|
||||
|
@ -101,7 +100,7 @@ public class OperationCanceledManager {
|
|||
}
|
||||
|
||||
public void checkCanceled(final CancelIndicator indicator) {
|
||||
if (((!Objects.equal(indicator, null)) && indicator.isCanceled())) {
|
||||
if (((indicator != null) && indicator.isCanceled())) {
|
||||
this.throwOperationCanceledException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue