id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
57,200
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkSuperType
@Check(CheckType.FAST) public void checkSuperType(SarlEvent event) { checkSuperTypes( event, SARL_EVENT__EXTENDS, Utils.singletonList(event.getExtends()), Event.class, false); }
java
@Check(CheckType.FAST) public void checkSuperType(SarlEvent event) { checkSuperTypes( event, SARL_EVENT__EXTENDS, Utils.singletonList(event.getExtends()), Event.class, false); }
[ "@", "Check", "(", "CheckType", ".", "FAST", ")", "public", "void", "checkSuperType", "(", "SarlEvent", "event", ")", "{", "checkSuperTypes", "(", "event", ",", "SARL_EVENT__EXTENDS", ",", "Utils", ".", "singletonList", "(", "event", ".", "getExtends", "(", ...
Check if the supertype of the given event is a subtype of Event. @param event the type to test.
[ "Check", "if", "the", "supertype", "of", "the", "given", "event", "is", "a", "subtype", "of", "Event", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L1873-L1881
57,201
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkSuperType
@Check(CheckType.FAST) public void checkSuperType(SarlBehavior behavior) { checkSuperTypes( behavior, SARL_BEHAVIOR__EXTENDS, Utils.singletonList(behavior.getExtends()), Behavior.class, false); }
java
@Check(CheckType.FAST) public void checkSuperType(SarlBehavior behavior) { checkSuperTypes( behavior, SARL_BEHAVIOR__EXTENDS, Utils.singletonList(behavior.getExtends()), Behavior.class, false); }
[ "@", "Check", "(", "CheckType", ".", "FAST", ")", "public", "void", "checkSuperType", "(", "SarlBehavior", "behavior", ")", "{", "checkSuperTypes", "(", "behavior", ",", "SARL_BEHAVIOR__EXTENDS", ",", "Utils", ".", "singletonList", "(", "behavior", ".", "getExte...
Check if the supertype of the given behavior is a subtype of Behavior. @param behavior the type to test.
[ "Check", "if", "the", "supertype", "of", "the", "given", "behavior", "is", "a", "subtype", "of", "Behavior", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L1887-L1895
57,202
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkSuperType
@Check(CheckType.FAST) public void checkSuperType(SarlAgent agent) { checkSuperTypes( agent, SARL_AGENT__EXTENDS, Utils.singletonList(agent.getExtends()), Agent.class, false); }
java
@Check(CheckType.FAST) public void checkSuperType(SarlAgent agent) { checkSuperTypes( agent, SARL_AGENT__EXTENDS, Utils.singletonList(agent.getExtends()), Agent.class, false); }
[ "@", "Check", "(", "CheckType", ".", "FAST", ")", "public", "void", "checkSuperType", "(", "SarlAgent", "agent", ")", "{", "checkSuperTypes", "(", "agent", ",", "SARL_AGENT__EXTENDS", ",", "Utils", ".", "singletonList", "(", "agent", ".", "getExtends", "(", ...
Check if the supertype of the given agent is a subtype of Agent. @param agent the type to test.
[ "Check", "if", "the", "supertype", "of", "the", "given", "agent", "is", "a", "subtype", "of", "Agent", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L1901-L1909
57,203
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkImplementedTypes
protected boolean checkImplementedTypes( XtendTypeDeclaration element, EReference feature, List<? extends JvmTypeReference> implementedTypes, Class<?> expectedType, int mandatoryNumberOfTypes, boolean onlySubTypes) { boolean success = true; int nb = 0; int index = 0; for (final JvmTypeReferenc...
java
protected boolean checkImplementedTypes( XtendTypeDeclaration element, EReference feature, List<? extends JvmTypeReference> implementedTypes, Class<?> expectedType, int mandatoryNumberOfTypes, boolean onlySubTypes) { boolean success = true; int nb = 0; int index = 0; for (final JvmTypeReferenc...
[ "protected", "boolean", "checkImplementedTypes", "(", "XtendTypeDeclaration", "element", ",", "EReference", "feature", ",", "List", "<", "?", "extends", "JvmTypeReference", ">", "implementedTypes", ",", "Class", "<", "?", ">", "expectedType", ",", "int", "mandatoryN...
Check the implemeted type. @param element the child type. @param feature the syntactic feature related to the supertypes. @param implementedTypes the current super types. @param expectedType the expected root type. @param mandatoryNumberOfTypes the minimal number of implemented types. @param onlySubTypes if <code>true...
[ "Check", "the", "implemeted", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L1922-L1971
57,204
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkBehaviorUnitEventType
@Check(CheckType.FAST) public void checkBehaviorUnitEventType(SarlBehaviorUnit behaviorUnit) { final JvmTypeReference event = behaviorUnit.getName(); final LightweightTypeReference ref = toLightweightTypeReference(event); if (ref == null || !this.inheritanceHelper.isSarlEvent(ref)) { error(MessageFormat.forma...
java
@Check(CheckType.FAST) public void checkBehaviorUnitEventType(SarlBehaviorUnit behaviorUnit) { final JvmTypeReference event = behaviorUnit.getName(); final LightweightTypeReference ref = toLightweightTypeReference(event); if (ref == null || !this.inheritanceHelper.isSarlEvent(ref)) { error(MessageFormat.forma...
[ "@", "Check", "(", "CheckType", ".", "FAST", ")", "public", "void", "checkBehaviorUnitEventType", "(", "SarlBehaviorUnit", "behaviorUnit", ")", "{", "final", "JvmTypeReference", "event", "=", "behaviorUnit", ".", "getName", "(", ")", ";", "final", "LightweightType...
Check if the parameter of the bahavior unit is an event. @param behaviorUnit the behavior unit to test.
[ "Check", "if", "the", "parameter", "of", "the", "bahavior", "unit", "is", "an", "event", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L1977-L1992
57,205
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkCapacityFeatures
@Check(CheckType.FAST) public void checkCapacityFeatures(SarlCapacity capacity) { if (capacity.getMembers().isEmpty()) { if (!isIgnored(DISCOURAGED_CAPACITY_DEFINITION)) { addIssue(Messages.SARLValidator_77, capacity, null, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, DISCOURAGED_CAP...
java
@Check(CheckType.FAST) public void checkCapacityFeatures(SarlCapacity capacity) { if (capacity.getMembers().isEmpty()) { if (!isIgnored(DISCOURAGED_CAPACITY_DEFINITION)) { addIssue(Messages.SARLValidator_77, capacity, null, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, DISCOURAGED_CAP...
[ "@", "Check", "(", "CheckType", ".", "FAST", ")", "public", "void", "checkCapacityFeatures", "(", "SarlCapacity", "capacity", ")", "{", "if", "(", "capacity", ".", "getMembers", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "if", "(", "!", "isIgnored", ...
Check if a capacity has a feature defined inside. @param capacity the capacity to test.
[ "Check", "if", "a", "capacity", "has", "a", "feature", "defined", "inside", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L1998-L2011
57,206
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkUnusedCapacities
@Check(CheckType.NORMAL) public void checkUnusedCapacities(SarlCapacityUses uses) { if (!isIgnored(UNUSED_AGENT_CAPACITY)) { final XtendTypeDeclaration container = uses.getDeclaringType(); final JvmDeclaredType jvmContainer = (JvmDeclaredType) this.associations.getPrimaryJvmElement(container); final Map<Str...
java
@Check(CheckType.NORMAL) public void checkUnusedCapacities(SarlCapacityUses uses) { if (!isIgnored(UNUSED_AGENT_CAPACITY)) { final XtendTypeDeclaration container = uses.getDeclaringType(); final JvmDeclaredType jvmContainer = (JvmDeclaredType) this.associations.getPrimaryJvmElement(container); final Map<Str...
[ "@", "Check", "(", "CheckType", ".", "NORMAL", ")", "public", "void", "checkUnusedCapacities", "(", "SarlCapacityUses", "uses", ")", "{", "if", "(", "!", "isIgnored", "(", "UNUSED_AGENT_CAPACITY", ")", ")", "{", "final", "XtendTypeDeclaration", "container", "=",...
Check for unused capacities. @param uses the capacity use declaration.
[ "Check", "for", "unused", "capacities", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2017-L2058
57,207
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkMultipleCapacityUses
@Check(CheckType.NORMAL) public void checkMultipleCapacityUses(SarlCapacityUses uses) { if (!isIgnored(REDUNDANT_CAPACITY_USE)) { final XtendTypeDeclaration declaringType = uses.getDeclaringType(); if (declaringType != null) { final Set<String> previousCapacityUses = doGetPreviousCapacities(uses, dec...
java
@Check(CheckType.NORMAL) public void checkMultipleCapacityUses(SarlCapacityUses uses) { if (!isIgnored(REDUNDANT_CAPACITY_USE)) { final XtendTypeDeclaration declaringType = uses.getDeclaringType(); if (declaringType != null) { final Set<String> previousCapacityUses = doGetPreviousCapacities(uses, dec...
[ "@", "Check", "(", "CheckType", ".", "NORMAL", ")", "public", "void", "checkMultipleCapacityUses", "(", "SarlCapacityUses", "uses", ")", "{", "if", "(", "!", "isIgnored", "(", "REDUNDANT_CAPACITY_USE", ")", ")", "{", "final", "XtendTypeDeclaration", "declaringType...
Check for multiple capacity use declaration. @param uses the capacity use declaration.
[ "Check", "for", "multiple", "capacity", "use", "declaration", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2083-L2108
57,208
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkReservedAnnotation
@Check public void checkReservedAnnotation(XtendAnnotationTarget annotationTarget) { if (!isIgnored(USED_RESERVED_SARL_ANNOTATION)) { if (annotationTarget.getAnnotations().isEmpty() || !isRelevantAnnotationTarget(annotationTarget)) { return; } final QualifiedName reservedPackage = this.qualifiedNameConv...
java
@Check public void checkReservedAnnotation(XtendAnnotationTarget annotationTarget) { if (!isIgnored(USED_RESERVED_SARL_ANNOTATION)) { if (annotationTarget.getAnnotations().isEmpty() || !isRelevantAnnotationTarget(annotationTarget)) { return; } final QualifiedName reservedPackage = this.qualifiedNameConv...
[ "@", "Check", "public", "void", "checkReservedAnnotation", "(", "XtendAnnotationTarget", "annotationTarget", ")", "{", "if", "(", "!", "isIgnored", "(", "USED_RESERVED_SARL_ANNOTATION", ")", ")", "{", "if", "(", "annotationTarget", ".", "getAnnotations", "(", ")", ...
Check for reserved annotations. @param annotationTarget thee target to test.
[ "Check", "for", "reserved", "annotations", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2197-L2230
57,209
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.getRootOfMemberFeatureCallSequence
protected static XMemberFeatureCall getRootOfMemberFeatureCallSequence(EObject leaf, EObject container, Procedure1<XMemberFeatureCall> feedback) { EObject call = leaf; EObject obj = EcoreUtil2.getContainerOfType(leaf.eContainer(), XExpression.class); while (obj != null && (container == null || obj != container...
java
protected static XMemberFeatureCall getRootOfMemberFeatureCallSequence(EObject leaf, EObject container, Procedure1<XMemberFeatureCall> feedback) { EObject call = leaf; EObject obj = EcoreUtil2.getContainerOfType(leaf.eContainer(), XExpression.class); while (obj != null && (container == null || obj != container...
[ "protected", "static", "XMemberFeatureCall", "getRootOfMemberFeatureCallSequence", "(", "EObject", "leaf", ",", "EObject", "container", ",", "Procedure1", "<", "XMemberFeatureCall", ">", "feedback", ")", "{", "EObject", "call", "=", "leaf", ";", "EObject", "obj", "=...
Replies the member feature call that is the root of a sequence of member feature calls. <p>While the current feature call is the actual receiver of a member feature call, and not an argument, the sequence is still active. Otherwise, the sequence is stopped. @param leaf the expression at the leaf of the feature call. ...
[ "Replies", "the", "member", "feature", "call", "that", "is", "the", "root", "of", "a", "sequence", "of", "member", "feature", "calls", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2267-L2294
57,210
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.getParamTypeReferences
protected List<LightweightTypeReference> getParamTypeReferences(JvmExecutable jvmExecutable, boolean wrapFromPrimitives, boolean wrapToPrimitives) { assert (wrapFromPrimitives && !wrapToPrimitives) || (wrapToPrimitives && !wrapFromPrimitives); final List<LightweightTypeReference> types = newArrayList(); for (f...
java
protected List<LightweightTypeReference> getParamTypeReferences(JvmExecutable jvmExecutable, boolean wrapFromPrimitives, boolean wrapToPrimitives) { assert (wrapFromPrimitives && !wrapToPrimitives) || (wrapToPrimitives && !wrapFromPrimitives); final List<LightweightTypeReference> types = newArrayList(); for (f...
[ "protected", "List", "<", "LightweightTypeReference", ">", "getParamTypeReferences", "(", "JvmExecutable", "jvmExecutable", ",", "boolean", "wrapFromPrimitives", ",", "boolean", "wrapToPrimitives", ")", "{", "assert", "(", "wrapFromPrimitives", "&&", "!", "wrapToPrimitive...
Retrieve the types of the formal parameters of the given JVM executable object. @param jvmExecutable the JVM executable. @param wrapFromPrimitives indicates if the primitive types must be wrapped to object type equivalent. @param wrapToPrimitives indicates if the object types must be wrapped to primitive type equivale...
[ "Retrieve", "the", "types", "of", "the", "formal", "parameters", "of", "the", "given", "JVM", "executable", "object", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2429-L2443
57,211
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkUnmodifiableEventAccess
@Check public void checkUnmodifiableEventAccess(SarlBehaviorUnit unit) { final boolean enable1 = !isIgnored(DISCOURAGED_OCCURRENCE_READONLY_USE); final XExpression root = unit.getExpression(); final String occurrenceKw = this.grammarAccess.getOccurrenceKeyword(); for (final XFeatureCall child : EcoreUtil2.getA...
java
@Check public void checkUnmodifiableEventAccess(SarlBehaviorUnit unit) { final boolean enable1 = !isIgnored(DISCOURAGED_OCCURRENCE_READONLY_USE); final XExpression root = unit.getExpression(); final String occurrenceKw = this.grammarAccess.getOccurrenceKeyword(); for (final XFeatureCall child : EcoreUtil2.getA...
[ "@", "Check", "public", "void", "checkUnmodifiableEventAccess", "(", "SarlBehaviorUnit", "unit", ")", "{", "final", "boolean", "enable1", "=", "!", "isIgnored", "(", "DISCOURAGED_OCCURRENCE_READONLY_USE", ")", ";", "final", "XExpression", "root", "=", "unit", ".", ...
Check for usage of the event functions in the behavior units. @param unit the unit to analyze.
[ "Check", "for", "usage", "of", "the", "event", "functions", "in", "the", "behavior", "units", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2449-L2459
57,212
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkBreakKeywordUse
@Check public void checkBreakKeywordUse(SarlBreakExpression expression) { final EObject container = Utils.getFirstContainerForPredicate(expression, it -> !(it instanceof XExpression) || it instanceof XAbstractWhileExpression || it instanceof XBasicForLoopExpression || it instanceof XForLoopExpression); if ...
java
@Check public void checkBreakKeywordUse(SarlBreakExpression expression) { final EObject container = Utils.getFirstContainerForPredicate(expression, it -> !(it instanceof XExpression) || it instanceof XAbstractWhileExpression || it instanceof XBasicForLoopExpression || it instanceof XForLoopExpression); if ...
[ "@", "Check", "public", "void", "checkBreakKeywordUse", "(", "SarlBreakExpression", "expression", ")", "{", "final", "EObject", "container", "=", "Utils", ".", "getFirstContainerForPredicate", "(", "expression", ",", "it", "->", "!", "(", "it", "instanceof", "XExp...
Check for usage of break inside loops. @param expression the expression to analyze.
[ "Check", "for", "usage", "of", "break", "inside", "loops", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2465-L2487
57,213
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkStaticConstructorPrototype
@Check public void checkStaticConstructorPrototype(XtendConstructor constructor) { if (constructor.isStatic()) { if (!constructor.getAnnotations().isEmpty()) { error(Messages.SARLValidator_23, constructor, XtendPackage.eINSTANCE.getXtendAnnotationTarget_Annotations(), ValidationMessageAccept...
java
@Check public void checkStaticConstructorPrototype(XtendConstructor constructor) { if (constructor.isStatic()) { if (!constructor.getAnnotations().isEmpty()) { error(Messages.SARLValidator_23, constructor, XtendPackage.eINSTANCE.getXtendAnnotationTarget_Annotations(), ValidationMessageAccept...
[ "@", "Check", "public", "void", "checkStaticConstructorPrototype", "(", "XtendConstructor", "constructor", ")", "{", "if", "(", "constructor", ".", "isStatic", "(", ")", ")", "{", "if", "(", "!", "constructor", ".", "getAnnotations", "(", ")", ".", "isEmpty", ...
Check for a valid prototype of a static constructor. @param constructor the constructor to analyze.
[ "Check", "for", "a", "valid", "prototype", "of", "a", "static", "constructor", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2572-L2611
57,214
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkUnsynchronizedField
@Check @SuppressWarnings({"checkstyle:nestedifdepth", "checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"}) public void checkUnsynchronizedField(XtendField field) { if (doCheckValidMemberName(field) && !isIgnored(POTENTIAL_FIELD_SYNCHRONIZATION_PROBLEM)) { final JvmField jvmField = this.associations....
java
@Check @SuppressWarnings({"checkstyle:nestedifdepth", "checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"}) public void checkUnsynchronizedField(XtendField field) { if (doCheckValidMemberName(field) && !isIgnored(POTENTIAL_FIELD_SYNCHRONIZATION_PROBLEM)) { final JvmField jvmField = this.associations....
[ "@", "Check", "@", "SuppressWarnings", "(", "{", "\"checkstyle:nestedifdepth\"", ",", "\"checkstyle:npathcomplexity\"", ",", "\"checkstyle:cyclomaticcomplexity\"", "}", ")", "public", "void", "checkUnsynchronizedField", "(", "XtendField", "field", ")", "{", "if", "(", "...
Check if a field needs to be synchronized. @param field the field. @since 0.7
[ "Check", "if", "a", "field", "needs", "to", "be", "synchronized", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2618-L2678
57,215
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.isLocallyAssigned
protected boolean isLocallyAssigned(EObject target, EObject containerToFindUsage) { if (this.readAndWriteTracking.isAssigned(target)) { return true; } final Collection<Setting> usages = XbaseUsageCrossReferencer.find(target, containerToFindUsage); // field are assigned when they are not used as the left oper...
java
protected boolean isLocallyAssigned(EObject target, EObject containerToFindUsage) { if (this.readAndWriteTracking.isAssigned(target)) { return true; } final Collection<Setting> usages = XbaseUsageCrossReferencer.find(target, containerToFindUsage); // field are assigned when they are not used as the left oper...
[ "protected", "boolean", "isLocallyAssigned", "(", "EObject", "target", ",", "EObject", "containerToFindUsage", ")", "{", "if", "(", "this", ".", "readAndWriteTracking", ".", "isAssigned", "(", "target", ")", ")", "{", "return", "true", ";", "}", "final", "Coll...
Replies if the given object is locally assigned. <p>An object is locally assigned when it is the left operand of an assignment operation. @param target the object to test. @param containerToFindUsage the container in which the usages should be find. @return {@code true} if the given object is assigned. @since 0.7
[ "Replies", "if", "the", "given", "object", "is", "locally", "assigned", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2718-L2736
57,216
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.isOOType
@SuppressWarnings("static-method") protected boolean isOOType(XtendTypeDeclaration type) { return type instanceof XtendClass || type instanceof XtendInterface || type instanceof XtendEnum || type instanceof XtendAnnotationType; }
java
@SuppressWarnings("static-method") protected boolean isOOType(XtendTypeDeclaration type) { return type instanceof XtendClass || type instanceof XtendInterface || type instanceof XtendEnum || type instanceof XtendAnnotationType; }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isOOType", "(", "XtendTypeDeclaration", "type", ")", "{", "return", "type", "instanceof", "XtendClass", "||", "type", "instanceof", "XtendInterface", "||", "type", "instanceof", "XtendEnu...
Replies if the given element is an object oriented type. @param type the type to test. @return {@code true} if the type is an object oriented type.
[ "Replies", "if", "the", "given", "element", "is", "an", "object", "oriented", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2844-L2850
57,217
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.isOOActiveAnnotation
@SuppressWarnings("static-method") protected boolean isOOActiveAnnotation(XAnnotation annotation) { final String name = annotation.getAnnotationType().getQualifiedName(); return Strings.equal(Accessors.class.getName(), name) || Strings.equal(Data.class.getName(), name) || Strings.equal(Delegate.class.getNa...
java
@SuppressWarnings("static-method") protected boolean isOOActiveAnnotation(XAnnotation annotation) { final String name = annotation.getAnnotationType().getQualifiedName(); return Strings.equal(Accessors.class.getName(), name) || Strings.equal(Data.class.getName(), name) || Strings.equal(Delegate.class.getNa...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isOOActiveAnnotation", "(", "XAnnotation", "annotation", ")", "{", "final", "String", "name", "=", "annotation", ".", "getAnnotationType", "(", ")", ".", "getQualifiedName", "(", ")", ...
Replies if the given annotation is an active annotation for object-oriented elements. @param annotation the annotation. @return {@code true} if the annotation should be used only for OO elements. @see #isAOActiveAnnotation(XAnnotation)
[ "Replies", "if", "the", "given", "annotation", "is", "an", "active", "annotation", "for", "object", "-", "oriented", "elements", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2858-L2865
57,218
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.isAOActiveAnnotation
@SuppressWarnings("static-method") protected boolean isAOActiveAnnotation(XAnnotation annotation) { final String name = annotation.getAnnotationType().getQualifiedName(); return Strings.equal(Accessors.class.getName(), name); }
java
@SuppressWarnings("static-method") protected boolean isAOActiveAnnotation(XAnnotation annotation) { final String name = annotation.getAnnotationType().getQualifiedName(); return Strings.equal(Accessors.class.getName(), name); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isAOActiveAnnotation", "(", "XAnnotation", "annotation", ")", "{", "final", "String", "name", "=", "annotation", ".", "getAnnotationType", "(", ")", ".", "getQualifiedName", "(", ")", ...
Replies if the given container can receive an active annotation. @param annotation the annotation. @return {@code true} if the annotation should be used only for OO elements. @see #isOOActiveAnnotation(XAnnotation) @see #isAOActiveAnnotationReceiver(XtendTypeDeclaration)
[ "Replies", "if", "the", "given", "container", "can", "receive", "an", "active", "annotation", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2874-L2878
57,219
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.isAOActiveAnnotationReceiver
@SuppressWarnings("static-method") protected boolean isAOActiveAnnotationReceiver(XtendTypeDeclaration container) { return container instanceof SarlAgent || container instanceof SarlBehavior || container instanceof SarlSkill; }
java
@SuppressWarnings("static-method") protected boolean isAOActiveAnnotationReceiver(XtendTypeDeclaration container) { return container instanceof SarlAgent || container instanceof SarlBehavior || container instanceof SarlSkill; }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isAOActiveAnnotationReceiver", "(", "XtendTypeDeclaration", "container", ")", "{", "return", "container", "instanceof", "SarlAgent", "||", "container", "instanceof", "SarlBehavior", "||", "co...
Replies if the given annotation is an active annotation for agent-oriented elements. @param container the container to test. @return {@code true} if the container could receive an active annotation. @see #isOOActiveAnnotation(XAnnotation) @see #isAOActiveAnnotation(XAnnotation)
[ "Replies", "if", "the", "given", "annotation", "is", "an", "active", "annotation", "for", "agent", "-", "oriented", "elements", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2887-L2892
57,220
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.isForbiddenActiveAnnotation
@SuppressWarnings("static-method") protected boolean isForbiddenActiveAnnotation(XAnnotation annotation) { final String name = annotation.getAnnotationType().getQualifiedName(); return Strings.equal(EqualsHashCode.class.getName(), name) || Strings.equal(FinalFieldsConstructor.class.getName(), name); }
java
@SuppressWarnings("static-method") protected boolean isForbiddenActiveAnnotation(XAnnotation annotation) { final String name = annotation.getAnnotationType().getQualifiedName(); return Strings.equal(EqualsHashCode.class.getName(), name) || Strings.equal(FinalFieldsConstructor.class.getName(), name); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isForbiddenActiveAnnotation", "(", "XAnnotation", "annotation", ")", "{", "final", "String", "name", "=", "annotation", ".", "getAnnotationType", "(", ")", ".", "getQualifiedName", "(", ...
Replies if the given annotation is a forbidden active annotation. @param annotation the annotation. @return {@code true} if the annotation is forbidden.
[ "Replies", "if", "the", "given", "annotation", "is", "a", "forbidden", "active", "annotation", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2899-L2904
57,221
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.checkTopElementsAreUnique
@Check public void checkTopElementsAreUnique(SarlScript script) { final Multimap<String, XtendTypeDeclaration> name2type = HashMultimap.create(); for (final XtendTypeDeclaration declaration : script.getXtendTypes()) { final String name = declaration.getName(); if (!Strings.isEmpty(name)) { name2type.put(...
java
@Check public void checkTopElementsAreUnique(SarlScript script) { final Multimap<String, XtendTypeDeclaration> name2type = HashMultimap.create(); for (final XtendTypeDeclaration declaration : script.getXtendTypes()) { final String name = declaration.getName(); if (!Strings.isEmpty(name)) { name2type.put(...
[ "@", "Check", "public", "void", "checkTopElementsAreUnique", "(", "SarlScript", "script", ")", "{", "final", "Multimap", "<", "String", ",", "XtendTypeDeclaration", ">", "name2type", "=", "HashMultimap", ".", "create", "(", ")", ";", "for", "(", "final", "Xten...
Check the top elements within a script are not duplicated. @param script the SARL script
[ "Check", "the", "top", "elements", "within", "a", "script", "are", "not", "duplicated", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2910-L2931
57,222
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.isDefaultValuedParameterFunction
@SuppressWarnings("static-method") protected boolean isDefaultValuedParameterFunction(XtendFunction function) { for (final XtendParameter parameter : function.getParameters()) { if (parameter instanceof SarlFormalParameter) { final SarlFormalParameter sarlParameter = (SarlFormalParameter) parameter; if (s...
java
@SuppressWarnings("static-method") protected boolean isDefaultValuedParameterFunction(XtendFunction function) { for (final XtendParameter parameter : function.getParameters()) { if (parameter instanceof SarlFormalParameter) { final SarlFormalParameter sarlParameter = (SarlFormalParameter) parameter; if (s...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "isDefaultValuedParameterFunction", "(", "XtendFunction", "function", ")", "{", "for", "(", "final", "XtendParameter", "parameter", ":", "function", ".", "getParameters", "(", ")", ")", ...
Replies if the given function has a default value for one of its parameters. @param function the function to test. @return {@code true} if one parameter has a default value.
[ "Replies", "if", "the", "given", "function", "has", "a", "default", "value", "for", "one", "of", "its", "parameters", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L2938-L2949
57,223
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.reportCastWarnings
protected void reportCastWarnings(JvmTypeReference concreteSyntax, LightweightTypeReference toType, LightweightTypeReference fromType) { if (!isIgnored(OBSOLETE_CAST) && toType.isAssignableFrom(fromType)) { addIssue(MessageFormat.format(Messages.SARLValidator_96, fromType.getHumanReadableName(), toType.getHum...
java
protected void reportCastWarnings(JvmTypeReference concreteSyntax, LightweightTypeReference toType, LightweightTypeReference fromType) { if (!isIgnored(OBSOLETE_CAST) && toType.isAssignableFrom(fromType)) { addIssue(MessageFormat.format(Messages.SARLValidator_96, fromType.getHumanReadableName(), toType.getHum...
[ "protected", "void", "reportCastWarnings", "(", "JvmTypeReference", "concreteSyntax", ",", "LightweightTypeReference", "toType", ",", "LightweightTypeReference", "fromType", ")", "{", "if", "(", "!", "isIgnored", "(", "OBSOLETE_CAST", ")", "&&", "toType", ".", "isAssi...
Report the warnings associated to the casted expressions. @param concreteSyntax the type specified into the casted expression. @param toType the type specified into the casted expression. @param fromType the type of the source expression.
[ "Report", "the", "warnings", "associated", "to", "the", "casted", "expressions", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L3036-L3041
57,224
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.finalizeScript
public void finalizeScript() { if (this.isFinalized) { throw new IllegalStateException("already finalized"); } this.isFinalized = true; ImportManager concreteImports = new ImportManager(true); XImportSection importSection = getScript().getImportSection(); if (importSection != null) { for (XImportDecla...
java
public void finalizeScript() { if (this.isFinalized) { throw new IllegalStateException("already finalized"); } this.isFinalized = true; ImportManager concreteImports = new ImportManager(true); XImportSection importSection = getScript().getImportSection(); if (importSection != null) { for (XImportDecla...
[ "public", "void", "finalizeScript", "(", ")", "{", "if", "(", "this", ".", "isFinalized", ")", "{", "throw", "new", "IllegalStateException", "(", "\"already finalized\"", ")", ";", "}", "this", ".", "isFinalized", "=", "true", ";", "ImportManager", "concreteIm...
Finalize the script. <p>The finalization includes: <ul> <li>The import section is created.</li> </ul>
[ "Finalize", "the", "script", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L89-L117
57,225
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlEvent
public ISarlEventBuilder addSarlEvent(String name) { ISarlEventBuilder builder = this.sarlEventProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlEventBuilder addSarlEvent(String name) { ISarlEventBuilder builder = this.sarlEventProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlEventBuilder", "addSarlEvent", "(", "String", "name", ")", "{", "ISarlEventBuilder", "builder", "=", "this", ".", "sarlEventProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",", "getTypeR...
Create a SarlEvent builder. @param name the name of the SarlEvent. @return the builder.
[ "Create", "a", "SarlEvent", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L138-L142
57,226
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlCapacity
public ISarlCapacityBuilder addSarlCapacity(String name) { ISarlCapacityBuilder builder = this.sarlCapacityProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlCapacityBuilder addSarlCapacity(String name) { ISarlCapacityBuilder builder = this.sarlCapacityProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlCapacityBuilder", "addSarlCapacity", "(", "String", "name", ")", "{", "ISarlCapacityBuilder", "builder", "=", "this", ".", "sarlCapacityProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",",...
Create a SarlCapacity builder. @param name the name of the SarlCapacity. @return the builder.
[ "Create", "a", "SarlCapacity", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L151-L155
57,227
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlAgent
public ISarlAgentBuilder addSarlAgent(String name) { ISarlAgentBuilder builder = this.sarlAgentProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlAgentBuilder addSarlAgent(String name) { ISarlAgentBuilder builder = this.sarlAgentProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlAgentBuilder", "addSarlAgent", "(", "String", "name", ")", "{", "ISarlAgentBuilder", "builder", "=", "this", ".", "sarlAgentProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",", "getTypeR...
Create a SarlAgent builder. @param name the name of the SarlAgent. @return the builder.
[ "Create", "a", "SarlAgent", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L164-L168
57,228
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlBehavior
public ISarlBehaviorBuilder addSarlBehavior(String name) { ISarlBehaviorBuilder builder = this.sarlBehaviorProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlBehaviorBuilder addSarlBehavior(String name) { ISarlBehaviorBuilder builder = this.sarlBehaviorProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlBehaviorBuilder", "addSarlBehavior", "(", "String", "name", ")", "{", "ISarlBehaviorBuilder", "builder", "=", "this", ".", "sarlBehaviorProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",",...
Create a SarlBehavior builder. @param name the name of the SarlBehavior. @return the builder.
[ "Create", "a", "SarlBehavior", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L177-L181
57,229
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlSkill
public ISarlSkillBuilder addSarlSkill(String name) { ISarlSkillBuilder builder = this.sarlSkillProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlSkillBuilder addSarlSkill(String name) { ISarlSkillBuilder builder = this.sarlSkillProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlSkillBuilder", "addSarlSkill", "(", "String", "name", ")", "{", "ISarlSkillBuilder", "builder", "=", "this", ".", "sarlSkillProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",", "getTypeR...
Create a SarlSkill builder. @param name the name of the SarlSkill. @return the builder.
[ "Create", "a", "SarlSkill", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L190-L194
57,230
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlSpace
public ISarlSpaceBuilder addSarlSpace(String name) { ISarlSpaceBuilder builder = this.sarlSpaceProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlSpaceBuilder addSarlSpace(String name) { ISarlSpaceBuilder builder = this.sarlSpaceProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlSpaceBuilder", "addSarlSpace", "(", "String", "name", ")", "{", "ISarlSpaceBuilder", "builder", "=", "this", ".", "sarlSpaceProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",", "getTypeR...
Create a SarlSpace builder. @param name the name of the SarlSpace. @return the builder.
[ "Create", "a", "SarlSpace", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L203-L207
57,231
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlArtifact
public ISarlArtifactBuilder addSarlArtifact(String name) { ISarlArtifactBuilder builder = this.sarlArtifactProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlArtifactBuilder addSarlArtifact(String name) { ISarlArtifactBuilder builder = this.sarlArtifactProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlArtifactBuilder", "addSarlArtifact", "(", "String", "name", ")", "{", "ISarlArtifactBuilder", "builder", "=", "this", ".", "sarlArtifactProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",",...
Create a SarlArtifact builder. @param name the name of the SarlArtifact. @return the builder.
[ "Create", "a", "SarlArtifact", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L216-L220
57,232
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlClass
public ISarlClassBuilder addSarlClass(String name) { ISarlClassBuilder builder = this.sarlClassProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlClassBuilder addSarlClass(String name) { ISarlClassBuilder builder = this.sarlClassProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlClassBuilder", "addSarlClass", "(", "String", "name", ")", "{", "ISarlClassBuilder", "builder", "=", "this", ".", "sarlClassProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ",", "getTypeR...
Create a SarlClass builder. @param name the name of the SarlClass. @return the builder.
[ "Create", "a", "SarlClass", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L229-L233
57,233
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlInterface
public ISarlInterfaceBuilder addSarlInterface(String name) { ISarlInterfaceBuilder builder = this.sarlInterfaceProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlInterfaceBuilder addSarlInterface(String name) { ISarlInterfaceBuilder builder = this.sarlInterfaceProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlInterfaceBuilder", "addSarlInterface", "(", "String", "name", ")", "{", "ISarlInterfaceBuilder", "builder", "=", "this", ".", "sarlInterfaceProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "name", ...
Create a SarlInterface builder. @param name the name of the SarlInterface. @return the builder.
[ "Create", "a", "SarlInterface", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L242-L246
57,234
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlEnumeration
public ISarlEnumerationBuilder addSarlEnumeration(String name) { ISarlEnumerationBuilder builder = this.sarlEnumerationProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlEnumerationBuilder addSarlEnumeration(String name) { ISarlEnumerationBuilder builder = this.sarlEnumerationProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlEnumerationBuilder", "addSarlEnumeration", "(", "String", "name", ")", "{", "ISarlEnumerationBuilder", "builder", "=", "this", ".", "sarlEnumerationProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")", ",", "n...
Create a SarlEnumeration builder. @param name the name of the SarlEnumeration. @return the builder.
[ "Create", "a", "SarlEnumeration", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L255-L259
57,235
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java
ScriptBuilderImpl.addSarlAnnotationType
public ISarlAnnotationTypeBuilder addSarlAnnotationType(String name) { ISarlAnnotationTypeBuilder builder = this.sarlAnnotationTypeProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
java
public ISarlAnnotationTypeBuilder addSarlAnnotationType(String name) { ISarlAnnotationTypeBuilder builder = this.sarlAnnotationTypeProvider.get(); builder.eInit(getScript(), name, getTypeResolutionContext()); return builder; }
[ "public", "ISarlAnnotationTypeBuilder", "addSarlAnnotationType", "(", "String", "name", ")", "{", "ISarlAnnotationTypeBuilder", "builder", "=", "this", ".", "sarlAnnotationTypeProvider", ".", "get", "(", ")", ";", "builder", ".", "eInit", "(", "getScript", "(", ")",...
Create a SarlAnnotationType builder. @param name the name of the SarlAnnotationType. @return the builder.
[ "Create", "a", "SarlAnnotationType", "builder", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/ScriptBuilderImpl.java#L268-L272
57,236
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.createAgentNameEditor
protected void createAgentNameEditor(Composite parent, String text) { final Group group = SWTFactory.createGroup(parent, text, 2, 1, GridData.FILL_HORIZONTAL); this.agentNameTextField = SWTFactory.createSingleText(group, 1); this.agentNameTextField.addModifyListener(new ModifyListener() { @SuppressWarnings("sy...
java
protected void createAgentNameEditor(Composite parent, String text) { final Group group = SWTFactory.createGroup(parent, text, 2, 1, GridData.FILL_HORIZONTAL); this.agentNameTextField = SWTFactory.createSingleText(group, 1); this.agentNameTextField.addModifyListener(new ModifyListener() { @SuppressWarnings("sy...
[ "protected", "void", "createAgentNameEditor", "(", "Composite", "parent", ",", "String", "text", ")", "{", "final", "Group", "group", "=", "SWTFactory", ".", "createGroup", "(", "parent", ",", "text", ",", "2", ",", "1", ",", "GridData", ".", "FILL_HORIZONTA...
Creates the widgets for specifying a agent name. @param parent the parent composite. @param text the label of the group.
[ "Creates", "the", "widgets", "for", "specifying", "a", "agent", "name", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L164-L188
57,237
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.createContextIdentifierTypeEditor
protected void createContextIdentifierTypeEditor(Composite parent, String text) { final Group group = SWTFactory.createGroup(parent, text, 1, 1, GridData.FILL_HORIZONTAL); this.defaultContextIdentifierButton = createRadioButton(group, Messages.MainLaunchConfigurationTab_11); this.defaultContextIdentifierButton.ad...
java
protected void createContextIdentifierTypeEditor(Composite parent, String text) { final Group group = SWTFactory.createGroup(parent, text, 1, 1, GridData.FILL_HORIZONTAL); this.defaultContextIdentifierButton = createRadioButton(group, Messages.MainLaunchConfigurationTab_11); this.defaultContextIdentifierButton.ad...
[ "protected", "void", "createContextIdentifierTypeEditor", "(", "Composite", "parent", ",", "String", "text", ")", "{", "final", "Group", "group", "=", "SWTFactory", ".", "createGroup", "(", "parent", ",", "text", ",", "1", ",", "1", ",", "GridData", ".", "FI...
Creates the widgets for configuring the context identifier. @param parent the parent composite. @param text the label of the group.
[ "Creates", "the", "widgets", "for", "configuring", "the", "context", "identifier", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L196-L204
57,238
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.getSelectedContextIdentifierType
protected RootContextIdentifierType getSelectedContextIdentifierType() { if (this.randomContextIdentifierButton.getSelection()) { return RootContextIdentifierType.RANDOM_CONTEXT_ID; } if (this.bootContextIdentifierButton.getSelection()) { return RootContextIdentifierType.BOOT_AGENT_CONTEXT_ID; } return ...
java
protected RootContextIdentifierType getSelectedContextIdentifierType() { if (this.randomContextIdentifierButton.getSelection()) { return RootContextIdentifierType.RANDOM_CONTEXT_ID; } if (this.bootContextIdentifierButton.getSelection()) { return RootContextIdentifierType.BOOT_AGENT_CONTEXT_ID; } return ...
[ "protected", "RootContextIdentifierType", "getSelectedContextIdentifierType", "(", ")", "{", "if", "(", "this", ".", "randomContextIdentifierButton", ".", "getSelection", "(", ")", ")", "{", "return", "RootContextIdentifierType", ".", "RANDOM_CONTEXT_ID", ";", "}", "if"...
Replies the type of context identifier selected by the user. @return the type of context identifier.
[ "Replies", "the", "type", "of", "context", "identifier", "selected", "by", "the", "user", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L210-L218
57,239
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.updateContextIdentifierTypeFromConfig
protected void updateContextIdentifierTypeFromConfig(ILaunchConfiguration config) { final RootContextIdentifierType type = this.accessor.getDefaultContextIdentifier(config); assert type != null; switch (type) { case RANDOM_CONTEXT_ID: this.randomContextIdentifierButton.setSelection(true); break; case BO...
java
protected void updateContextIdentifierTypeFromConfig(ILaunchConfiguration config) { final RootContextIdentifierType type = this.accessor.getDefaultContextIdentifier(config); assert type != null; switch (type) { case RANDOM_CONTEXT_ID: this.randomContextIdentifierButton.setSelection(true); break; case BO...
[ "protected", "void", "updateContextIdentifierTypeFromConfig", "(", "ILaunchConfiguration", "config", ")", "{", "final", "RootContextIdentifierType", "type", "=", "this", ".", "accessor", ".", "getDefaultContextIdentifier", "(", "config", ")", ";", "assert", "type", "!="...
Loads the context identifier type from the launch configuration's preference store. @param config the config to load the agent name from
[ "Loads", "the", "context", "identifier", "type", "from", "the", "launch", "configuration", "s", "preference", "store", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L255-L270
57,240
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.updateAgentNameFromConfig
protected void updateAgentNameFromConfig(ILaunchConfiguration config) { final String agentName = this.accessor.getAgent(config); this.agentNameTextField.setText(Strings.nullToEmpty(agentName)); }
java
protected void updateAgentNameFromConfig(ILaunchConfiguration config) { final String agentName = this.accessor.getAgent(config); this.agentNameTextField.setText(Strings.nullToEmpty(agentName)); }
[ "protected", "void", "updateAgentNameFromConfig", "(", "ILaunchConfiguration", "config", ")", "{", "final", "String", "agentName", "=", "this", ".", "accessor", ".", "getAgent", "(", "config", ")", ";", "this", ".", "agentNameTextField", ".", "setText", "(", "St...
Loads the agent name from the launch configuration's preference store. @param config the config to load the agent name from
[ "Loads", "the", "agent", "name", "from", "the", "launch", "configuration", "s", "preference", "store", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L297-L300
57,241
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.isValidAgentName
protected boolean isValidAgentName() { if (this.lastAgentNameError != null) { final boolean isValid = Strings.isNullOrEmpty(this.lastAgentNameError); if (!isValid) { setErrorMessage(this.lastAgentNameError); } return isValid; } final String name = this.agentNameTextField.getText(); if (Strings.i...
java
protected boolean isValidAgentName() { if (this.lastAgentNameError != null) { final boolean isValid = Strings.isNullOrEmpty(this.lastAgentNameError); if (!isValid) { setErrorMessage(this.lastAgentNameError); } return isValid; } final String name = this.agentNameTextField.getText(); if (Strings.i...
[ "protected", "boolean", "isValidAgentName", "(", ")", "{", "if", "(", "this", ".", "lastAgentNameError", "!=", "null", ")", "{", "final", "boolean", "isValid", "=", "Strings", ".", "isNullOrEmpty", "(", "this", ".", "lastAgentNameError", ")", ";", "if", "(",...
Replies if the agent name is valid. @return the validity state.
[ "Replies", "if", "the", "agent", "name", "is", "valid", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L332-L353
57,242
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.isValidProjectName
protected boolean isValidProjectName() { final String name = this.fProjText.getText(); if (Strings.isNullOrEmpty(name)) { setErrorMessage(Messages.MainLaunchConfigurationTab_3); return false; } final IWorkspace workspace = ResourcesPlugin.getWorkspace(); final IStatus status = workspace.validateName(nam...
java
protected boolean isValidProjectName() { final String name = this.fProjText.getText(); if (Strings.isNullOrEmpty(name)) { setErrorMessage(Messages.MainLaunchConfigurationTab_3); return false; } final IWorkspace workspace = ResourcesPlugin.getWorkspace(); final IStatus status = workspace.validateName(nam...
[ "protected", "boolean", "isValidProjectName", "(", ")", "{", "final", "String", "name", "=", "this", ".", "fProjText", ".", "getText", "(", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "name", ")", ")", "{", "setErrorMessage", "(", "Messages"...
Replies if the project name is valid. <p>Copied from JDT. @return the validity state.
[ "Replies", "if", "the", "project", "name", "is", "valid", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L361-L387
57,243
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.initializeAgentName
protected void initializeAgentName(IJavaElement javaElement, ILaunchConfigurationWorkingCopy config) { String name = extractNameFromJavaElement(javaElement); // Set the attribute this.configurator.setAgent(config, name); // Rename the launch configuration if (name.length() > 0) { final int index = name.l...
java
protected void initializeAgentName(IJavaElement javaElement, ILaunchConfigurationWorkingCopy config) { String name = extractNameFromJavaElement(javaElement); // Set the attribute this.configurator.setAgent(config, name); // Rename the launch configuration if (name.length() > 0) { final int index = name.l...
[ "protected", "void", "initializeAgentName", "(", "IJavaElement", "javaElement", ",", "ILaunchConfigurationWorkingCopy", "config", ")", "{", "String", "name", "=", "extractNameFromJavaElement", "(", "javaElement", ")", ";", "// Set the attribute", "this", ".", "configurato...
Reset the given configuration with the agent name attributes associated to the given element. @param javaElement the element from which information may be retrieved. @param config the config to set with the agent name.
[ "Reset", "the", "given", "configuration", "with", "the", "agent", "name", "attributes", "associated", "to", "the", "given", "element", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L473-L488
57,244
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.handleAgentNameSearchButtonSelected
protected void handleAgentNameSearchButtonSelected() { final IType[] types = searchAgentNames(); // Ask to the user final DebugTypeSelectionDialog mmsd = new DebugTypeSelectionDialog(getShell(), types, ""); //$NON-NLS-1$ if (mmsd.open() == Window.CANCEL) { return; } final IType type = (IType) mmsd.ge...
java
protected void handleAgentNameSearchButtonSelected() { final IType[] types = searchAgentNames(); // Ask to the user final DebugTypeSelectionDialog mmsd = new DebugTypeSelectionDialog(getShell(), types, ""); //$NON-NLS-1$ if (mmsd.open() == Window.CANCEL) { return; } final IType type = (IType) mmsd.ge...
[ "protected", "void", "handleAgentNameSearchButtonSelected", "(", ")", "{", "final", "IType", "[", "]", "types", "=", "searchAgentNames", "(", ")", ";", "// Ask to the user", "final", "DebugTypeSelectionDialog", "mmsd", "=", "new", "DebugTypeSelectionDialog", "(", "get...
Invoked when the search button for the agent agent was clocked.
[ "Invoked", "when", "the", "search", "button", "for", "the", "agent", "agent", "was", "clocked", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L556-L569
57,245
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/properties/RuntimeEnvironmentPropertyPage.java
RuntimeEnvironmentPropertyPage.saveProjectSpecificOptions
@SuppressWarnings("static-method") protected boolean saveProjectSpecificOptions(IProject project, boolean useSpecificOptions) { if (project != null) { try { project.setPersistentProperty( qualify(PROPERTY_NAME_HAS_PROJECT_SPECIFIC), Boolean.toString(useSpecificOptions)); return true; } catc...
java
@SuppressWarnings("static-method") protected boolean saveProjectSpecificOptions(IProject project, boolean useSpecificOptions) { if (project != null) { try { project.setPersistentProperty( qualify(PROPERTY_NAME_HAS_PROJECT_SPECIFIC), Boolean.toString(useSpecificOptions)); return true; } catc...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "boolean", "saveProjectSpecificOptions", "(", "IProject", "project", ",", "boolean", "useSpecificOptions", ")", "{", "if", "(", "project", "!=", "null", ")", "{", "try", "{", "project", ".", "s...
Save the flag that indicates if the specific project options must be used. @param project the project. @param useSpecificOptions indicates if the specific options must be used. @return <code>true</code> if the property was saved successfully.
[ "Save", "the", "flag", "that", "indicates", "if", "the", "specific", "project", "options", "must", "be", "used", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/properties/RuntimeEnvironmentPropertyPage.java#L149-L162
57,246
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java
M2EUtilities.compareOsgiVersions
public static int compareOsgiVersions(String v1, String v2) { return Version.parseVersion(v1).compareTo(Version.parseVersion(v2)); }
java
public static int compareOsgiVersions(String v1, String v2) { return Version.parseVersion(v1).compareTo(Version.parseVersion(v2)); }
[ "public", "static", "int", "compareOsgiVersions", "(", "String", "v1", ",", "String", "v2", ")", "{", "return", "Version", ".", "parseVersion", "(", "v1", ")", ".", "compareTo", "(", "Version", ".", "parseVersion", "(", "v2", ")", ")", ";", "}" ]
Compare two OSGI versions. @param v1 first OSGI version. @param v2 second OSGI version. @return an integer that the sign indicates if v1 is lower, equal ot greater than v2.
[ "Compare", "two", "OSGI", "versions", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java#L63-L65
57,247
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java
M2EUtilities.compareMavenVersions
public static int compareMavenVersions(String v1, String v2) { return parseMavenVersion(v1).compareTo(parseMavenVersion(v2)); }
java
public static int compareMavenVersions(String v1, String v2) { return parseMavenVersion(v1).compareTo(parseMavenVersion(v2)); }
[ "public", "static", "int", "compareMavenVersions", "(", "String", "v1", ",", "String", "v2", ")", "{", "return", "parseMavenVersion", "(", "v1", ")", ".", "compareTo", "(", "parseMavenVersion", "(", "v2", ")", ")", ";", "}" ]
Compare two Maven versions. @param v1 first Maven version. @param v2 second Maven version. @return an integer that the sign indicates if v1 is lower, equal ot greater than v2.
[ "Compare", "two", "Maven", "versions", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java#L73-L75
57,248
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java
M2EUtilities.parseMavenVersion
public static Version parseMavenVersion(String version) { if (Strings.isNullOrEmpty(version)) { return new Version(0, 0, 0); } // Detect the snapshot final boolean isSnapshot; final String coreVersion; Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher(version); if (matcher.matches()) { coreVe...
java
public static Version parseMavenVersion(String version) { if (Strings.isNullOrEmpty(version)) { return new Version(0, 0, 0); } // Detect the snapshot final boolean isSnapshot; final String coreVersion; Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher(version); if (matcher.matches()) { coreVe...
[ "public", "static", "Version", "parseMavenVersion", "(", "String", "version", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "version", ")", ")", "{", "return", "new", "Version", "(", "0", ",", "0", ",", "0", ")", ";", "}", "// Detect the sna...
Maven version parser. @param version the version string. @return the version.
[ "Maven", "version", "parser", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java#L82-L123
57,249
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java
SREutils.getInternalSkill
@Pure public static <S extends Capacity> S getInternalSkill(Agent agent, Class<S> type) { return agent.getSkill(type); }
java
@Pure public static <S extends Capacity> S getInternalSkill(Agent agent, Class<S> type) { return agent.getSkill(type); }
[ "@", "Pure", "public", "static", "<", "S", "extends", "Capacity", ">", "S", "getInternalSkill", "(", "Agent", "agent", ",", "Class", "<", "S", ">", "type", ")", "{", "return", "agent", ".", "getSkill", "(", "type", ")", ";", "}" ]
Replies the internal skill of an agent. @param <S> the type of the capacity. @param agent the agent. @param type the type of the capacity. @return the skill. @throws UnimplementedCapacityException if the agent has not a skill for the given capacity. @since 0.6
[ "Replies", "the", "internal", "skill", "of", "an", "agent", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java#L139-L142
57,250
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/network/NetworkConfig.java
NetworkConfig.getStringEncodingCharset
public static Charset getStringEncodingCharset() { if (currentStringEncoding == null) { final String value = JanusConfig.getSystemProperty(BYTE_ARRAY_STRING_CHARSET_NAME, null); if (value != null) { try { currentStringEncoding = Charset.forName(value); if (currentStringEncoding == null) { cu...
java
public static Charset getStringEncodingCharset() { if (currentStringEncoding == null) { final String value = JanusConfig.getSystemProperty(BYTE_ARRAY_STRING_CHARSET_NAME, null); if (value != null) { try { currentStringEncoding = Charset.forName(value); if (currentStringEncoding == null) { cu...
[ "public", "static", "Charset", "getStringEncodingCharset", "(", ")", "{", "if", "(", "currentStringEncoding", "==", "null", ")", "{", "final", "String", "value", "=", "JanusConfig", ".", "getSystemProperty", "(", "BYTE_ARRAY_STRING_CHARSET_NAME", ",", "null", ")", ...
Replies the charset that must be used for encoding the strings. @return the encoding charset.
[ "Replies", "the", "charset", "that", "must", "be", "used", "for", "encoding", "the", "strings", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/network/NetworkConfig.java#L97-L114
57,251
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java
AbstractMemberBuilderFragment.generateIMemberBuilder
protected void generateIMemberBuilder(MemberDescription description) { if (description.isTopElement()) { return; } final TypeReference builder = description.getElementDescription().getBuilderInterfaceType(); final StringConcatenationClient content = new StringConcatenationClient() { @Override protected...
java
protected void generateIMemberBuilder(MemberDescription description) { if (description.isTopElement()) { return; } final TypeReference builder = description.getElementDescription().getBuilderInterfaceType(); final StringConcatenationClient content = new StringConcatenationClient() { @Override protected...
[ "protected", "void", "generateIMemberBuilder", "(", "MemberDescription", "description", ")", "{", "if", "(", "description", ".", "isTopElement", "(", ")", ")", "{", "return", ";", "}", "final", "TypeReference", "builder", "=", "description", ".", "getElementDescri...
Generate the member builder interface. @param description the description of the member.
[ "Generate", "the", "member", "builder", "interface", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java#L102-L130
57,252
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java
AbstractMemberBuilderFragment.generateMemberAppender
protected void generateMemberAppender(MemberDescription description) { if (description.isTopElement()) { return; } final TypeReference appender = description.getElementDescription().getAppenderType(); final String generatedFieldAccessor = getGeneratedMemberAccessor(description); final StringConcatenationCl...
java
protected void generateMemberAppender(MemberDescription description) { if (description.isTopElement()) { return; } final TypeReference appender = description.getElementDescription().getAppenderType(); final String generatedFieldAccessor = getGeneratedMemberAccessor(description); final StringConcatenationCl...
[ "protected", "void", "generateMemberAppender", "(", "MemberDescription", "description", ")", "{", "if", "(", "description", ".", "isTopElement", "(", ")", ")", "{", "return", ";", "}", "final", "TypeReference", "appender", "=", "description", ".", "getElementDescr...
Generate the member appender. @param description the description of the member.
[ "Generate", "the", "member", "appender", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java#L175-L210
57,253
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java
AbstractMemberBuilderFragment.getGeneratedMemberAccessor
@SuppressWarnings("static-method") protected String getGeneratedMemberAccessor(MemberDescription description) { return "get" //$NON-NLS-1$ + Strings.toFirstUpper(description.getElementDescription().getElementType().getSimpleName()) + "()"; //$NON-NLS-1$ }
java
@SuppressWarnings("static-method") protected String getGeneratedMemberAccessor(MemberDescription description) { return "get" //$NON-NLS-1$ + Strings.toFirstUpper(description.getElementDescription().getElementType().getSimpleName()) + "()"; //$NON-NLS-1$ }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "String", "getGeneratedMemberAccessor", "(", "MemberDescription", "description", ")", "{", "return", "\"get\"", "//$NON-NLS-1$", "+", "Strings", ".", "toFirstUpper", "(", "description", ".", "getElemen...
Replies the name of the accessor that replies the generated member. @param description the description of the member to generate. @return the accessor name.
[ "Replies", "the", "name", "of", "the", "accessor", "that", "replies", "the", "generated", "member", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java#L217-L221
57,254
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java
BindingFactory.bindAnnotatedWith
protected Binding bindAnnotatedWith(TypeReference bind, TypeReference annotatedWith, TypeReference to, String functionName) { final StringConcatenationClient client = new StringConcatenationClient() { @Override protected void appendTo(TargetStringConcatenation builder) { builder.append("binder.bind("); /...
java
protected Binding bindAnnotatedWith(TypeReference bind, TypeReference annotatedWith, TypeReference to, String functionName) { final StringConcatenationClient client = new StringConcatenationClient() { @Override protected void appendTo(TargetStringConcatenation builder) { builder.append("binder.bind("); /...
[ "protected", "Binding", "bindAnnotatedWith", "(", "TypeReference", "bind", ",", "TypeReference", "annotatedWith", ",", "TypeReference", "to", ",", "String", "functionName", ")", "{", "final", "StringConcatenationClient", "client", "=", "new", "StringConcatenationClient", ...
Bind an annotated element. @param bind the type to bind. @param annotatedWith the annotation to consider. @param to the target type. @param functionName the optional function name. @return the binding element.
[ "Bind", "an", "annotated", "element", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java#L91-L112
57,255
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java
BindingFactory.bindAnnotatedWithNameToInstance
protected Binding bindAnnotatedWithNameToInstance(TypeReference bind, String name, String to, String functionName) { String tmpName = Strings.emptyIfNull(name); if (tmpName.startsWith(REFERENCE_PREFIX)) { tmpName = tmpName.substring(REFERENCE_PREFIX.length()).trim(); } else { tmpName = "\"" + tmpName + "...
java
protected Binding bindAnnotatedWithNameToInstance(TypeReference bind, String name, String to, String functionName) { String tmpName = Strings.emptyIfNull(name); if (tmpName.startsWith(REFERENCE_PREFIX)) { tmpName = tmpName.substring(REFERENCE_PREFIX.length()).trim(); } else { tmpName = "\"" + tmpName + "...
[ "protected", "Binding", "bindAnnotatedWithNameToInstance", "(", "TypeReference", "bind", ",", "String", "name", ",", "String", "to", ",", "String", "functionName", ")", "{", "String", "tmpName", "=", "Strings", ".", "emptyIfNull", "(", "name", ")", ";", "if", ...
Bind a type annotated with a name of the given value. @param bind the type to bind. @param name the name to consider. @param to the instance. @param functionName the optional function name. @return the binding element.
[ "Bind", "a", "type", "annotated", "with", "a", "name", "of", "the", "given", "value", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java#L191-L219
57,256
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java
BindingFactory.bindToInstance
protected Binding bindToInstance(TypeReference bind, String functionName, String instanceExpression, boolean isSingleton, boolean isEager) { final BindKey type; final BindValue value; if (!Strings.isEmpty(functionName) && functionName.startsWith(CONFIGURE_PREFIX)) { final String fname = functionName.substri...
java
protected Binding bindToInstance(TypeReference bind, String functionName, String instanceExpression, boolean isSingleton, boolean isEager) { final BindKey type; final BindValue value; if (!Strings.isEmpty(functionName) && functionName.startsWith(CONFIGURE_PREFIX)) { final String fname = functionName.substri...
[ "protected", "Binding", "bindToInstance", "(", "TypeReference", "bind", ",", "String", "functionName", ",", "String", "instanceExpression", ",", "boolean", "isSingleton", ",", "boolean", "isEager", ")", "{", "final", "BindKey", "type", ";", "final", "BindValue", "...
Bind a type to an instance expression. @param bind the type to bind. @param functionName the name of the binding function. It may be <code>null</code> for the default name. @param instanceExpression the expression that represents the instance. @param isSingleton indicates if the instance is a singleton. @param isEager...
[ "Bind", "a", "type", "to", "an", "instance", "expression", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java#L230-L263
57,257
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java
BindingFactory.add
public void add(Binding binding, boolean override) { final Set<Binding> moduleBindings = this.module.get().getBindings(); final Binding otherBinding = findBinding(moduleBindings, binding); if (!override) { if (otherBinding != null) { throw new IllegalArgumentException(MessageFormat.format( "Forbidden...
java
public void add(Binding binding, boolean override) { final Set<Binding> moduleBindings = this.module.get().getBindings(); final Binding otherBinding = findBinding(moduleBindings, binding); if (!override) { if (otherBinding != null) { throw new IllegalArgumentException(MessageFormat.format( "Forbidden...
[ "public", "void", "add", "(", "Binding", "binding", ",", "boolean", "override", ")", "{", "final", "Set", "<", "Binding", ">", "moduleBindings", "=", "this", ".", "module", ".", "get", "(", ")", ".", "getBindings", "(", ")", ";", "final", "Binding", "o...
Add the binding. @param binding the binding to add. @param override indicates if the binding could override an existing element.
[ "Add", "the", "binding", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java#L343-L359
57,258
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java
BindingFactory.contributeToModule
public void contributeToModule() { final GuiceModuleAccess module = this.module.get(); if (!this.removableBindings.isEmpty()) { // Ok, we are broking the Java secutiry manager. // But it's for having something working! try { final Field field = module.getClass().getDeclaredField("bindings"); //$NON-NLS...
java
public void contributeToModule() { final GuiceModuleAccess module = this.module.get(); if (!this.removableBindings.isEmpty()) { // Ok, we are broking the Java secutiry manager. // But it's for having something working! try { final Field field = module.getClass().getDeclaredField("bindings"); //$NON-NLS...
[ "public", "void", "contributeToModule", "(", ")", "{", "final", "GuiceModuleAccess", "module", "=", "this", ".", "module", ".", "get", "(", ")", ";", "if", "(", "!", "this", ".", "removableBindings", ".", "isEmpty", "(", ")", ")", "{", "// Ok, we are broki...
Put the bindings to the associated module.
[ "Put", "the", "bindings", "to", "the", "associated", "module", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java#L363-L383
57,259
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java
BindingFactory.toBinding
public Binding toBinding(BindingElement element) { final TypeReference typeReference = typeRef(element.getBind()); final String annotatedWith = element.getAnnotatedWith(); final String annotatedWithName = element.getAnnotatedWithName(); if (!Strings.isEmpty(annotatedWith)) { final TypeReference annotationTyp...
java
public Binding toBinding(BindingElement element) { final TypeReference typeReference = typeRef(element.getBind()); final String annotatedWith = element.getAnnotatedWith(); final String annotatedWithName = element.getAnnotatedWithName(); if (!Strings.isEmpty(annotatedWith)) { final TypeReference annotationTyp...
[ "public", "Binding", "toBinding", "(", "BindingElement", "element", ")", "{", "final", "TypeReference", "typeReference", "=", "typeRef", "(", "element", ".", "getBind", "(", ")", ")", ";", "final", "String", "annotatedWith", "=", "element", ".", "getAnnotatedWit...
Convert a binding element to a Guive binding. @param element the element to convert. @return the Guice binding.
[ "Convert", "a", "binding", "element", "to", "a", "Guive", "binding", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/BindingFactory.java#L405-L444
57,260
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/EnableSarlMavenNatureAction.java
EnableSarlMavenNatureAction.enableNature
protected void enableNature(IProject project) { final IFile pom = project.getFile(IMavenConstants.POM_FILE_NAME); final Job job; if (pom.exists()) { job = createJobForMavenProject(project); } else { job = createJobForJavaProject(project); } if (job != null) { job.schedule(); } }
java
protected void enableNature(IProject project) { final IFile pom = project.getFile(IMavenConstants.POM_FILE_NAME); final Job job; if (pom.exists()) { job = createJobForMavenProject(project); } else { job = createJobForJavaProject(project); } if (job != null) { job.schedule(); } }
[ "protected", "void", "enableNature", "(", "IProject", "project", ")", "{", "final", "IFile", "pom", "=", "project", ".", "getFile", "(", "IMavenConstants", ".", "POM_FILE_NAME", ")", ";", "final", "Job", "job", ";", "if", "(", "pom", ".", "exists", "(", ...
Enable the SARL Maven nature. @param project the project.
[ "Enable", "the", "SARL", "Maven", "nature", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/EnableSarlMavenNatureAction.java#L122-L133
57,261
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/EnableSarlMavenNatureAction.java
EnableSarlMavenNatureAction.createJobForMavenProject
@SuppressWarnings("static-method") protected Job createJobForMavenProject(IProject project) { return new Job(Messages.EnableSarlMavenNatureAction_0) { @Override protected IStatus run(IProgressMonitor monitor) { final SubMonitor mon = SubMonitor.convert(monitor, 3); try { // The project should be ...
java
@SuppressWarnings("static-method") protected Job createJobForMavenProject(IProject project) { return new Job(Messages.EnableSarlMavenNatureAction_0) { @Override protected IStatus run(IProgressMonitor monitor) { final SubMonitor mon = SubMonitor.convert(monitor, 3); try { // The project should be ...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "Job", "createJobForMavenProject", "(", "IProject", "project", ")", "{", "return", "new", "Job", "(", "Messages", ".", "EnableSarlMavenNatureAction_0", ")", "{", "@", "Override", "protected", "ISta...
Create the configuration job for a Maven project. @param project the project to configure. @return the job.
[ "Create", "the", "configuration", "job", "for", "a", "Maven", "project", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/EnableSarlMavenNatureAction.java#L140-L175
57,262
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/EnableSarlMavenNatureAction.java
EnableSarlMavenNatureAction.createJobForJavaProject
@SuppressWarnings("static-method") protected Job createJobForJavaProject(IProject project) { return new Job(Messages.EnableSarlMavenNatureAction_0) { @Override protected IStatus run(IProgressMonitor monitor) { final SubMonitor mon = SubMonitor.convert(monitor, 3); // Force the project configuration to...
java
@SuppressWarnings("static-method") protected Job createJobForJavaProject(IProject project) { return new Job(Messages.EnableSarlMavenNatureAction_0) { @Override protected IStatus run(IProgressMonitor monitor) { final SubMonitor mon = SubMonitor.convert(monitor, 3); // Force the project configuration to...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "Job", "createJobForJavaProject", "(", "IProject", "project", ")", "{", "return", "new", "Job", "(", "Messages", ".", "EnableSarlMavenNatureAction_0", ")", "{", "@", "Override", "protected", "IStat...
Create the configuration job for a Java project. @param project the project to configure. @return the job.
[ "Create", "the", "configuration", "job", "for", "a", "Java", "project", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/EnableSarlMavenNatureAction.java#L182-L204
57,263
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java
StandardSpawnService.fireAgentSpawnedOutsideAgent
protected void fireAgentSpawnedOutsideAgent(UUID spawningAgent, AgentContext context, Class<? extends Agent> agentClazz, List<Agent> agents, Object... initializationParameters) { // Notify the listeners on the spawn events (not restricted to a single agent) for (final SpawnServiceListener l : this.globalListener...
java
protected void fireAgentSpawnedOutsideAgent(UUID spawningAgent, AgentContext context, Class<? extends Agent> agentClazz, List<Agent> agents, Object... initializationParameters) { // Notify the listeners on the spawn events (not restricted to a single agent) for (final SpawnServiceListener l : this.globalListener...
[ "protected", "void", "fireAgentSpawnedOutsideAgent", "(", "UUID", "spawningAgent", ",", "AgentContext", "context", ",", "Class", "<", "?", "extends", "Agent", ">", "agentClazz", ",", "List", "<", "Agent", ">", "agents", ",", "Object", "...", "initializationParamet...
Notify the listeners about the agents' spawning. @param spawningAgent the spawning agent. @param context the context in which the agents were spawned. @param agentClazz the type of the spwnaed agents. @param agents the spawned agents. @param initializationParameters the initialization parameters.
[ "Notify", "the", "listeners", "about", "the", "agents", "spawning", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java#L213-L239
57,264
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java
StandardSpawnService.fireAgentSpawnedInAgent
protected void fireAgentSpawnedInAgent(UUID spawningAgent, AgentContext context, Agent agent, Object... initializationParameters) { // Notify the listeners on the lifecycle events inside // the just spawned agent. // Usually, only BICs and the AgentLifeCycleSupport in // io.janusproject.kernel.bic.StandardBuilt...
java
protected void fireAgentSpawnedInAgent(UUID spawningAgent, AgentContext context, Agent agent, Object... initializationParameters) { // Notify the listeners on the lifecycle events inside // the just spawned agent. // Usually, only BICs and the AgentLifeCycleSupport in // io.janusproject.kernel.bic.StandardBuilt...
[ "protected", "void", "fireAgentSpawnedInAgent", "(", "UUID", "spawningAgent", ",", "AgentContext", "context", ",", "Agent", "agent", ",", "Object", "...", "initializationParameters", ")", "{", "// Notify the listeners on the lifecycle events inside", "// the just spawned agent....
Notify the agent's listeners about its spawning. @param spawningAgent the spawning agent. @param context the context in which the agent was spawned. @param agent the spawned agent. @param initializationParameters the initialization parameters.
[ "Notify", "the", "agent", "s", "listeners", "about", "its", "spawning", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java#L248-L264
57,265
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java
StandardSpawnService.getAgents
public SynchronizedSet<UUID> getAgents() { final Object mutex = getAgentRepositoryMutex(); synchronized (mutex) { return Collections3.synchronizedSet(this.agents.keySet(), mutex); } }
java
public SynchronizedSet<UUID> getAgents() { final Object mutex = getAgentRepositoryMutex(); synchronized (mutex) { return Collections3.synchronizedSet(this.agents.keySet(), mutex); } }
[ "public", "SynchronizedSet", "<", "UUID", ">", "getAgents", "(", ")", "{", "final", "Object", "mutex", "=", "getAgentRepositoryMutex", "(", ")", ";", "synchronized", "(", "mutex", ")", "{", "return", "Collections3", ".", "synchronizedSet", "(", "this", ".", ...
Replies the registered agents. @return the registered agents.
[ "Replies", "the", "registered", "agents", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java#L330-L335
57,266
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java
StandardSpawnService.getAgent
Agent getAgent(UUID id) { assert id != null; synchronized (getAgentRepositoryMutex()) { return this.agents.get(id); } }
java
Agent getAgent(UUID id) { assert id != null; synchronized (getAgentRepositoryMutex()) { return this.agents.get(id); } }
[ "Agent", "getAgent", "(", "UUID", "id", ")", "{", "assert", "id", "!=", "null", ";", "synchronized", "(", "getAgentRepositoryMutex", "(", ")", ")", "{", "return", "this", ".", "agents", ".", "get", "(", "id", ")", ";", "}", "}" ]
Replies the registered agent. @param id is the identifier of the agent. @return the registered agent, or <code>null</code>.
[ "Replies", "the", "registered", "agent", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java#L344-L349
57,267
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java
StandardSpawnService.canKillAgent
@SuppressWarnings("static-method") public boolean canKillAgent(Agent agent) { try { final AgentContext ac = BuiltinCapacityUtil.getContextIn(agent); if (ac != null) { final SynchronizedSet<UUID> participants = ac.getDefaultSpace().getParticipants(); if (participants != null) { synchronized (partic...
java
@SuppressWarnings("static-method") public boolean canKillAgent(Agent agent) { try { final AgentContext ac = BuiltinCapacityUtil.getContextIn(agent); if (ac != null) { final SynchronizedSet<UUID> participants = ac.getDefaultSpace().getParticipants(); if (participants != null) { synchronized (partic...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "public", "boolean", "canKillAgent", "(", "Agent", "agent", ")", "{", "try", "{", "final", "AgentContext", "ac", "=", "BuiltinCapacityUtil", ".", "getContextIn", "(", "agent", ")", ";", "if", "(", "ac", ...
Replies if the given agent can be killed. @param agent - agent to test. @return <code>true</code> if the given agent can be killed, otherwise <code>false</code>.
[ "Replies", "if", "the", "given", "agent", "can", "be", "killed", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java#L421-L440
57,268
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java
StandardSpawnService.fireAgentDestroyed
@SuppressWarnings({"checkstyle:npathcomplexity"}) protected void fireAgentDestroyed(Agent agent) { final ListenerCollection<SpawnServiceListener> list; synchronized (getAgentLifecycleListenerMutex()) { list = this.agentLifecycleListeners.get(agent.getID()); } final SpawnServiceListener[] ilisteners; if (l...
java
@SuppressWarnings({"checkstyle:npathcomplexity"}) protected void fireAgentDestroyed(Agent agent) { final ListenerCollection<SpawnServiceListener> list; synchronized (getAgentLifecycleListenerMutex()) { list = this.agentLifecycleListeners.get(agent.getID()); } final SpawnServiceListener[] ilisteners; if (l...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:npathcomplexity\"", "}", ")", "protected", "void", "fireAgentDestroyed", "(", "Agent", "agent", ")", "{", "final", "ListenerCollection", "<", "SpawnServiceListener", ">", "list", ";", "synchronized", "(", "getAgentLifec...
Notifies the listeners about the agent destruction. @param agent - the destroyed agent.
[ "Notifies", "the", "listeners", "about", "the", "agent", "destruction", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/spawn/StandardSpawnService.java#L448-L508
57,269
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/IssueInformationPage.java
IssueInformationPage.initFields
protected void initFields() { final IEclipsePreferences prefs = SARLEclipsePlugin.getDefault().getPreferences(); this.trackerLogin.setText(prefs.get(PREFERENCE_LOGIN, "")); //$NON-NLS-1$ }
java
protected void initFields() { final IEclipsePreferences prefs = SARLEclipsePlugin.getDefault().getPreferences(); this.trackerLogin.setText(prefs.get(PREFERENCE_LOGIN, "")); //$NON-NLS-1$ }
[ "protected", "void", "initFields", "(", ")", "{", "final", "IEclipsePreferences", "prefs", "=", "SARLEclipsePlugin", ".", "getDefault", "(", ")", ".", "getPreferences", "(", ")", ";", "this", ".", "trackerLogin", ".", "setText", "(", "prefs", ".", "get", "("...
Set the initial values to the fields.
[ "Set", "the", "initial", "values", "to", "the", "fields", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/IssueInformationPage.java#L195-L198
57,270
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/IssueInformationPage.java
IssueInformationPage.updatePageStatus
protected void updatePageStatus() { final boolean ok; if (Strings.isEmpty(this.titleField.getText())) { ok = false; setMessage(Messages.IssueInformationPage_5, IMessageProvider.ERROR); } else if (Strings.isEmpty(this.trackerLogin.getText())) { ok = false; setMessage(Messages.IssueInformationPage_6, IM...
java
protected void updatePageStatus() { final boolean ok; if (Strings.isEmpty(this.titleField.getText())) { ok = false; setMessage(Messages.IssueInformationPage_5, IMessageProvider.ERROR); } else if (Strings.isEmpty(this.trackerLogin.getText())) { ok = false; setMessage(Messages.IssueInformationPage_6, IM...
[ "protected", "void", "updatePageStatus", "(", ")", "{", "final", "boolean", "ok", ";", "if", "(", "Strings", ".", "isEmpty", "(", "this", ".", "titleField", ".", "getText", "(", ")", ")", ")", "{", "ok", "=", "false", ";", "setMessage", "(", "Messages"...
Update the page status and change the "finish" state button.
[ "Update", "the", "page", "status", "and", "change", "the", "finish", "state", "button", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/IssueInformationPage.java#L202-L222
57,271
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/IssueInformationPage.java
IssueInformationPage.performFinish
public boolean performFinish() { final IEclipsePreferences prefs = SARLEclipsePlugin.getDefault().getPreferences(); final String login = this.trackerLogin.getText(); if (Strings.isEmpty(login)) { prefs.remove(PREFERENCE_LOGIN); } else { prefs.put(PREFERENCE_LOGIN, login); } try { prefs.sync(); r...
java
public boolean performFinish() { final IEclipsePreferences prefs = SARLEclipsePlugin.getDefault().getPreferences(); final String login = this.trackerLogin.getText(); if (Strings.isEmpty(login)) { prefs.remove(PREFERENCE_LOGIN); } else { prefs.put(PREFERENCE_LOGIN, login); } try { prefs.sync(); r...
[ "public", "boolean", "performFinish", "(", ")", "{", "final", "IEclipsePreferences", "prefs", "=", "SARLEclipsePlugin", ".", "getDefault", "(", ")", ".", "getPreferences", "(", ")", ";", "final", "String", "login", "=", "this", ".", "trackerLogin", ".", "getTe...
Invoked when the wizard is closed with the "Finish" button. @return {@code true} for closing the wizard; {@code false} for keeping it open.
[ "Invoked", "when", "the", "wizard", "is", "closed", "with", "the", "Finish", "button", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/log/IssueInformationPage.java#L228-L244
57,272
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/FormatterFacade.java
FormatterFacade.format
@Pure public String format(String sarlCode, ResourceSet resourceSet) { try { final URI createURI = URI.createURI("synthetic://to-be-formatted." + this.fileExtension); //$NON-NLS-1$ final Resource res = this.resourceFactory.createResource(createURI); if (res instanceof XtextResource) { final XtextResourc...
java
@Pure public String format(String sarlCode, ResourceSet resourceSet) { try { final URI createURI = URI.createURI("synthetic://to-be-formatted." + this.fileExtension); //$NON-NLS-1$ final Resource res = this.resourceFactory.createResource(createURI); if (res instanceof XtextResource) { final XtextResourc...
[ "@", "Pure", "public", "String", "format", "(", "String", "sarlCode", ",", "ResourceSet", "resourceSet", ")", "{", "try", "{", "final", "URI", "createURI", "=", "URI", ".", "createURI", "(", "\"synthetic://to-be-formatted.\"", "+", "this", ".", "fileExtension", ...
Format the given code. @param sarlCode the code to format. @param resourceSet the resource set that sohuld contains the code. This resource set may be used for resolving types by the underlying code. @return the code to format.
[ "Format", "the", "given", "code", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/FormatterFacade.java#L95-L115
57,273
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLExpressionHelper.java
SARLExpressionHelper.toBooleanPrimitiveWrapperConstant
@SuppressWarnings("static-method") public Boolean toBooleanPrimitiveWrapperConstant(XExpression expression) { if (expression instanceof XBooleanLiteral) { return ((XBooleanLiteral) expression).isIsTrue() ? Boolean.TRUE : Boolean.FALSE; } if (expression instanceof XMemberFeatureCall) { final XMemberFeatureC...
java
@SuppressWarnings("static-method") public Boolean toBooleanPrimitiveWrapperConstant(XExpression expression) { if (expression instanceof XBooleanLiteral) { return ((XBooleanLiteral) expression).isIsTrue() ? Boolean.TRUE : Boolean.FALSE; } if (expression instanceof XMemberFeatureCall) { final XMemberFeatureC...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "public", "Boolean", "toBooleanPrimitiveWrapperConstant", "(", "XExpression", "expression", ")", "{", "if", "(", "expression", "instanceof", "XBooleanLiteral", ")", "{", "return", "(", "(", "XBooleanLiteral", ")"...
Convert the boolean constant to the object equivalent if possible. @param expression the expression to convert. @return one of the boolean constants {@link Boolean#TRUE} or {@link Boolean#FALSE}, or {@code null} if the expression is not a constant boolean expression.
[ "Convert", "the", "boolean", "constant", "to", "the", "object", "equivalent", "if", "possible", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLExpressionHelper.java#L99-L121
57,274
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Event.java
Event.isFrom
@Pure public boolean isFrom(UUID entityId) { final Address iSource = getSource(); return (entityId != null) && (iSource != null) && entityId.equals(iSource.getUUID()); }
java
@Pure public boolean isFrom(UUID entityId) { final Address iSource = getSource(); return (entityId != null) && (iSource != null) && entityId.equals(iSource.getUUID()); }
[ "@", "Pure", "public", "boolean", "isFrom", "(", "UUID", "entityId", ")", "{", "final", "Address", "iSource", "=", "getSource", "(", ")", ";", "return", "(", "entityId", "!=", "null", ")", "&&", "(", "iSource", "!=", "null", ")", "&&", "entityId", ".",...
Replies if the event was emitted by an entity with the given identifier. @param entityId the identifier of the emitter to test. @return <code>true</code> if the given event was emitted by an entity with the given identifier; otherwise <code>false</code>. @since 0.2
[ "Replies", "if", "the", "event", "was", "emitted", "by", "an", "entity", "with", "the", "given", "identifier", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Event.java#L143-L148
57,275
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator.generateClosureDefinition
protected void generateClosureDefinition(XClosure closure, IAppendable it, IExtraLanguageGeneratorContext context) { if (!it.hasName(closure)) { final LightweightTypeReference closureType0 = getExpectedType(closure); LightweightTypeReference closureType = closureType0; if (closureType0.isFunctionType()) { ...
java
protected void generateClosureDefinition(XClosure closure, IAppendable it, IExtraLanguageGeneratorContext context) { if (!it.hasName(closure)) { final LightweightTypeReference closureType0 = getExpectedType(closure); LightweightTypeReference closureType = closureType0; if (closureType0.isFunctionType()) { ...
[ "protected", "void", "generateClosureDefinition", "(", "XClosure", "closure", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "if", "(", "!", "it", ".", "hasName", "(", "closure", ")", ")", "{", "final", "LightweightTypeRefere...
Generate the closure definition. @param closure the closure. @param it the target for the generated content. @param context the context.
[ "Generate", "the", "closure", "definition", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L154-L203
57,276
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator.generateAnonymousClassDefinition
protected void generateAnonymousClassDefinition(AnonymousClass anonClass, IAppendable it, IExtraLanguageGeneratorContext context) { if (!it.hasName(anonClass) && it instanceof PyAppendable) { final LightweightTypeReference jvmAnonType = getExpectedType(anonClass); final String anonName = it.declareSyntheticVari...
java
protected void generateAnonymousClassDefinition(AnonymousClass anonClass, IAppendable it, IExtraLanguageGeneratorContext context) { if (!it.hasName(anonClass) && it instanceof PyAppendable) { final LightweightTypeReference jvmAnonType = getExpectedType(anonClass); final String anonName = it.declareSyntheticVari...
[ "protected", "void", "generateAnonymousClassDefinition", "(", "AnonymousClass", "anonClass", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "if", "(", "!", "it", ".", "hasName", "(", "anonClass", ")", "&&", "it", "instanceof", ...
Generate the anonymous class definition. @param anonClass the anonymous class. @param it the target for the generated content. @param context the context.
[ "Generate", "the", "anonymous", "class", "definition", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L211-L247
57,277
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator.toDefaultValue
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:booleanexpressioncomplexity", "checkstyle:npathcomplexity"}) public static String toDefaultValue(JvmTypeReference type) { final String id = type.getIdentifier(); if (!"void".equals(id)) { //$NON-NLS-1$ if (Strings.equal(Boolean.class.getName(),...
java
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:booleanexpressioncomplexity", "checkstyle:npathcomplexity"}) public static String toDefaultValue(JvmTypeReference type) { final String id = type.getIdentifier(); if (!"void".equals(id)) { //$NON-NLS-1$ if (Strings.equal(Boolean.class.getName(),...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:cyclomaticcomplexity\"", ",", "\"checkstyle:booleanexpressioncomplexity\"", ",", "\"checkstyle:npathcomplexity\"", "}", ")", "public", "static", "String", "toDefaultValue", "(", "JvmTypeReference", "type", ")", "{", "final", ...
Replies the Python default value for the given type. @param type the type. @return the default value.
[ "Replies", "the", "Python", "default", "value", "for", "the", "given", "type", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L997-L1020
57,278
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator.newFeatureCallGenerator
protected PyFeatureCallGenerator newFeatureCallGenerator(IExtraLanguageGeneratorContext context, IAppendable it) { return new PyFeatureCallGenerator(context, (ExtraLanguageAppendable) it); }
java
protected PyFeatureCallGenerator newFeatureCallGenerator(IExtraLanguageGeneratorContext context, IAppendable it) { return new PyFeatureCallGenerator(context, (ExtraLanguageAppendable) it); }
[ "protected", "PyFeatureCallGenerator", "newFeatureCallGenerator", "(", "IExtraLanguageGeneratorContext", "context", ",", "IAppendable", "it", ")", "{", "return", "new", "PyFeatureCallGenerator", "(", "context", ",", "(", "ExtraLanguageAppendable", ")", "it", ")", ";", "...
Generate a feature call. @param context the generation context. @param it the code receiver. @return the generator
[ "Generate", "a", "feature", "call", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L1028-L1030
57,279
sarl/sarl
main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/AbstractSarlBatchCompilerMojo.java
AbstractSarlBatchCompilerMojo.readSarlEclipseSetting
protected String readSarlEclipseSetting(String sourceDirectory) { if (this.propertiesFileLocation != null) { final File file = new File(this.propertiesFileLocation); if (file.canRead()) { final Properties sarlSettings = new Properties(); try (FileInputStream stream = new FileInputStream(file)) { sa...
java
protected String readSarlEclipseSetting(String sourceDirectory) { if (this.propertiesFileLocation != null) { final File file = new File(this.propertiesFileLocation); if (file.canRead()) { final Properties sarlSettings = new Properties(); try (FileInputStream stream = new FileInputStream(file)) { sa...
[ "protected", "String", "readSarlEclipseSetting", "(", "String", "sourceDirectory", ")", "{", "if", "(", "this", ".", "propertiesFileLocation", "!=", "null", ")", "{", "final", "File", "file", "=", "new", "File", "(", "this", ".", "propertiesFileLocation", ")", ...
Read the SARL Eclipse settings for the project if existing. @param sourceDirectory the source directory. @return the path from the settings.
[ "Read", "the", "SARL", "Eclipse", "settings", "for", "the", "project", "if", "existing", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/AbstractSarlBatchCompilerMojo.java#L390-L418
57,280
sarl/sarl
main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/AbstractSarlBatchCompilerMojo.java
AbstractSarlBatchCompilerMojo.getClassPath
protected List<File> getClassPath() throws MojoExecutionException { if (this.bufferedClasspath == null) { final Set<String> classPath = new LinkedHashSet<>(); final MavenProject project = getProject(); classPath.add(project.getBuild().getSourceDirectory()); try { classPath.addAll(project.getCompileCla...
java
protected List<File> getClassPath() throws MojoExecutionException { if (this.bufferedClasspath == null) { final Set<String> classPath = new LinkedHashSet<>(); final MavenProject project = getProject(); classPath.add(project.getBuild().getSourceDirectory()); try { classPath.addAll(project.getCompileCla...
[ "protected", "List", "<", "File", ">", "getClassPath", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "this", ".", "bufferedClasspath", "==", "null", ")", "{", "final", "Set", "<", "String", ">", "classPath", "=", "new", "LinkedHashSet", "<>",...
Replies the classpath for the standard code. @return the current classpath. @throws MojoExecutionException on failure. @see #getTestClassPath()
[ "Replies", "the", "classpath", "for", "the", "standard", "code", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/AbstractSarlBatchCompilerMojo.java#L426-L452
57,281
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sarlapp/FixedFatJarExportWizard.java
FixedFatJarExportWizard.executeExportOperation
protected boolean executeExportOperation(IJarExportRunnable op, IStatus wizardPageStatus) { try { getContainer().run(true, true, op); } catch (InterruptedException e) { return false; } catch (InvocationTargetException ex) { if (ex.getTargetException() != null) { ExceptionHandler.handle(ex, getShell()...
java
protected boolean executeExportOperation(IJarExportRunnable op, IStatus wizardPageStatus) { try { getContainer().run(true, true, op); } catch (InterruptedException e) { return false; } catch (InvocationTargetException ex) { if (ex.getTargetException() != null) { ExceptionHandler.handle(ex, getShell()...
[ "protected", "boolean", "executeExportOperation", "(", "IJarExportRunnable", "op", ",", "IStatus", "wizardPageStatus", ")", "{", "try", "{", "getContainer", "(", ")", ".", "run", "(", "true", ",", "true", ",", "op", ")", ";", "}", "catch", "(", "InterruptedE...
Exports the JAR package. @param op the operation to run @param wizardPageStatus the status returned by the wizard page @return a boolean indicating success or failure
[ "Exports", "the", "JAR", "package", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sarlapp/FixedFatJarExportWizard.java#L125-L150
57,282
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sarlapp/FixedFatJarExportWizard.java
FixedFatJarExportWizard.init
public void init(IWorkbench workbench, JarPackageData jarPackage) { Assert.isNotNull(workbench); Assert.isNotNull(jarPackage); fJarPackage= jarPackage; setInitializeFromJarPackage(true); setWindowTitle(FatJarPackagerMessages.JarPackageWizard_windowTitle); setDefaultPageImageDescriptor(JavaPluginImages.DESC_...
java
public void init(IWorkbench workbench, JarPackageData jarPackage) { Assert.isNotNull(workbench); Assert.isNotNull(jarPackage); fJarPackage= jarPackage; setInitializeFromJarPackage(true); setWindowTitle(FatJarPackagerMessages.JarPackageWizard_windowTitle); setDefaultPageImageDescriptor(JavaPluginImages.DESC_...
[ "public", "void", "init", "(", "IWorkbench", "workbench", ",", "JarPackageData", "jarPackage", ")", "{", "Assert", ".", "isNotNull", "(", "workbench", ")", ";", "Assert", ".", "isNotNull", "(", "jarPackage", ")", ";", "fJarPackage", "=", "jarPackage", ";", "...
Initializes this wizard from the given JAR package description. @param workbench the workbench which launched this wizard @param jarPackage the JAR package description used to initialize this wizard
[ "Initializes", "this", "wizard", "from", "the", "given", "JAR", "package", "description", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sarlapp/FixedFatJarExportWizard.java#L203-L211
57,283
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLDiagnosticLabelDecorator.java
SARLDiagnosticLabelDecorator.convertToImage
protected Image convertToImage(Object imageDescription) { if (imageDescription instanceof Image) { return (Image) imageDescription; } else if (imageDescription instanceof ImageDescriptor) { return this.imageHelper.getImage((ImageDescriptor) imageDescription); } else if (imageDescription instanceof String) {...
java
protected Image convertToImage(Object imageDescription) { if (imageDescription instanceof Image) { return (Image) imageDescription; } else if (imageDescription instanceof ImageDescriptor) { return this.imageHelper.getImage((ImageDescriptor) imageDescription); } else if (imageDescription instanceof String) {...
[ "protected", "Image", "convertToImage", "(", "Object", "imageDescription", ")", "{", "if", "(", "imageDescription", "instanceof", "Image", ")", "{", "return", "(", "Image", ")", "imageDescription", ";", "}", "else", "if", "(", "imageDescription", "instanceof", "...
Replies the image that corresponds to the given object. @param imageDescription a {@link String}, an {@link ImageDescriptor} or an {@link Image} @return the {@link Image} associated with the description or <code>null</code>
[ "Replies", "the", "image", "that", "corresponds", "to", "the", "given", "object", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLDiagnosticLabelDecorator.java#L92-L101
57,284
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLDiagnosticLabelDecorator.java
SARLDiagnosticLabelDecorator.getIssueAdornment
@SuppressWarnings("static-method") protected int getIssueAdornment(XtendMember element) { final ICompositeNode node = NodeModelUtils.getNode(element); if (node == null) { return 0; } // Error markers are more important than warning markers. // Order of checks: // - parser error (from the resource) or se...
java
@SuppressWarnings("static-method") protected int getIssueAdornment(XtendMember element) { final ICompositeNode node = NodeModelUtils.getNode(element); if (node == null) { return 0; } // Error markers are more important than warning markers. // Order of checks: // - parser error (from the resource) or se...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "int", "getIssueAdornment", "(", "XtendMember", "element", ")", "{", "final", "ICompositeNode", "node", "=", "NodeModelUtils", ".", "getNode", "(", "element", ")", ";", "if", "(", "node", "==",...
Replies the diagnotic adornment for the given element. @param element the model element. @return the adornment.
[ "Replies", "the", "diagnotic", "adornment", "for", "the", "given", "element", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLDiagnosticLabelDecorator.java#L126-L154
57,285
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/FieldInitializerUtil.java
FieldInitializerUtil.getSelectedResource
@SuppressWarnings("static-method") public IJavaElement getSelectedResource(IStructuredSelection selection) { IJavaElement elem = null; if (selection != null && !selection.isEmpty()) { final Object object = selection.getFirstElement(); if (object instanceof IAdaptable) { final IAdaptable adaptable = (IAda...
java
@SuppressWarnings("static-method") public IJavaElement getSelectedResource(IStructuredSelection selection) { IJavaElement elem = null; if (selection != null && !selection.isEmpty()) { final Object object = selection.getFirstElement(); if (object instanceof IAdaptable) { final IAdaptable adaptable = (IAda...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "public", "IJavaElement", "getSelectedResource", "(", "IStructuredSelection", "selection", ")", "{", "IJavaElement", "elem", "=", "null", ";", "if", "(", "selection", "!=", "null", "&&", "!", "selection", "."...
Replies the Java element that corresponds to the given selection. @param selection the current selection. @return the Java element.
[ "Replies", "the", "Java", "element", "that", "corresponds", "to", "the", "given", "selection", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/FieldInitializerUtil.java#L56-L92
57,286
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java
GrammarKeywordAccessFragment2.getBasePackage
@Pure public String getBasePackage() { final Grammar grammar = getGrammar(); final String basePackage = this.naming.getRuntimeBasePackage(grammar); return basePackage + ".services"; //$NON-NLS-1$ }
java
@Pure public String getBasePackage() { final Grammar grammar = getGrammar(); final String basePackage = this.naming.getRuntimeBasePackage(grammar); return basePackage + ".services"; //$NON-NLS-1$ }
[ "@", "Pure", "public", "String", "getBasePackage", "(", ")", "{", "final", "Grammar", "grammar", "=", "getGrammar", "(", ")", ";", "final", "String", "basePackage", "=", "this", ".", "naming", ".", "getRuntimeBasePackage", "(", "grammar", ")", ";", "return",...
Replies the base package for the language. @return the base package.
[ "Replies", "the", "base", "package", "for", "the", "language", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java#L106-L111
57,287
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java
GrammarKeywordAccessFragment2.getAllKeywords
protected static Iterable<Keyword> getAllKeywords(Grammar grammar) { final Map<String, Keyword> keywords = new HashMap<>(); final List<ParserRule> rules = GrammarUtil.allParserRules(grammar); for (final ParserRule parserRule : rules) { final List<Keyword> list = typeSelect(eAllContentsAsList(parserRule), Keywo...
java
protected static Iterable<Keyword> getAllKeywords(Grammar grammar) { final Map<String, Keyword> keywords = new HashMap<>(); final List<ParserRule> rules = GrammarUtil.allParserRules(grammar); for (final ParserRule parserRule : rules) { final List<Keyword> list = typeSelect(eAllContentsAsList(parserRule), Keywo...
[ "protected", "static", "Iterable", "<", "Keyword", ">", "getAllKeywords", "(", "Grammar", "grammar", ")", "{", "final", "Map", "<", "String", ",", "Keyword", ">", "keywords", "=", "new", "HashMap", "<>", "(", ")", ";", "final", "List", "<", "ParserRule", ...
Replies the keywords in the given grammar. @param grammar the grammar. @return the keywords.
[ "Replies", "the", "keywords", "in", "the", "given", "grammar", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java#L261-L278
57,288
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java
GrammarKeywordAccessFragment2.generateKeyword
protected StringConcatenationClient generateKeyword(final String keyword, final String comment, Map<String, String> getters) { final String fieldName = keyword.toUpperCase().replaceAll("[^a-zA-Z0-9_]+", "_"); //$NON-NLS-1$ //$NON-NLS-2$ final String methodName = Strings.toFirstUpper(keyword.replaceAll("[^a-zA-Z0-9_...
java
protected StringConcatenationClient generateKeyword(final String keyword, final String comment, Map<String, String> getters) { final String fieldName = keyword.toUpperCase().replaceAll("[^a-zA-Z0-9_]+", "_"); //$NON-NLS-1$ //$NON-NLS-2$ final String methodName = Strings.toFirstUpper(keyword.replaceAll("[^a-zA-Z0-9_...
[ "protected", "StringConcatenationClient", "generateKeyword", "(", "final", "String", "keyword", ",", "final", "String", "comment", ",", "Map", "<", "String", ",", "String", ">", "getters", ")", "{", "final", "String", "fieldName", "=", "keyword", ".", "toUpperCa...
Generate a basic keyword. @param keyword the keyword to add. @param comment a comment for the javadoc. @param getters filled by this function with the getters' names. @return the content.
[ "Generate", "a", "basic", "keyword", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java#L287-L328
57,289
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java
GrammarKeywordAccessFragment2.generateKeyword
protected StringConcatenationClient generateKeyword(final Keyword keyword, final String comment, Map<String, String> getters) { try { final String methodName = getIdentifier(keyword); final String accessor = GrammarKeywordAccessFragment2.this.grammarAccessExtensions.gaAccessor(keyword); if (!Strings.isEmp...
java
protected StringConcatenationClient generateKeyword(final Keyword keyword, final String comment, Map<String, String> getters) { try { final String methodName = getIdentifier(keyword); final String accessor = GrammarKeywordAccessFragment2.this.grammarAccessExtensions.gaAccessor(keyword); if (!Strings.isEmp...
[ "protected", "StringConcatenationClient", "generateKeyword", "(", "final", "Keyword", "keyword", ",", "final", "String", "comment", ",", "Map", "<", "String", ",", "String", ">", "getters", ")", "{", "try", "{", "final", "String", "methodName", "=", "getIdentifi...
Generate a grammar keyword. @param keyword the keyword to add. @param comment a comment for the javadoc. @param getters filled by this function with the getters' names. @return the content.
[ "Generate", "a", "grammar", "keyword", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java#L337-L378
57,290
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java
GrammarKeywordAccessFragment2.protectCommentKeyword
@SuppressWarnings("static-method") protected String protectCommentKeyword(String keyword) { if ("*/".equals(keyword)) { //$NON-NLS-1$ return "* /"; //$NON-NLS-1$ } if ("/*".equals(keyword)) { //$NON-NLS-1$ return "/ *"; //$NON-NLS-1$ } if ("//".equals(keyword)) { //$NON-NLS-1$ return "/ /"; //$NON-N...
java
@SuppressWarnings("static-method") protected String protectCommentKeyword(String keyword) { if ("*/".equals(keyword)) { //$NON-NLS-1$ return "* /"; //$NON-NLS-1$ } if ("/*".equals(keyword)) { //$NON-NLS-1$ return "/ *"; //$NON-NLS-1$ } if ("//".equals(keyword)) { //$NON-NLS-1$ return "/ /"; //$NON-N...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "String", "protectCommentKeyword", "(", "String", "keyword", ")", "{", "if", "(", "\"*/\"", ".", "equals", "(", "keyword", ")", ")", "{", "//$NON-NLS-1$", "return", "\"* /\"", ";", "//$NON-NLS-...
Protect the keywword for Java comments. @param keyword the keyword to protect. @return the protected keyword.
[ "Protect", "the", "keywword", "for", "Java", "comments", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java#L395-L407
57,291
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java
SARLTypeComputer.isIgnorableCallToFeature
@SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"}) protected boolean isIgnorableCallToFeature(ILinkingCandidate candidate) { final JvmIdentifiableElement feature = candidate.getFeature(); // // @Deprecated // if (feature instanceof JvmOperation) { JvmAnnotationTarget targ...
java
@SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity"}) protected boolean isIgnorableCallToFeature(ILinkingCandidate candidate) { final JvmIdentifiableElement feature = candidate.getFeature(); // // @Deprecated // if (feature instanceof JvmOperation) { JvmAnnotationTarget targ...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:npathcomplexity\"", ",", "\"checkstyle:cyclomaticcomplexity\"", "}", ")", "protected", "boolean", "isIgnorableCallToFeature", "(", "ILinkingCandidate", "candidate", ")", "{", "final", "JvmIdentifiableElement", "feature", "=", ...
Replies if ambiguity could be removed for the given feature. @param candidate the candidate. @return {@code true} if ambiguity could be removed.
[ "Replies", "if", "ambiguity", "could", "be", "removed", "for", "the", "given", "feature", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java#L114-L136
57,292
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java
SARLTypeComputer._computeTypes
protected void _computeTypes(SarlBreakExpression object, ITypeComputationState state) { final LightweightTypeReference primitiveVoid = getPrimitiveVoid(state); state.acceptActualType(primitiveVoid); }
java
protected void _computeTypes(SarlBreakExpression object, ITypeComputationState state) { final LightweightTypeReference primitiveVoid = getPrimitiveVoid(state); state.acceptActualType(primitiveVoid); }
[ "protected", "void", "_computeTypes", "(", "SarlBreakExpression", "object", ",", "ITypeComputationState", "state", ")", "{", "final", "LightweightTypeReference", "primitiveVoid", "=", "getPrimitiveVoid", "(", "state", ")", ";", "state", ".", "acceptActualType", "(", "...
Compute the type of a break expression. @param object the expression. @param state the state of the type resolver.
[ "Compute", "the", "type", "of", "a", "break", "expression", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java#L170-L173
57,293
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java
SARLTypeComputer._computeTypes
protected void _computeTypes(SarlAssertExpression object, ITypeComputationState state) { state.withExpectation(getTypeForName(Boolean.class, state)).computeTypes(object.getCondition()); }
java
protected void _computeTypes(SarlAssertExpression object, ITypeComputationState state) { state.withExpectation(getTypeForName(Boolean.class, state)).computeTypes(object.getCondition()); }
[ "protected", "void", "_computeTypes", "(", "SarlAssertExpression", "object", ",", "ITypeComputationState", "state", ")", "{", "state", ".", "withExpectation", "(", "getTypeForName", "(", "Boolean", ".", "class", ",", "state", ")", ")", ".", "computeTypes", "(", ...
Compute the type of an assert expression. @param object the expression. @param state the state of the type resolver.
[ "Compute", "the", "type", "of", "an", "assert", "expression", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java#L191-L193
57,294
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java
SARLTypeComputer._computeTypes
@SuppressWarnings("checkstyle:nestedifdepth") protected void _computeTypes(SarlCastedExpression cast, ITypeComputationState state) { if (state instanceof AbstractTypeComputationState) { final JvmTypeReference type = cast.getType(); if (type != null) { state.withNonVoidExpectation().computeTypes(cast.getTar...
java
@SuppressWarnings("checkstyle:nestedifdepth") protected void _computeTypes(SarlCastedExpression cast, ITypeComputationState state) { if (state instanceof AbstractTypeComputationState) { final JvmTypeReference type = cast.getType(); if (type != null) { state.withNonVoidExpectation().computeTypes(cast.getTar...
[ "@", "SuppressWarnings", "(", "\"checkstyle:nestedifdepth\"", ")", "protected", "void", "_computeTypes", "(", "SarlCastedExpression", "cast", ",", "ITypeComputationState", "state", ")", "{", "if", "(", "state", "instanceof", "AbstractTypeComputationState", ")", "{", "fi...
Compute the type of a casted expression. @param cast the expression. @param state the state of the type resolver.
[ "Compute", "the", "type", "of", "a", "casted", "expression", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLTypeComputer.java#L200-L241
57,295
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java
AbstractMapView.fireEntryRemoved
@SuppressWarnings("unchecked") protected void fireEntryRemoved(K key, V value) { if (this.listeners != null) { for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.entryRemoved(key, value); } } }
java
@SuppressWarnings("unchecked") protected void fireEntryRemoved(K key, V value) { if (this.listeners != null) { for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.entryRemoved(key, value); } } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "fireEntryRemoved", "(", "K", "key", ",", "V", "value", ")", "{", "if", "(", "this", ".", "listeners", "!=", "null", ")", "{", "for", "(", "final", "DMapListener", "<", "?", "super"...
Fire the removal event. @param key the removed key. @param value the removed value.
[ "Fire", "the", "removal", "event", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java#L73-L80
57,296
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java
AbstractMapView.fireEntryUpdated
@SuppressWarnings("unchecked") protected void fireEntryUpdated(K key, V value) { for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.entryUpdated(key, value); } }
java
@SuppressWarnings("unchecked") protected void fireEntryUpdated(K key, V value) { for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.entryUpdated(key, value); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "fireEntryUpdated", "(", "K", "key", ",", "V", "value", ")", "{", "for", "(", "final", "DMapListener", "<", "?", "super", "K", ",", "?", "super", "V", ">", "listener", ":", "this", ...
Fire the update event. @param key the updated key. @param value the new value.
[ "Fire", "the", "update", "event", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java#L88-L93
57,297
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java
AbstractMapView.fireCleared
@SuppressWarnings("unchecked") protected void fireCleared(boolean localClearing) { for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.mapCleared(localClearing); } }
java
@SuppressWarnings("unchecked") protected void fireCleared(boolean localClearing) { for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.mapCleared(localClearing); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "fireCleared", "(", "boolean", "localClearing", ")", "{", "for", "(", "final", "DMapListener", "<", "?", "super", "K", ",", "?", "super", "V", ">", "listener", ":", "this", ".", "list...
Fire the clearing event. @param localClearing indicates if the clearing is done on the local node (if <code>true</code>), or on all the nodes (if <code>false</code>).
[ "Fire", "the", "clearing", "event", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java#L101-L106
57,298
sarl/sarl
main/externalmaven/io.sarl.maven.sre/src/main/java/io/sarl/maven/sre/AbstractSREMojo.java
AbstractSREMojo.createSREConfiguration
protected Xpp3Dom createSREConfiguration() throws MojoExecutionException, MojoFailureException { final Xpp3Dom xmlConfiguration = new Xpp3Dom("configuration"); //$NON-NLS-1$ final Xpp3Dom xmlArchive = new Xpp3Dom("archive"); //$NON-NLS-1$ xmlConfiguration.addChild(xmlArchive); final String mainClass = getMainC...
java
protected Xpp3Dom createSREConfiguration() throws MojoExecutionException, MojoFailureException { final Xpp3Dom xmlConfiguration = new Xpp3Dom("configuration"); //$NON-NLS-1$ final Xpp3Dom xmlArchive = new Xpp3Dom("archive"); //$NON-NLS-1$ xmlConfiguration.addChild(xmlArchive); final String mainClass = getMainC...
[ "protected", "Xpp3Dom", "createSREConfiguration", "(", ")", "throws", "MojoExecutionException", ",", "MojoFailureException", "{", "final", "Xpp3Dom", "xmlConfiguration", "=", "new", "Xpp3Dom", "(", "\"configuration\"", ")", ";", "//$NON-NLS-1$", "final", "Xpp3Dom", "xml...
Create the configuration of the SRE with the maven archive format. @return the created manifest. @throws MojoExecutionException if the mojo fails. @throws MojoFailureException if the generation fails.
[ "Create", "the", "configuration", "of", "the", "SRE", "with", "the", "maven", "archive", "format", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.sre/src/main/java/io/sarl/maven/sre/AbstractSREMojo.java#L375-L426
57,299
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/InternalEventBusSkill.java
InternalEventBusSkill.runInitializationStage
private void runInitializationStage(Event event) { // Immediate synchronous dispatching of Initialize event try { setOwnerState(OwnerState.INITIALIZING); try { this.eventDispatcher.immediateDispatch(event); } finally { setOwnerState(OwnerState.ALIVE); } this.agentAsEventListener.fireEnqueuedE...
java
private void runInitializationStage(Event event) { // Immediate synchronous dispatching of Initialize event try { setOwnerState(OwnerState.INITIALIZING); try { this.eventDispatcher.immediateDispatch(event); } finally { setOwnerState(OwnerState.ALIVE); } this.agentAsEventListener.fireEnqueuedE...
[ "private", "void", "runInitializationStage", "(", "Event", "event", ")", "{", "// Immediate synchronous dispatching of Initialize event", "try", "{", "setOwnerState", "(", "OwnerState", ".", "INITIALIZING", ")", ";", "try", "{", "this", ".", "eventDispatcher", ".", "i...
This function runs the initialization of the agent. @param event the {@link Initialize} occurrence.
[ "This", "function", "runs", "the", "initialization", "of", "the", "agent", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/bic/InternalEventBusSkill.java#L237-L266