Skip to content

Commit

Permalink
[docs] References to deprecated features are errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Sep 2, 2017
1 parent 89e3f1c commit 06bd264
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Expand Up @@ -239,7 +239,7 @@ Below, the implementation extends one of the abstract classes provided by the [J
def bindBody(entity : EventListener) {
this.entities.put(entity.ID, new PhysicObject)
var a = new Address(ID, entity.ID)
var a = new Address(spaceID, entity.ID)
synchronized (this.participantInternalDataStructure) {
return this.participantInternalDataStructure.registerParticipant(a, entity)
}
Expand Down
Expand Up @@ -350,8 +350,8 @@ the `event.[:isindefaultspace!]` is equivalent to `[:isindefaultspace!](event)`.
return isDefaultContext(defaultContext)
|| isDefaultContext(defaultContext.ID)
|| isDefaultSpace(defaultSpace)
|| isDefaultSpace(defaultSpace.ID)
|| isDefaultSpace(defaultSpace.ID.ID)
|| isDefaultSpace(defaultSpace.spaceID)
|| isDefaultSpace(defaultSpace.spaceID.ID)
}
[:On]
on [:eventtype1](AnEvent) [ occurrence.inDefaultSpace ] {
Expand Down
Expand Up @@ -215,8 +215,8 @@ the container).
uses ExternalContextAccess
var myspace : Space
def testOtherFunctions(e : Event) : boolean {
return [:isinspace!](e, myspace.ID)
|| [:isinspace!](e, myspace.ID.ID)
return [:isinspace!](e, myspace.spaceID)
|| [:isinspace!](e, myspace.spaceID.ID)
}
[:On]
on [:eventtype1](AnEvent) [ [:isinspace!](occurrence, [:spacetype1](myspace)) ] {
Expand Down
Expand Up @@ -149,8 +149,8 @@ the `event.[:isinnerdefaultspace!]` is equivalent to `[:isinnerdefaultspace!](ev
uses InnerContextAccess
def testOtherFunctions(s : Space) : boolean {
return isInnerDefaultSpace(s)
|| isInnerDefaultSpace(s.ID)
|| isInnerDefaultSpace(s.ID.ID)
|| isInnerDefaultSpace(s.spaceID)
|| isInnerDefaultSpace(s.spaceID.ID)
}
[:On]
on [:eventtype1](AnEvent) [ occurrence.inInnerDefaultSpace ] {
Expand Down
Expand Up @@ -1414,7 +1414,7 @@ with the event source identifier as argument.
}

def isDefaultSpace(^space : Space) : boolean {
^space.ID == defaultSpace.spaceID
^space.spaceID == defaultSpace.spaceID
}

def isDefaultSpace(^space : SpaceID) : boolean {
Expand Down Expand Up @@ -1472,7 +1472,7 @@ The obtained code is:
import io.sarl.util.Scopes
abstract class DefaultContextInteractionsSkill implements DefaultContextInteractions {
def getDefaultSpace : EventSpace { null }
def getOwner : Agent
def getOwner : Agent { null }
[:On]
def emit(^event : Event, scope : Scope<Address> = null) {
if (^event.source === null) {
Expand Down Expand Up @@ -2932,8 +2932,8 @@ The obtained code is:
agentType = null
}
var spawnEvent = new AgentSpawned(source,
Identifiers::toUUID(id),
agentType)
agentType,
Identifiers::toUUID(id))
containingBoot.defaultSpace.emit(spawnEvent)
}

Expand Down
Expand Up @@ -40,6 +40,7 @@
import org.eclipse.xtext.xbase.XExpression;
import org.eclipse.xtext.xbase.interpreter.IEvaluationResult;
import org.eclipse.xtext.xbase.interpreter.IExpressionInterpreter;
import org.eclipse.xtext.xbase.validation.IssueCodes;
import org.junit.ComparisonFailure;

import io.sarl.lang.compilation.compiler.batch.ICompilatedResourceReceiver;
Expand Down Expand Up @@ -143,6 +144,7 @@ public File compile(int lineno, String code, List<String> issues, ICompilatedRes
this.compiler.setBootClassPath(this.bootClasspath);
this.compiler.setJavaSourceVersion(this.sourceVersion);
this.compiler.setAllWarningSeverities(Severity.IGNORE);
this.compiler.setWarningSeverity(IssueCodes.DEPRECATED_MEMBER_REFERENCE, Severity.ERROR);
this.compiler.setJavaCompilerVerbose(false);
this.compiler.getLogger().setLevel(Level.OFF);
this.compiler.addIssueMessageListener((issue, uri, message) -> {
Expand Down

0 comments on commit 06bd264

Please sign in to comment.