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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
56,700 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.getProgramName | public static String getProgramName() {
String programName = JanusConfig.getSystemProperty(JanusConfig.JANUS_PROGRAM_NAME, null);
if (Strings.isNullOrEmpty(programName)) {
programName = JanusConfig.JANUS_PROGRAM_NAME_VALUE;
}
return programName;
} | java | public static String getProgramName() {
String programName = JanusConfig.getSystemProperty(JanusConfig.JANUS_PROGRAM_NAME, null);
if (Strings.isNullOrEmpty(programName)) {
programName = JanusConfig.JANUS_PROGRAM_NAME_VALUE;
}
return programName;
} | [
"public",
"static",
"String",
"getProgramName",
"(",
")",
"{",
"String",
"programName",
"=",
"JanusConfig",
".",
"getSystemProperty",
"(",
"JanusConfig",
".",
"JANUS_PROGRAM_NAME",
",",
"null",
")",
";",
"if",
"(",
"Strings",
".",
"isNullOrEmpty",
"(",
"programN... | Replies the name of the program.
@return the name of the program. | [
"Replies",
"the",
"name",
"of",
"the",
"program",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L667-L673 |
56,701 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.showDefaults | @SuppressWarnings("checkstyle:regexp")
public static void showDefaults() {
final Properties defaultValues = new Properties();
JanusConfig.getDefaultValues(defaultValues);
NetworkConfig.getDefaultValues(defaultValues);
try (OutputStream os = getConsoleLogger()) {
defaultValues.storeToXML(os, null);
os.flu... | java | @SuppressWarnings("checkstyle:regexp")
public static void showDefaults() {
final Properties defaultValues = new Properties();
JanusConfig.getDefaultValues(defaultValues);
NetworkConfig.getDefaultValues(defaultValues);
try (OutputStream os = getConsoleLogger()) {
defaultValues.storeToXML(os, null);
os.flu... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:regexp\"",
")",
"public",
"static",
"void",
"showDefaults",
"(",
")",
"{",
"final",
"Properties",
"defaultValues",
"=",
"new",
"Properties",
"(",
")",
";",
"JanusConfig",
".",
"getDefaultValues",
"(",
"defaultValues",
")... | Show the default values of the system properties. This function never returns. | [
"Show",
"the",
"default",
"values",
"of",
"the",
"system",
"properties",
".",
"This",
"function",
"never",
"returns",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L678-L690 |
56,702 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.showClasspath | @SuppressWarnings({ "resource" })
public static void showClasspath() {
final String cp = getCurrentClasspath();
if (!Strings.isNullOrEmpty(cp)) {
final PrintStream ps = getConsoleLogger();
for (final String entry : cp.split(Pattern.quote(File.pathSeparator))) {
ps.println(entry);
}
ps.flush();
}
... | java | @SuppressWarnings({ "resource" })
public static void showClasspath() {
final String cp = getCurrentClasspath();
if (!Strings.isNullOrEmpty(cp)) {
final PrintStream ps = getConsoleLogger();
for (final String entry : cp.split(Pattern.quote(File.pathSeparator))) {
ps.println(entry);
}
ps.flush();
}
... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"resource\"",
"}",
")",
"public",
"static",
"void",
"showClasspath",
"(",
")",
"{",
"final",
"String",
"cp",
"=",
"getCurrentClasspath",
"(",
")",
";",
"if",
"(",
"!",
"Strings",
".",
"isNullOrEmpty",
"(",
"cp",
")",
... | Show the classpath of the system properties. This function never returns. | [
"Show",
"the",
"classpath",
"of",
"the",
"system",
"properties",
".",
"This",
"function",
"never",
"returns",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L695-L706 |
56,703 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.showVersion | public static void showVersion(boolean exit) {
try (PrintWriter logger = new PrintWriter(getConsoleLogger())) {
logger.println(MessageFormat.format(Messages.Boot_26, JanusVersion.JANUS_RELEASE_VERSION));
logger.println(MessageFormat.format(Messages.Boot_27, SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING));
... | java | public static void showVersion(boolean exit) {
try (PrintWriter logger = new PrintWriter(getConsoleLogger())) {
logger.println(MessageFormat.format(Messages.Boot_26, JanusVersion.JANUS_RELEASE_VERSION));
logger.println(MessageFormat.format(Messages.Boot_27, SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING));
... | [
"public",
"static",
"void",
"showVersion",
"(",
"boolean",
"exit",
")",
"{",
"try",
"(",
"PrintWriter",
"logger",
"=",
"new",
"PrintWriter",
"(",
"getConsoleLogger",
"(",
")",
")",
")",
"{",
"logger",
".",
"println",
"(",
"MessageFormat",
".",
"format",
"(... | Show the version of Janus.
@param exit if {@code true}, this function never returns. | [
"Show",
"the",
"version",
"of",
"Janus",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L713-L722 |
56,704 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.showCommandLineArguments | @SuppressWarnings("checkstyle:regexp")
public static void showCommandLineArguments(String[] args) {
try (PrintStream os = getConsoleLogger()) {
for (int i = 0; i < args.length; ++i) {
os.println(i + ": " //$NON-NLS-1$
+ args[i]);
}
os.flush();
} catch (Throwable e) {
e.printStackTrace();
}
... | java | @SuppressWarnings("checkstyle:regexp")
public static void showCommandLineArguments(String[] args) {
try (PrintStream os = getConsoleLogger()) {
for (int i = 0; i < args.length; ++i) {
os.println(i + ": " //$NON-NLS-1$
+ args[i]);
}
os.flush();
} catch (Throwable e) {
e.printStackTrace();
}
... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:regexp\"",
")",
"public",
"static",
"void",
"showCommandLineArguments",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"try",
"(",
"PrintStream",
"os",
"=",
"getConsoleLogger",
"(",
")",
")",
"{",
"for",
"(",
"int",
"i... | Show the command line arguments. This function never returns.
@param args the command line arguments. | [
"Show",
"the",
"command",
"line",
"arguments",
".",
"This",
"function",
"never",
"returns",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L729-L741 |
56,705 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.setBootAgentTypeContextUUID | public static void setBootAgentTypeContextUUID() {
System.setProperty(JanusConfig.BOOT_DEFAULT_CONTEXT_ID_NAME, Boolean.TRUE.toString());
System.setProperty(JanusConfig.RANDOM_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
} | java | public static void setBootAgentTypeContextUUID() {
System.setProperty(JanusConfig.BOOT_DEFAULT_CONTEXT_ID_NAME, Boolean.TRUE.toString());
System.setProperty(JanusConfig.RANDOM_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
} | [
"public",
"static",
"void",
"setBootAgentTypeContextUUID",
"(",
")",
"{",
"System",
".",
"setProperty",
"(",
"JanusConfig",
".",
"BOOT_DEFAULT_CONTEXT_ID_NAME",
",",
"Boolean",
".",
"TRUE",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"setProperty",
"(",
... | Force the Janus platform to use a default context identifier that tis build upon the classname of the boot agent. It means
that the UUID is always the same for a given classname.
<p>This function is equivalent to the command line option <code>-B</code>.
@since 2.0.2.0
@see JanusConfig#BOOT_DEFAULT_CONTEXT_ID_NAME
@se... | [
"Force",
"the",
"Janus",
"platform",
"to",
"use",
"a",
"default",
"context",
"identifier",
"that",
"tis",
"build",
"upon",
"the",
"classname",
"of",
"the",
"boot",
"agent",
".",
"It",
"means",
"that",
"the",
"UUID",
"is",
"always",
"the",
"same",
"for",
... | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L792-L795 |
56,706 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java | Boot.setDefaultContextUUID | public static void setDefaultContextUUID() {
System.setProperty(JanusConfig.BOOT_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
System.setProperty(JanusConfig.RANDOM_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
} | java | public static void setDefaultContextUUID() {
System.setProperty(JanusConfig.BOOT_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
System.setProperty(JanusConfig.RANDOM_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
} | [
"public",
"static",
"void",
"setDefaultContextUUID",
"(",
")",
"{",
"System",
".",
"setProperty",
"(",
"JanusConfig",
".",
"BOOT_DEFAULT_CONTEXT_ID_NAME",
",",
"Boolean",
".",
"FALSE",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"setProperty",
"(",
"Ja... | Force the Janus platform to use the identifier hard-coded in the source code for its default context.
<p>This function is equivalent to the command line option <code>-W</code>.
<p>This function must be called before launching the Janus platform.
@since 2.0.2.0
@see JanusConfig#BOOT_DEFAULT_CONTEXT_ID_NAME
@see Janus... | [
"Force",
"the",
"Janus",
"platform",
"to",
"use",
"the",
"identifier",
"hard",
"-",
"coded",
"in",
"the",
"source",
"code",
"for",
"its",
"default",
"context",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/Boot.java#L808-L811 |
56,707 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.getSarlClassification | public static Integer getSarlClassification(ProgramElementDoc type) {
final AnnotationDesc annotation = Utils.findFirst(type.annotations(), it ->
qualifiedNameEquals(it.annotationType().qualifiedTypeName(), getKeywords().getSarlElementTypeAnnotationName()));
if (annotation != null) {
final ElementValuePair[]... | java | public static Integer getSarlClassification(ProgramElementDoc type) {
final AnnotationDesc annotation = Utils.findFirst(type.annotations(), it ->
qualifiedNameEquals(it.annotationType().qualifiedTypeName(), getKeywords().getSarlElementTypeAnnotationName()));
if (annotation != null) {
final ElementValuePair[]... | [
"public",
"static",
"Integer",
"getSarlClassification",
"(",
"ProgramElementDoc",
"type",
")",
"{",
"final",
"AnnotationDesc",
"annotation",
"=",
"Utils",
".",
"findFirst",
"(",
"type",
".",
"annotations",
"(",
")",
",",
"it",
"->",
"qualifiedNameEquals",
"(",
"... | Replies the SARL element type of the given type.
@param type the type.
@return the SARL element type, or {@code null} if unknown. | [
"Replies",
"the",
"SARL",
"element",
"type",
"of",
"the",
"given",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L269-L279 |
56,708 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.fixHiddenMember | public static String fixHiddenMember(String name) {
return name.replaceAll(Pattern.quote(HIDDEN_MEMBER_CHARACTER),
Matcher.quoteReplacement(HIDDEN_MEMBER_REPLACEMENT_CHARACTER));
} | java | public static String fixHiddenMember(String name) {
return name.replaceAll(Pattern.quote(HIDDEN_MEMBER_CHARACTER),
Matcher.quoteReplacement(HIDDEN_MEMBER_REPLACEMENT_CHARACTER));
} | [
"public",
"static",
"String",
"fixHiddenMember",
"(",
"String",
"name",
")",
"{",
"return",
"name",
".",
"replaceAll",
"(",
"Pattern",
".",
"quote",
"(",
"HIDDEN_MEMBER_CHARACTER",
")",
",",
"Matcher",
".",
"quoteReplacement",
"(",
"HIDDEN_MEMBER_REPLACEMENT_CHARACT... | Replies a fixed version of the given name assuming
that it is an hidden action, and reformating
the reserved text.
<p>An hidden action is an action that is generated by the SARL
compiler, and that cannot be defined by the SARL user.
@param name the name to fix.
@return the fixed name. | [
"Replies",
"a",
"fixed",
"version",
"of",
"the",
"given",
"name",
"assuming",
"that",
"it",
"is",
"an",
"hidden",
"action",
"and",
"reformating",
"the",
"reserved",
"text",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L303-L306 |
56,709 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.qualifiedNameEquals | public static boolean qualifiedNameEquals(String s1, String s2) {
if (isNullOrEmpty(s1)) {
return isNullOrEmpty(s2);
}
if (!s1.equals(s2)) {
final String simple1 = simpleName(s1);
final String simple2 = simpleName(s2);
return simpleNameEquals(simple1, simple2);
}
return true;
} | java | public static boolean qualifiedNameEquals(String s1, String s2) {
if (isNullOrEmpty(s1)) {
return isNullOrEmpty(s2);
}
if (!s1.equals(s2)) {
final String simple1 = simpleName(s1);
final String simple2 = simpleName(s2);
return simpleNameEquals(simple1, simple2);
}
return true;
} | [
"public",
"static",
"boolean",
"qualifiedNameEquals",
"(",
"String",
"s1",
",",
"String",
"s2",
")",
"{",
"if",
"(",
"isNullOrEmpty",
"(",
"s1",
")",
")",
"{",
"return",
"isNullOrEmpty",
"(",
"s2",
")",
";",
"}",
"if",
"(",
"!",
"s1",
".",
"equals",
... | Replies if the given qualified names are equal.
<p>Because the Javadoc tool cannot create the fully qualified name, this function
also test simple names.
@param s1 the first string.
@param s2 the first string.
@return {@code true} if the strings are equal. | [
"Replies",
"if",
"the",
"given",
"qualified",
"names",
"are",
"equal",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L344-L354 |
56,710 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.simpleName | public static String simpleName(String name) {
if (name == null) {
return null;
}
final int index = name.lastIndexOf('.');
if (index > 0) {
return name.substring(index + 1);
}
return name;
} | java | public static String simpleName(String name) {
if (name == null) {
return null;
}
final int index = name.lastIndexOf('.');
if (index > 0) {
return name.substring(index + 1);
}
return name;
} | [
"public",
"static",
"String",
"simpleName",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"int",
"index",
"=",
"name",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"index... | Replies the simple name for the given name.
@param name the name.
@return the simple name. | [
"Replies",
"the",
"simple",
"name",
"for",
"the",
"given",
"name",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L374-L383 |
56,711 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.getCause | public static Throwable getCause(Throwable thr) {
Throwable cause = thr.getCause();
while (cause != null && cause != thr && cause != cause.getCause() && cause.getCause() != null) {
cause = cause.getCause();
}
return cause == null ? thr : cause;
} | java | public static Throwable getCause(Throwable thr) {
Throwable cause = thr.getCause();
while (cause != null && cause != thr && cause != cause.getCause() && cause.getCause() != null) {
cause = cause.getCause();
}
return cause == null ? thr : cause;
} | [
"public",
"static",
"Throwable",
"getCause",
"(",
"Throwable",
"thr",
")",
"{",
"Throwable",
"cause",
"=",
"thr",
".",
"getCause",
"(",
")",
";",
"while",
"(",
"cause",
"!=",
"null",
"&&",
"cause",
"!=",
"thr",
"&&",
"cause",
"!=",
"cause",
".",
"getCa... | Replies the cause of the given exception.
@param thr the exception.
@return the cause. | [
"Replies",
"the",
"cause",
"of",
"the",
"given",
"exception",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L390-L396 |
56,712 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.performCopy | public static void performCopy(String filename, SarlConfiguration configuration) {
if (filename.isEmpty()) {
return;
}
try {
final DocFile fromfile = DocFile.createFileForInput(configuration, filename);
final DocPath path = DocPath.create(fromfile.getName());
final DocFile toFile = DocFile.createFile... | java | public static void performCopy(String filename, SarlConfiguration configuration) {
if (filename.isEmpty()) {
return;
}
try {
final DocFile fromfile = DocFile.createFileForInput(configuration, filename);
final DocPath path = DocPath.create(fromfile.getName());
final DocFile toFile = DocFile.createFile... | [
"public",
"static",
"void",
"performCopy",
"(",
"String",
"filename",
",",
"SarlConfiguration",
"configuration",
")",
"{",
"if",
"(",
"filename",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"final",
"DocFile",
"fromfile",
"=",
"DocF... | Copy the given file.
@param filename the file to copy.
@param configuration the configuration. | [
"Copy",
"the",
"given",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L403-L425 |
56,713 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.emptyList | public static <T> com.sun.tools.javac.util.List<T> emptyList() {
return com.sun.tools.javac.util.List.from(Collections.emptyList());
} | java | public static <T> com.sun.tools.javac.util.List<T> emptyList() {
return com.sun.tools.javac.util.List.from(Collections.emptyList());
} | [
"public",
"static",
"<",
"T",
">",
"com",
".",
"sun",
".",
"tools",
".",
"javac",
".",
"util",
".",
"List",
"<",
"T",
">",
"emptyList",
"(",
")",
"{",
"return",
"com",
".",
"sun",
".",
"tools",
".",
"javac",
".",
"util",
".",
"List",
".",
"from... | Create an empty Java list.
@param <T> the type of the elements into the list.
@return the list. | [
"Create",
"an",
"empty",
"Java",
"list",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L432-L434 |
56,714 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java | Utils.toArray | @SuppressWarnings("unchecked")
public static <T> T[] toArray(T[] source, Collection<? extends T> newContent) {
final Object array = Array.newInstance(source.getClass().getComponentType(), newContent.size());
int i = 0;
for (final T element : newContent) {
Array.set(array, i, element);
++i;
}
return (T[... | java | @SuppressWarnings("unchecked")
public static <T> T[] toArray(T[] source, Collection<? extends T> newContent) {
final Object array = Array.newInstance(source.getClass().getComponentType(), newContent.size());
int i = 0;
for (final T element : newContent) {
Array.set(array, i, element);
++i;
}
return (T[... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"toArray",
"(",
"T",
"[",
"]",
"source",
",",
"Collection",
"<",
"?",
"extends",
"T",
">",
"newContent",
")",
"{",
"final",
"Object",
"array",
"=",
... | Convert to an array.
@param <T> the type of the elements.
@param source the original array.
@param newContent the new content.
@return the new array. | [
"Convert",
"to",
"an",
"array",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L443-L452 |
56,715 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/preferences/AbstractPreferenceAccess.java | AbstractPreferenceAccess.getPreferenceStoreAccess | protected IPreferenceStoreAccess getPreferenceStoreAccess() {
if (this.preferenceStoreAccess == null) {
final Injector injector = LangActivator.getInstance().getInjector(LangActivator.IO_SARL_LANG_SARL);
this.preferenceStoreAccess = injector.getInstance(IPreferenceStoreAccess.class);
}
return this.preferenc... | java | protected IPreferenceStoreAccess getPreferenceStoreAccess() {
if (this.preferenceStoreAccess == null) {
final Injector injector = LangActivator.getInstance().getInjector(LangActivator.IO_SARL_LANG_SARL);
this.preferenceStoreAccess = injector.getInstance(IPreferenceStoreAccess.class);
}
return this.preferenc... | [
"protected",
"IPreferenceStoreAccess",
"getPreferenceStoreAccess",
"(",
")",
"{",
"if",
"(",
"this",
".",
"preferenceStoreAccess",
"==",
"null",
")",
"{",
"final",
"Injector",
"injector",
"=",
"LangActivator",
".",
"getInstance",
"(",
")",
".",
"getInjector",
"(",... | Replies the preference accessor.
@return the accessor. | [
"Replies",
"the",
"preference",
"accessor",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/preferences/AbstractPreferenceAccess.java#L59-L65 |
56,716 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/preferences/AbstractPreferenceAccess.java | AbstractPreferenceAccess.getWritablePreferenceStore | public IPreferenceStore getWritablePreferenceStore(Object context) {
if (this.preferenceStore == null) {
this.preferenceStore = getPreferenceStoreAccess().getWritablePreferenceStore(context);
}
return this.preferenceStore;
} | java | public IPreferenceStore getWritablePreferenceStore(Object context) {
if (this.preferenceStore == null) {
this.preferenceStore = getPreferenceStoreAccess().getWritablePreferenceStore(context);
}
return this.preferenceStore;
} | [
"public",
"IPreferenceStore",
"getWritablePreferenceStore",
"(",
"Object",
"context",
")",
"{",
"if",
"(",
"this",
".",
"preferenceStore",
"==",
"null",
")",
"{",
"this",
".",
"preferenceStore",
"=",
"getPreferenceStoreAccess",
"(",
")",
".",
"getWritablePreferenceS... | Replies the writable preference store to be used for the SARL editor.
@param context the context (project, etc.) or {@code null} if none (global preferences).
@return the modifiable preference store. | [
"Replies",
"the",
"writable",
"preference",
"store",
"to",
"be",
"used",
"for",
"the",
"SARL",
"editor",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/preferences/AbstractPreferenceAccess.java#L72-L77 |
56,717 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java | JanusConfig.getSystemProperty | public static String getSystemProperty(String name, String defaultValue) {
String value;
value = System.getProperty(name, null);
if (value != null) {
return value;
}
value = System.getenv(name);
if (value != null) {
return value;
}
... | java | public static String getSystemProperty(String name, String defaultValue) {
String value;
value = System.getProperty(name, null);
if (value != null) {
return value;
}
value = System.getenv(name);
if (value != null) {
return value;
}
... | [
"public",
"static",
"String",
"getSystemProperty",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"String",
"value",
";",
"value",
"=",
"System",
".",
"getProperty",
"(",
"name",
",",
"null",
")",
";",
"if",
"(",
"value",
"!=",
"null",
"... | Replies the value of the system property.
@param name
- name of the property.
@param defaultValue
- value to reply if the these is no property found
@return the value, or defaultValue. | [
"Replies",
"the",
"value",
"of",
"the",
"system",
"property",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java#L320-L331 |
56,718 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java | JanusConfig.getSystemPropertyAsBoolean | public static boolean getSystemPropertyAsBoolean(String name, boolean defaultValue) {
final String value = getSystemProperty(name, null);
if (value != null) {
try {
return Boolean.parseBoolean(value);
} catch (Throwable exception) {
//
... | java | public static boolean getSystemPropertyAsBoolean(String name, boolean defaultValue) {
final String value = getSystemProperty(name, null);
if (value != null) {
try {
return Boolean.parseBoolean(value);
} catch (Throwable exception) {
//
... | [
"public",
"static",
"boolean",
"getSystemPropertyAsBoolean",
"(",
"String",
"name",
",",
"boolean",
"defaultValue",
")",
"{",
"final",
"String",
"value",
"=",
"getSystemProperty",
"(",
"name",
",",
"null",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{"... | Replies the value of the boolean system property.
@param name
- name of the property.
@param defaultValue
- value to reply if the these is no property found
@return the value, or defaultValue. | [
"Replies",
"the",
"value",
"of",
"the",
"boolean",
"system",
"property",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java#L353-L363 |
56,719 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java | JanusConfig.getSystemPropertyAsFloat | public static float getSystemPropertyAsFloat(String name, float defaultValue) {
final String value = getSystemProperty(name, null);
if (value != null) {
try {
return Float.parseFloat(value);
} catch (Throwable exception) {
//
}
... | java | public static float getSystemPropertyAsFloat(String name, float defaultValue) {
final String value = getSystemProperty(name, null);
if (value != null) {
try {
return Float.parseFloat(value);
} catch (Throwable exception) {
//
}
... | [
"public",
"static",
"float",
"getSystemPropertyAsFloat",
"(",
"String",
"name",
",",
"float",
"defaultValue",
")",
"{",
"final",
"String",
"value",
"=",
"getSystemProperty",
"(",
"name",
",",
"null",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"t... | Replies the value of the single precision floating point value system property.
@param name
- name of the property.
@param defaultValue
- value to reply if the these is no property found
@return the value, or defaultValue. | [
"Replies",
"the",
"value",
"of",
"the",
"single",
"precision",
"floating",
"point",
"value",
"system",
"property",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java#L417-L427 |
56,720 | sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java | JanusConfig.getSystemPropertyAsEnum | public static <S extends Enum<S>> S getSystemPropertyAsEnum(Class<S> type, String name) {
return getSystemPropertyAsEnum(type, name, null);
} | java | public static <S extends Enum<S>> S getSystemPropertyAsEnum(Class<S> type, String name) {
return getSystemPropertyAsEnum(type, name, null);
} | [
"public",
"static",
"<",
"S",
"extends",
"Enum",
"<",
"S",
">",
">",
"S",
"getSystemPropertyAsEnum",
"(",
"Class",
"<",
"S",
">",
"type",
",",
"String",
"name",
")",
"{",
"return",
"getSystemPropertyAsEnum",
"(",
"type",
",",
"name",
",",
"null",
")",
... | Replies the value of the enumeration system property.
@param <S>
- type of the enumeration to read.
@param type
- type of the enumeration.
@param name
- name of the property.
@return the value, or <code>null</code> if no property found. | [
"Replies",
"the",
"value",
"of",
"the",
"enumeration",
"system",
"property",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java#L440-L442 |
56,721 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.isSarlFile | protected boolean isSarlFile(IPackageFragment packageFragment, String filename) {
if (isFileExists(packageFragment, filename, this.sarlFileExtension)) {
return true;
}
final IJavaProject project = getPackageFragmentRoot().getJavaProject();
if (project != null) {
try {
final String packageName = packag... | java | protected boolean isSarlFile(IPackageFragment packageFragment, String filename) {
if (isFileExists(packageFragment, filename, this.sarlFileExtension)) {
return true;
}
final IJavaProject project = getPackageFragmentRoot().getJavaProject();
if (project != null) {
try {
final String packageName = packag... | [
"protected",
"boolean",
"isSarlFile",
"(",
"IPackageFragment",
"packageFragment",
",",
"String",
"filename",
")",
"{",
"if",
"(",
"isFileExists",
"(",
"packageFragment",
",",
"filename",
",",
"this",
".",
"sarlFileExtension",
")",
")",
"{",
"return",
"true",
";"... | Replies if the given filename is a SARL script or a generated Java file.
@param packageFragment the package in which the file should be search for.
@param filename the filename to test.
@return <code>true</code> if a file (SALR or Java) with the given name exists. | [
"Replies",
"if",
"the",
"given",
"filename",
"is",
"a",
"SARL",
"script",
"or",
"a",
"generated",
"Java",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L347-L366 |
56,722 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.isFileExists | protected static boolean isFileExists(IPackageFragment packageFragment, String filename, String extension) {
if (packageFragment != null) {
final IResource resource = packageFragment.getResource();
if (resource instanceof IFolder) {
final IFolder folder = (IFolder) resource;
if (folder.getFile(filename ... | java | protected static boolean isFileExists(IPackageFragment packageFragment, String filename, String extension) {
if (packageFragment != null) {
final IResource resource = packageFragment.getResource();
if (resource instanceof IFolder) {
final IFolder folder = (IFolder) resource;
if (folder.getFile(filename ... | [
"protected",
"static",
"boolean",
"isFileExists",
"(",
"IPackageFragment",
"packageFragment",
",",
"String",
"filename",
",",
"String",
"extension",
")",
"{",
"if",
"(",
"packageFragment",
"!=",
"null",
")",
"{",
"final",
"IResource",
"resource",
"=",
"packageFrag... | Replies if the given filename is a SARL script in the given package.
@param packageFragment the package in which the file should be search for.
@param filename the filename to test.
@param extension the filename extension to search for.
@return <code>true</code> if a file (SARL or Java) with the given name exists. | [
"Replies",
"if",
"the",
"given",
"filename",
"is",
"a",
"SARL",
"script",
"in",
"the",
"given",
"package",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L375-L386 |
56,723 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.init | protected void init(IStructuredSelection selection) {
final IJavaElement elem = this.fieldInitializer.getSelectedResource(selection);
initContainerPage(elem);
initTypePage(elem);
//
try {
getRootSuperType();
reinitSuperClass();
} catch (Throwable exception) {
//
}
//
try {
getRootSuperInte... | java | protected void init(IStructuredSelection selection) {
final IJavaElement elem = this.fieldInitializer.getSelectedResource(selection);
initContainerPage(elem);
initTypePage(elem);
//
try {
getRootSuperType();
reinitSuperClass();
} catch (Throwable exception) {
//
}
//
try {
getRootSuperInte... | [
"protected",
"void",
"init",
"(",
"IStructuredSelection",
"selection",
")",
"{",
"final",
"IJavaElement",
"elem",
"=",
"this",
".",
"fieldInitializer",
".",
"getSelectedResource",
"(",
"selection",
")",
";",
"initContainerPage",
"(",
"elem",
")",
";",
"initTypePag... | Invoked by the wizard for initializing the page with the given selection.
@param selection the current selection. | [
"Invoked",
"by",
"the",
"wizard",
"for",
"initializing",
"the",
"page",
"with",
"the",
"given",
"selection",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L445-L465 |
56,724 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.createCommonControls | protected Composite createCommonControls(Composite parent) {
initializeDialogUnits(parent);
final Composite composite = SWTFactory.createComposite(
parent,
parent.getFont(),
COLUMNS, 1,
GridData.FILL_HORIZONTAL);
createContainerControls(composite, COLUMNS);
createPackageControls(composite, COLUM... | java | protected Composite createCommonControls(Composite parent) {
initializeDialogUnits(parent);
final Composite composite = SWTFactory.createComposite(
parent,
parent.getFont(),
COLUMNS, 1,
GridData.FILL_HORIZONTAL);
createContainerControls(composite, COLUMNS);
createPackageControls(composite, COLUM... | [
"protected",
"Composite",
"createCommonControls",
"(",
"Composite",
"parent",
")",
"{",
"initializeDialogUnits",
"(",
"parent",
")",
";",
"final",
"Composite",
"composite",
"=",
"SWTFactory",
".",
"createComposite",
"(",
"parent",
",",
"parent",
".",
"getFont",
"(... | Create the components that are common to the creation of all
the SARL elements.
<p>You should invoke this from the {@link #createControl(Composite)} of
the child class.
@param parent the component in which the common controls are added.
@return the created composite. | [
"Create",
"the",
"components",
"that",
"are",
"common",
"to",
"the",
"creation",
"of",
"all",
"the",
"SARL",
"elements",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L675-L687 |
56,725 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.asyncCreateType | protected final int asyncCreateType() {
final int[] size = {0};
final IRunnableWithProgress op = new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor monitor)
throws CoreException, InvocationTargetException, InterruptedException {
size[0] = createSARLType(monitor);
}
... | java | protected final int asyncCreateType() {
final int[] size = {0};
final IRunnableWithProgress op = new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor monitor)
throws CoreException, InvocationTargetException, InterruptedException {
size[0] = createSARLType(monitor);
}
... | [
"protected",
"final",
"int",
"asyncCreateType",
"(",
")",
"{",
"final",
"int",
"[",
"]",
"size",
"=",
"{",
"0",
"}",
";",
"final",
"IRunnableWithProgress",
"op",
"=",
"new",
"WorkspaceModifyOperation",
"(",
")",
"{",
"@",
"Override",
"protected",
"void",
"... | Create the type from the data gathered in the wizard.
@return the size of the created file. | [
"Create",
"the",
"type",
"from",
"the",
"data",
"gathered",
"in",
"the",
"wizard",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L708-L728 |
56,726 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.readSettings | protected void readSettings() {
boolean createConstructors = false;
boolean createUnimplemented = true;
boolean createEventHandlers = true;
boolean createLifecycleFunctions = true;
final IDialogSettings dialogSettings = getDialogSettings();
if (dialogSettings != null) {
final IDialogSettings section = di... | java | protected void readSettings() {
boolean createConstructors = false;
boolean createUnimplemented = true;
boolean createEventHandlers = true;
boolean createLifecycleFunctions = true;
final IDialogSettings dialogSettings = getDialogSettings();
if (dialogSettings != null) {
final IDialogSettings section = di... | [
"protected",
"void",
"readSettings",
"(",
")",
"{",
"boolean",
"createConstructors",
"=",
"false",
";",
"boolean",
"createUnimplemented",
"=",
"true",
";",
"boolean",
"createEventHandlers",
"=",
"true",
";",
"boolean",
"createLifecycleFunctions",
"=",
"true",
";",
... | Read the settings of the dialog box. | [
"Read",
"the",
"settings",
"of",
"the",
"dialog",
"box",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L939-L956 |
56,727 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.saveSettings | protected void saveSettings() {
final IDialogSettings dialogSettings = getDialogSettings();
if (dialogSettings != null) {
IDialogSettings section = dialogSettings.getSection(getName());
if (section == null) {
section = dialogSettings.addNewSection(getName());
}
section.put(SETTINGS_CREATECONSTR, isC... | java | protected void saveSettings() {
final IDialogSettings dialogSettings = getDialogSettings();
if (dialogSettings != null) {
IDialogSettings section = dialogSettings.getSection(getName());
if (section == null) {
section = dialogSettings.addNewSection(getName());
}
section.put(SETTINGS_CREATECONSTR, isC... | [
"protected",
"void",
"saveSettings",
"(",
")",
"{",
"final",
"IDialogSettings",
"dialogSettings",
"=",
"getDialogSettings",
"(",
")",
";",
"if",
"(",
"dialogSettings",
"!=",
"null",
")",
"{",
"IDialogSettings",
"section",
"=",
"dialogSettings",
".",
"getSection",
... | Save the settings of the dialog box. | [
"Save",
"the",
"settings",
"of",
"the",
"dialog",
"box",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L960-L972 |
56,728 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.createMethodStubControls | protected void createMethodStubControls(Composite composite, int columns,
boolean enableConstructors, boolean enableInherited, boolean defaultEvents,
boolean lifecycleFunctions) {
this.isConstructorCreationEnabled = enableConstructors;
this.isInheritedCreationEnabled = enableInherited;
this.isDefaultEventGe... | java | protected void createMethodStubControls(Composite composite, int columns,
boolean enableConstructors, boolean enableInherited, boolean defaultEvents,
boolean lifecycleFunctions) {
this.isConstructorCreationEnabled = enableConstructors;
this.isInheritedCreationEnabled = enableInherited;
this.isDefaultEventGe... | [
"protected",
"void",
"createMethodStubControls",
"(",
"Composite",
"composite",
",",
"int",
"columns",
",",
"boolean",
"enableConstructors",
",",
"boolean",
"enableInherited",
",",
"boolean",
"defaultEvents",
",",
"boolean",
"lifecycleFunctions",
")",
"{",
"this",
"."... | Create the controls related to the behavior units to generate.
@param composite the container of the controls.
@param columns the number of columns.
@param enableConstructors indicates if the constructor creation is enable.
@param enableInherited indicates if the inherited operation creation is enable.
@param defaultE... | [
"Create",
"the",
"controls",
"related",
"to",
"the",
"behavior",
"units",
"to",
"generate",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L994-L1030 |
56,729 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.isCreateStandardEventHandlers | protected boolean isCreateStandardEventHandlers() {
int idx = 0;
if (this.isConstructorCreationEnabled) {
++idx;
}
if (this.isInheritedCreationEnabled) {
++idx;
}
return this.isDefaultEventGenerated && this.methodStubsButtons.isSelected(idx);
} | java | protected boolean isCreateStandardEventHandlers() {
int idx = 0;
if (this.isConstructorCreationEnabled) {
++idx;
}
if (this.isInheritedCreationEnabled) {
++idx;
}
return this.isDefaultEventGenerated && this.methodStubsButtons.isSelected(idx);
} | [
"protected",
"boolean",
"isCreateStandardEventHandlers",
"(",
")",
"{",
"int",
"idx",
"=",
"0",
";",
"if",
"(",
"this",
".",
"isConstructorCreationEnabled",
")",
"{",
"++",
"idx",
";",
"}",
"if",
"(",
"this",
".",
"isInheritedCreationEnabled",
")",
"{",
"++"... | Returns the current selection state of the 'Create standard event handlers'
checkbox.
@return the selection state of the 'Create standard event handlers' checkbox | [
"Returns",
"the",
"current",
"selection",
"state",
"of",
"the",
"Create",
"standard",
"event",
"handlers",
"checkbox",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L1061-L1070 |
56,730 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.isCreateStandardLifecycleFunctions | protected boolean isCreateStandardLifecycleFunctions() {
int idx = 0;
if (this.isConstructorCreationEnabled) {
++idx;
}
if (this.isInheritedCreationEnabled) {
++idx;
}
if (this.isDefaultEventGenerated) {
++idx;
}
return this.isDefaultLifecycleFunctionsGenerated && this.methodStubsButtons.isSele... | java | protected boolean isCreateStandardLifecycleFunctions() {
int idx = 0;
if (this.isConstructorCreationEnabled) {
++idx;
}
if (this.isInheritedCreationEnabled) {
++idx;
}
if (this.isDefaultEventGenerated) {
++idx;
}
return this.isDefaultLifecycleFunctionsGenerated && this.methodStubsButtons.isSele... | [
"protected",
"boolean",
"isCreateStandardLifecycleFunctions",
"(",
")",
"{",
"int",
"idx",
"=",
"0",
";",
"if",
"(",
"this",
".",
"isConstructorCreationEnabled",
")",
"{",
"++",
"idx",
";",
"}",
"if",
"(",
"this",
".",
"isInheritedCreationEnabled",
")",
"{",
... | Returns the current selection state of the 'Create standard lifecycle functions'
checkbox.
@return the selection state of the 'Create standard lifecycle functions' checkbox | [
"Returns",
"the",
"current",
"selection",
"state",
"of",
"the",
"Create",
"standard",
"lifecycle",
"functions",
"checkbox",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L1078-L1090 |
56,731 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.setMethodStubSelection | protected void setMethodStubSelection(boolean createConstructors, boolean createInherited,
boolean createEventHandlers, boolean createLifecycleFunctions, boolean canBeModified) {
if (this.methodStubsButtons != null) {
int idx = 0;
if (this.isConstructorCreationEnabled) {
this.methodStubsButtons.setSelect... | java | protected void setMethodStubSelection(boolean createConstructors, boolean createInherited,
boolean createEventHandlers, boolean createLifecycleFunctions, boolean canBeModified) {
if (this.methodStubsButtons != null) {
int idx = 0;
if (this.isConstructorCreationEnabled) {
this.methodStubsButtons.setSelect... | [
"protected",
"void",
"setMethodStubSelection",
"(",
"boolean",
"createConstructors",
",",
"boolean",
"createInherited",
",",
"boolean",
"createEventHandlers",
",",
"boolean",
"createLifecycleFunctions",
",",
"boolean",
"canBeModified",
")",
"{",
"if",
"(",
"this",
".",
... | Sets the selection state of the method stub checkboxes.
@param createConstructors initial selection state of the 'Create Constructors' checkbox.
@param createInherited initial selection state of the 'Create inherited abstract methods' checkbox.
@param createEventHandlers initial selection state of the 'Create standard... | [
"Sets",
"the",
"selection",
"state",
"of",
"the",
"method",
"stub",
"checkboxes",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L1102-L1124 |
56,732 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.createSuperClassSelectionDialog | @SuppressWarnings("static-method")
protected AbstractSuperTypeSelectionDialog<?> createSuperClassSelectionDialog(
Shell parent, IRunnableContext context, IJavaProject project, SarlSpecificTypeSelectionExtension extension,
boolean multi) {
return null;
} | java | @SuppressWarnings("static-method")
protected AbstractSuperTypeSelectionDialog<?> createSuperClassSelectionDialog(
Shell parent, IRunnableContext context, IJavaProject project, SarlSpecificTypeSelectionExtension extension,
boolean multi) {
return null;
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"AbstractSuperTypeSelectionDialog",
"<",
"?",
">",
"createSuperClassSelectionDialog",
"(",
"Shell",
"parent",
",",
"IRunnableContext",
"context",
",",
"IJavaProject",
"project",
",",
"SarlSpecificTypeSelec... | Create an instanceof the super-class selection dialog.
@param parent the parent.
@param context the execution context.
@param project the Java project.
@param extension the extension to give to the dialog box.
@param multi indicates if the selection could be done on multiple elements.
@return the dialog, or <code>null... | [
"Create",
"an",
"instanceof",
"the",
"super",
"-",
"class",
"selection",
"dialog",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L1135-L1140 |
56,733 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.createStandardSARLEventTemplates | protected boolean createStandardSARLEventTemplates(String elementTypeName,
Function1<? super String, ? extends ISarlBehaviorUnitBuilder> behaviorUnitAdder,
Procedure1<? super String> usesAdder) {
if (!isCreateStandardEventHandlers()) {
return false;
}
Object type;
try {
type = getTypeFinder().findTy... | java | protected boolean createStandardSARLEventTemplates(String elementTypeName,
Function1<? super String, ? extends ISarlBehaviorUnitBuilder> behaviorUnitAdder,
Procedure1<? super String> usesAdder) {
if (!isCreateStandardEventHandlers()) {
return false;
}
Object type;
try {
type = getTypeFinder().findTy... | [
"protected",
"boolean",
"createStandardSARLEventTemplates",
"(",
"String",
"elementTypeName",
",",
"Function1",
"<",
"?",
"super",
"String",
",",
"?",
"extends",
"ISarlBehaviorUnitBuilder",
">",
"behaviorUnitAdder",
",",
"Procedure1",
"<",
"?",
"super",
"String",
">",... | Create the default standard SARL event templates.
@param elementTypeName the name of the element type.
@param behaviorUnitAdder the adder of behavior unit.
@param usesAdder the adder of uses statement.
@return {@code true} if the units are added; {@code false} otherwise.
@since 0.5 | [
"Create",
"the",
"default",
"standard",
"SARL",
"event",
"templates",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L1214-L1286 |
56,734 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java | AbstractNewSarlElementWizardPage.createStandardSARLLifecycleFunctionTemplates | protected boolean createStandardSARLLifecycleFunctionTemplates(String elementTypeName,
Function1<? super String, ? extends ISarlActionBuilder> actionAdder,
Procedure1<? super String> usesAdder) {
if (!isCreateStandardLifecycleFunctions()) {
return false;
}
usesAdder.apply(LOGGING_CAPACITY_NAME);
ISar... | java | protected boolean createStandardSARLLifecycleFunctionTemplates(String elementTypeName,
Function1<? super String, ? extends ISarlActionBuilder> actionAdder,
Procedure1<? super String> usesAdder) {
if (!isCreateStandardLifecycleFunctions()) {
return false;
}
usesAdder.apply(LOGGING_CAPACITY_NAME);
ISar... | [
"protected",
"boolean",
"createStandardSARLLifecycleFunctionTemplates",
"(",
"String",
"elementTypeName",
",",
"Function1",
"<",
"?",
"super",
"String",
",",
"?",
"extends",
"ISarlActionBuilder",
">",
"actionAdder",
",",
"Procedure1",
"<",
"?",
"super",
"String",
">",... | Create the default standard lifecycle function templates.
@param elementTypeName the name of the element type.
@param actionAdder the adder of actions.
@param usesAdder the adder of uses statement.
@return {@code true} if the units are added; {@code false} otherwise.
@since 0.5 | [
"Create",
"the",
"default",
"standard",
"lifecycle",
"function",
"templates",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L1296-L1322 |
56,735 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/compiler/ProjectAdapter.java | ProjectAdapter.getProject | public static IProject getProject(Resource resource) {
ProjectAdapter adapter = (ProjectAdapter) EcoreUtil.getAdapter(resource.getResourceSet().eAdapters(), ProjectAdapter.class);
if (adapter == null) {
final String platformString = resource.getURI().toPlatformString(true);
final IProject project = ResourcesP... | java | public static IProject getProject(Resource resource) {
ProjectAdapter adapter = (ProjectAdapter) EcoreUtil.getAdapter(resource.getResourceSet().eAdapters(), ProjectAdapter.class);
if (adapter == null) {
final String platformString = resource.getURI().toPlatformString(true);
final IProject project = ResourcesP... | [
"public",
"static",
"IProject",
"getProject",
"(",
"Resource",
"resource",
")",
"{",
"ProjectAdapter",
"adapter",
"=",
"(",
"ProjectAdapter",
")",
"EcoreUtil",
".",
"getAdapter",
"(",
"resource",
".",
"getResourceSet",
"(",
")",
".",
"eAdapters",
"(",
")",
","... | Get the project associated to the resource.
@param resource the resource
@return the project. | [
"Get",
"the",
"project",
"associated",
"to",
"the",
"resource",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/compiler/ProjectAdapter.java#L69-L78 |
56,736 | sarl/sarl | main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/ImportMavenSarlProjectWizard.java | ImportMavenSarlProjectWizard.getMavenImportWizardPage | protected MavenImportWizardPage getMavenImportWizardPage() {
if (this.mainPageBuffer == null) {
try {
final Field field = MavenImportWizard.class.getDeclaredField("page"); //$NON-NLS-1$
field.setAccessible(true);
this.mainPageBuffer = (MavenImportWizardPage) field.get(this);
} catch (Exception excep... | java | protected MavenImportWizardPage getMavenImportWizardPage() {
if (this.mainPageBuffer == null) {
try {
final Field field = MavenImportWizard.class.getDeclaredField("page"); //$NON-NLS-1$
field.setAccessible(true);
this.mainPageBuffer = (MavenImportWizardPage) field.get(this);
} catch (Exception excep... | [
"protected",
"MavenImportWizardPage",
"getMavenImportWizardPage",
"(",
")",
"{",
"if",
"(",
"this",
".",
"mainPageBuffer",
"==",
"null",
")",
"{",
"try",
"{",
"final",
"Field",
"field",
"=",
"MavenImportWizard",
".",
"class",
".",
"getDeclaredField",
"(",
"\"pag... | Replies the main configuration page.
@return the main configuration page. | [
"Replies",
"the",
"main",
"configuration",
"page",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/ImportMavenSarlProjectWizard.java#L65-L76 |
56,737 | sarl/sarl | main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/ImportMavenSarlProjectWizard.java | ImportMavenSarlProjectWizard.createImportJob | protected WorkspaceJob createImportJob(Collection<MavenProjectInfo> projects) {
final WorkspaceJob job = new ImportMavenSarlProjectsJob(projects, this.workingSets, this.importConfiguration);
job.setRule(MavenPlugin.getProjectConfigurationManager().getRule());
return job;
} | java | protected WorkspaceJob createImportJob(Collection<MavenProjectInfo> projects) {
final WorkspaceJob job = new ImportMavenSarlProjectsJob(projects, this.workingSets, this.importConfiguration);
job.setRule(MavenPlugin.getProjectConfigurationManager().getRule());
return job;
} | [
"protected",
"WorkspaceJob",
"createImportJob",
"(",
"Collection",
"<",
"MavenProjectInfo",
">",
"projects",
")",
"{",
"final",
"WorkspaceJob",
"job",
"=",
"new",
"ImportMavenSarlProjectsJob",
"(",
"projects",
",",
"this",
".",
"workingSets",
",",
"this",
".",
"im... | Create the import job.
@param projects the projects to import.
@return the import job. | [
"Create",
"the",
"import",
"job",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/wizards/importproject/ImportMavenSarlProjectWizard.java#L154-L158 |
56,738 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java | Utilities.parseVersion | public static Version parseVersion(String version) {
if (!Strings.isNullOrEmpty(version)) {
try {
return Version.parseVersion(version);
} catch (Throwable exception) {
//
}
}
return null;
} | java | public static Version parseVersion(String version) {
if (!Strings.isNullOrEmpty(version)) {
try {
return Version.parseVersion(version);
} catch (Throwable exception) {
//
}
}
return null;
} | [
"public",
"static",
"Version",
"parseVersion",
"(",
"String",
"version",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isNullOrEmpty",
"(",
"version",
")",
")",
"{",
"try",
"{",
"return",
"Version",
".",
"parseVersion",
"(",
"version",
")",
";",
"}",
"catch... | Null-safe version parser.
@param version the version string.
@return the version. | [
"Null",
"-",
"safe",
"version",
"parser",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java#L62-L71 |
56,739 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java | Utilities.compareVersionToRange | public static int compareVersionToRange(Version version, Version minVersion, Version maxVersion) {
assert minVersion == null || maxVersion == null || minVersion.compareTo(maxVersion) < 0;
if (version == null) {
return Integer.MIN_VALUE;
}
if (minVersion != null && compareVersionsNoQualifier(version, minVersi... | java | public static int compareVersionToRange(Version version, Version minVersion, Version maxVersion) {
assert minVersion == null || maxVersion == null || minVersion.compareTo(maxVersion) < 0;
if (version == null) {
return Integer.MIN_VALUE;
}
if (minVersion != null && compareVersionsNoQualifier(version, minVersi... | [
"public",
"static",
"int",
"compareVersionToRange",
"(",
"Version",
"version",
",",
"Version",
"minVersion",
",",
"Version",
"maxVersion",
")",
"{",
"assert",
"minVersion",
"==",
"null",
"||",
"maxVersion",
"==",
"null",
"||",
"minVersion",
".",
"compareTo",
"("... | Null-safe compare a version number to a range of version numbers.
<p>The minVersion must be strictly lower to the maxVersion. Otherwise
the behavior is not predictible.
@param version the version to compare to the range; must not be <code>null</code>.
@param minVersion the minimal version in the range (inclusive); co... | [
"Null",
"-",
"safe",
"compare",
"a",
"version",
"number",
"to",
"a",
"range",
"of",
"version",
"numbers",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java#L85-L97 |
56,740 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java | Utilities.compareTo | public static <T> int compareTo(Comparable<T> object1, T object2) {
if (object1 == object2) {
return 0;
}
if (object1 == null) {
return Integer.MIN_VALUE;
}
if (object2 == null) {
return Integer.MAX_VALUE;
}
assert object1 != null && object2 != null;
return object1.compareTo(object2);
} | java | public static <T> int compareTo(Comparable<T> object1, T object2) {
if (object1 == object2) {
return 0;
}
if (object1 == null) {
return Integer.MIN_VALUE;
}
if (object2 == null) {
return Integer.MAX_VALUE;
}
assert object1 != null && object2 != null;
return object1.compareTo(object2);
} | [
"public",
"static",
"<",
"T",
">",
"int",
"compareTo",
"(",
"Comparable",
"<",
"T",
">",
"object1",
",",
"T",
"object2",
")",
"{",
"if",
"(",
"object1",
"==",
"object2",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"object1",
"==",
"null",
")",
... | Null-safe comparison.
@param <T> - type of the comparable element.
@param object1 the first object.
@param object2 the second object.
@return Negative number if a lower than b.
Positive number if a greater than b.
<code>0</code> if a is equal to b. | [
"Null",
"-",
"safe",
"comparison",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java#L126-L138 |
56,741 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java | Utilities.getNameWithTypeParameters | public static String getNameWithTypeParameters(IType type) {
assert type != null;
final String superName = type.getFullyQualifiedName('.');
if (!JavaModelUtil.is50OrHigher(type.getJavaProject())) {
return superName;
}
try {
final ITypeParameter[] typeParameters = type.getTypeParameters();
if (typePar... | java | public static String getNameWithTypeParameters(IType type) {
assert type != null;
final String superName = type.getFullyQualifiedName('.');
if (!JavaModelUtil.is50OrHigher(type.getJavaProject())) {
return superName;
}
try {
final ITypeParameter[] typeParameters = type.getTypeParameters();
if (typePar... | [
"public",
"static",
"String",
"getNameWithTypeParameters",
"(",
"IType",
"type",
")",
"{",
"assert",
"type",
"!=",
"null",
";",
"final",
"String",
"superName",
"=",
"type",
".",
"getFullyQualifiedName",
"(",
"'",
"'",
")",
";",
"if",
"(",
"!",
"JavaModelUtil... | Replies the fully qualified name with generic parameters.
@param type the type. Never <code>null</code>.
@return the qualified name. | [
"Replies",
"the",
"fully",
"qualified",
"name",
"with",
"generic",
"parameters",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java#L145-L170 |
56,742 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java | Utilities.newLibraryEntry | public static IClasspathEntry newLibraryEntry(Bundle bundle, IPath precomputedBundlePath, BundleURLMappings javadocURLs) {
assert bundle != null;
final IPath bundlePath;
if (precomputedBundlePath == null) {
bundlePath = BundleUtil.getBundlePath(bundle);
} else {
bundlePath = precomputedBundlePath;
}
f... | java | public static IClasspathEntry newLibraryEntry(Bundle bundle, IPath precomputedBundlePath, BundleURLMappings javadocURLs) {
assert bundle != null;
final IPath bundlePath;
if (precomputedBundlePath == null) {
bundlePath = BundleUtil.getBundlePath(bundle);
} else {
bundlePath = precomputedBundlePath;
}
f... | [
"public",
"static",
"IClasspathEntry",
"newLibraryEntry",
"(",
"Bundle",
"bundle",
",",
"IPath",
"precomputedBundlePath",
",",
"BundleURLMappings",
"javadocURLs",
")",
"{",
"assert",
"bundle",
"!=",
"null",
";",
"final",
"IPath",
"bundlePath",
";",
"if",
"(",
"pre... | Create the classpath library linked to the bundle with the given name.
@param bundle the bundle to point to. Never <code>null</code>.
@param precomputedBundlePath the path to the bundle that is already available. If <code>null</code>,
the path is computed from the bundle with {@link BundleUtil}.
@param javadocURLs the... | [
"Create",
"the",
"classpath",
"library",
"linked",
"to",
"the",
"bundle",
"with",
"the",
"given",
"name",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java#L181-L221 |
56,743 | sarl/sarl | products/sarlc/src/main/java/io/sarl/lang/sarlc/BootiqueSarlcMain.java | BootiqueSarlcMain.createRuntime | @SuppressWarnings("static-method")
protected BQRuntime createRuntime(String... args) {
SARLStandaloneSetup.doPreSetup();
final BQRuntime runtime = Bootique.app(args).autoLoadModules().createRuntime();
SARLStandaloneSetup.doPostSetup(runtime.getInstance(Injector.class));
return runtime;
} | java | @SuppressWarnings("static-method")
protected BQRuntime createRuntime(String... args) {
SARLStandaloneSetup.doPreSetup();
final BQRuntime runtime = Bootique.app(args).autoLoadModules().createRuntime();
SARLStandaloneSetup.doPostSetup(runtime.getInstance(Injector.class));
return runtime;
} | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"BQRuntime",
"createRuntime",
"(",
"String",
"...",
"args",
")",
"{",
"SARLStandaloneSetup",
".",
"doPreSetup",
"(",
")",
";",
"final",
"BQRuntime",
"runtime",
"=",
"Bootique",
".",
"app",
"(",... | Create the compiler runtime.
@param args the command line arguments.
@return the runtime. | [
"Create",
"the",
"compiler",
"runtime",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/products/sarlc/src/main/java/io/sarl/lang/sarlc/BootiqueSarlcMain.java#L55-L61 |
56,744 | sarl/sarl | products/sarlc/src/main/java/io/sarl/lang/sarlc/BootiqueSarlcMain.java | BootiqueSarlcMain.runCompiler | public int runCompiler(String... args) {
try {
final BQRuntime runtime = createRuntime(args);
final CommandOutcome outcome = runtime.run();
if (!outcome.isSuccess() && outcome.getException() != null) {
Logger.getRootLogger().error(outcome.getMessage(), outcome.getException());
}
return outcome.getE... | java | public int runCompiler(String... args) {
try {
final BQRuntime runtime = createRuntime(args);
final CommandOutcome outcome = runtime.run();
if (!outcome.isSuccess() && outcome.getException() != null) {
Logger.getRootLogger().error(outcome.getMessage(), outcome.getException());
}
return outcome.getE... | [
"public",
"int",
"runCompiler",
"(",
"String",
"...",
"args",
")",
"{",
"try",
"{",
"final",
"BQRuntime",
"runtime",
"=",
"createRuntime",
"(",
"args",
")",
";",
"final",
"CommandOutcome",
"outcome",
"=",
"runtime",
".",
"run",
"(",
")",
";",
"if",
"(",
... | Run the batch compiler.
<p>This function runs the compiler and exits with the return code.
@param args the command line arguments.
@return the exit code. | [
"Run",
"the",
"batch",
"compiler",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/products/sarlc/src/main/java/io/sarl/lang/sarlc/BootiqueSarlcMain.java#L70-L89 |
56,745 | sarl/sarl | products/sarlc/src/main/java/io/sarl/lang/sarlc/BootiqueSarlcMain.java | BootiqueSarlcMain.getOptions | public List<HelpOption> getOptions() {
final BQRuntime runtime = createRuntime();
final ApplicationMetadata application = runtime.getInstance(ApplicationMetadata.class);
final HelpOptions helpOptions = new HelpOptions();
application.getCommands().forEach(c -> {
helpOptions.add(c.asOption());
c.getOptions... | java | public List<HelpOption> getOptions() {
final BQRuntime runtime = createRuntime();
final ApplicationMetadata application = runtime.getInstance(ApplicationMetadata.class);
final HelpOptions helpOptions = new HelpOptions();
application.getCommands().forEach(c -> {
helpOptions.add(c.asOption());
c.getOptions... | [
"public",
"List",
"<",
"HelpOption",
">",
"getOptions",
"(",
")",
"{",
"final",
"BQRuntime",
"runtime",
"=",
"createRuntime",
"(",
")",
";",
"final",
"ApplicationMetadata",
"application",
"=",
"runtime",
".",
"getInstance",
"(",
"ApplicationMetadata",
".",
"clas... | Replies the options of the program.
@return the options of the program. | [
"Replies",
"the",
"options",
"of",
"the",
"program",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/products/sarlc/src/main/java/io/sarl/lang/sarlc/BootiqueSarlcMain.java#L95-L108 |
56,746 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/writers/SarlConstructorWriter.java | SarlConstructorWriter.addAnnotations | protected void addAnnotations(ExecutableMemberDoc member, Content htmlTree) {
WriterUtils.addAnnotations(member, htmlTree, this.configuration, this.writer);
} | java | protected void addAnnotations(ExecutableMemberDoc member, Content htmlTree) {
WriterUtils.addAnnotations(member, htmlTree, this.configuration, this.writer);
} | [
"protected",
"void",
"addAnnotations",
"(",
"ExecutableMemberDoc",
"member",
",",
"Content",
"htmlTree",
")",
"{",
"WriterUtils",
".",
"addAnnotations",
"(",
"member",
",",
"htmlTree",
",",
"this",
".",
"configuration",
",",
"this",
".",
"writer",
")",
";",
"}... | Add annotations, except the reserved annotations.
@param member the members.
@param htmlTree the output. | [
"Add",
"annotations",
"except",
"the",
"reserved",
"annotations",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/writers/SarlConstructorWriter.java#L82-L84 |
56,747 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.setCurrentPreferenceKey | public static void setCurrentPreferenceKey(String key) {
LOCK.lock();
try {
currentPreferenceKey = (Strings.isNullOrEmpty(key)) ? DEFAULT_PREFERENCE_KEY : key;
} finally {
LOCK.unlock();
}
} | java | public static void setCurrentPreferenceKey(String key) {
LOCK.lock();
try {
currentPreferenceKey = (Strings.isNullOrEmpty(key)) ? DEFAULT_PREFERENCE_KEY : key;
} finally {
LOCK.unlock();
}
} | [
"public",
"static",
"void",
"setCurrentPreferenceKey",
"(",
"String",
"key",
")",
"{",
"LOCK",
".",
"lock",
"(",
")",
";",
"try",
"{",
"currentPreferenceKey",
"=",
"(",
"Strings",
".",
"isNullOrEmpty",
"(",
"key",
")",
")",
"?",
"DEFAULT_PREFERENCE_KEY",
":"... | Change the key used for storing the SARL runtime configuration
into the preferences.
<p>If the given key is <code>null</code> or empty, the preference key
is reset to the {@link #DEFAULT_PREFERENCE_KEY}.
@param key the new key or <code>null</code>. | [
"Change",
"the",
"key",
"used",
"for",
"storing",
"the",
"SARL",
"runtime",
"configuration",
"into",
"the",
"preferences",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L154-L161 |
56,748 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.fireSREChanged | public static void fireSREChanged(PropertyChangeEvent event) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).sreChanged(event);
}
} | java | public static void fireSREChanged(PropertyChangeEvent event) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).sreChanged(event);
}
} | [
"public",
"static",
"void",
"fireSREChanged",
"(",
"PropertyChangeEvent",
"event",
")",
"{",
"for",
"(",
"final",
"Object",
"listener",
":",
"SRE_LISTENERS",
".",
"getListeners",
"(",
")",
")",
"{",
"(",
"(",
"ISREInstallChangedListener",
")",
"listener",
")",
... | Notifies all SRE install changed listeners of the given property change.
@param event event describing the change. | [
"Notifies",
"all",
"SRE",
"install",
"changed",
"listeners",
"of",
"the",
"given",
"property",
"change",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L188-L192 |
56,749 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.fireSREAdded | public static void fireSREAdded(ISREInstall installation) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).sreAdded(installation);
}
} | java | public static void fireSREAdded(ISREInstall installation) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).sreAdded(installation);
}
} | [
"public",
"static",
"void",
"fireSREAdded",
"(",
"ISREInstall",
"installation",
")",
"{",
"for",
"(",
"final",
"Object",
"listener",
":",
"SRE_LISTENERS",
".",
"getListeners",
"(",
")",
")",
"{",
"(",
"(",
"ISREInstallChangedListener",
")",
"listener",
")",
".... | Notifies all SRE install changed listeners of the addition of a SRE.
@param installation the installed SRE. | [
"Notifies",
"all",
"SRE",
"install",
"changed",
"listeners",
"of",
"the",
"addition",
"of",
"a",
"SRE",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L199-L203 |
56,750 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.fireSRERemoved | public static void fireSRERemoved(ISREInstall installation) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).sreRemoved(installation);
}
} | java | public static void fireSRERemoved(ISREInstall installation) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).sreRemoved(installation);
}
} | [
"public",
"static",
"void",
"fireSRERemoved",
"(",
"ISREInstall",
"installation",
")",
"{",
"for",
"(",
"final",
"Object",
"listener",
":",
"SRE_LISTENERS",
".",
"getListeners",
"(",
")",
")",
"{",
"(",
"(",
"ISREInstallChangedListener",
")",
"listener",
")",
... | Notifies all SRE install changed listeners of the removed of a SRE.
@param installation the removed SRE. | [
"Notifies",
"all",
"SRE",
"install",
"changed",
"listeners",
"of",
"the",
"removed",
"of",
"a",
"SRE",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L210-L214 |
56,751 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.getSREFromId | public static ISREInstall getSREFromId(String id) {
if (Strings.isNullOrEmpty(id)) {
return null;
}
initializeSREs();
LOCK.lock();
try {
return ALL_SRE_INSTALLS.get(id);
} finally {
LOCK.unlock();
}
} | java | public static ISREInstall getSREFromId(String id) {
if (Strings.isNullOrEmpty(id)) {
return null;
}
initializeSREs();
LOCK.lock();
try {
return ALL_SRE_INSTALLS.get(id);
} finally {
LOCK.unlock();
}
} | [
"public",
"static",
"ISREInstall",
"getSREFromId",
"(",
"String",
"id",
")",
"{",
"if",
"(",
"Strings",
".",
"isNullOrEmpty",
"(",
"id",
")",
")",
"{",
"return",
"null",
";",
"}",
"initializeSREs",
"(",
")",
";",
"LOCK",
".",
"lock",
"(",
")",
";",
"... | Return the SRE corresponding to the specified Id.
@param id the id that specifies an instance of ISREInstall
@return the SRE corresponding to the specified Id, or <code>null</code>. | [
"Return",
"the",
"SRE",
"corresponding",
"to",
"the",
"specified",
"Id",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L222-L233 |
56,752 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.setSREInstalls | @SuppressWarnings("checkstyle:npathcomplexity")
public static void setSREInstalls(ISREInstall[] sres, IProgressMonitor monitor) throws CoreException {
final SubMonitor mon = SubMonitor.convert(monitor,
io.sarl.eclipse.runtime.Messages.SARLRuntime_0,
sres.length * 2 + ALL_SRE_INSTALLS.size());
initializeSRE... | java | @SuppressWarnings("checkstyle:npathcomplexity")
public static void setSREInstalls(ISREInstall[] sres, IProgressMonitor monitor) throws CoreException {
final SubMonitor mon = SubMonitor.convert(monitor,
io.sarl.eclipse.runtime.Messages.SARLRuntime_0,
sres.length * 2 + ALL_SRE_INSTALLS.size());
initializeSRE... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:npathcomplexity\"",
")",
"public",
"static",
"void",
"setSREInstalls",
"(",
"ISREInstall",
"[",
"]",
"sres",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"CoreException",
"{",
"final",
"SubMonitor",
"mon",
"=",
"SubM... | Sets the installed SREs.
@param sres The installed SREs.
@param monitor the progress monitor to use for reporting progress to the user. It is the caller's responsibility
to call done() on the given monitor. Accepts <code>null</code>, indicating that no progress should be
reported and that the operation cannot be cance... | [
"Sets",
"the",
"installed",
"SREs",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L281-L334 |
56,753 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.fireDefaultSREChanged | private static void fireDefaultSREChanged(ISREInstall previous, ISREInstall current) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).defaultSREInstallChanged(previous, current);
}
} | java | private static void fireDefaultSREChanged(ISREInstall previous, ISREInstall current) {
for (final Object listener : SRE_LISTENERS.getListeners()) {
((ISREInstallChangedListener) listener).defaultSREInstallChanged(previous, current);
}
} | [
"private",
"static",
"void",
"fireDefaultSREChanged",
"(",
"ISREInstall",
"previous",
",",
"ISREInstall",
"current",
")",
"{",
"for",
"(",
"final",
"Object",
"listener",
":",
"SRE_LISTENERS",
".",
"getListeners",
"(",
")",
")",
"{",
"(",
"(",
"ISREInstallChanged... | Notifies registered listeners that the default SRE has changed.
@param previous the previous SRE
@param current the new current default SRE | [
"Notifies",
"registered",
"listeners",
"that",
"the",
"default",
"SRE",
"has",
"changed",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L391-L395 |
56,754 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.isPlatformSRE | public static boolean isPlatformSRE(ISREInstall sre) {
if (sre != null) {
LOCK.lock();
try {
return platformSREInstalls.contains(sre.getId());
} finally {
LOCK.unlock();
}
}
return false;
} | java | public static boolean isPlatformSRE(ISREInstall sre) {
if (sre != null) {
LOCK.lock();
try {
return platformSREInstalls.contains(sre.getId());
} finally {
LOCK.unlock();
}
}
return false;
} | [
"public",
"static",
"boolean",
"isPlatformSRE",
"(",
"ISREInstall",
"sre",
")",
"{",
"if",
"(",
"sre",
"!=",
"null",
")",
"{",
"LOCK",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"platformSREInstalls",
".",
"contains",
"(",
"sre",
".",
"getId",
"... | Replies if the given SRE is provided by the Eclipse platform
through an extension point.
@param sre the sre.
@return <code>true</code> if the SRE was provided through an extension
point. | [
"Replies",
"if",
"the",
"given",
"SRE",
"is",
"provided",
"by",
"the",
"Eclipse",
"platform",
"through",
"an",
"extension",
"point",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L421-L431 |
56,755 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.clearSREConfiguration | public static void clearSREConfiguration() throws CoreException {
final SARLEclipsePlugin plugin = SARLEclipsePlugin.getDefault();
plugin.getPreferences().remove(getCurrentPreferenceKey());
plugin.savePreferences();
} | java | public static void clearSREConfiguration() throws CoreException {
final SARLEclipsePlugin plugin = SARLEclipsePlugin.getDefault();
plugin.getPreferences().remove(getCurrentPreferenceKey());
plugin.savePreferences();
} | [
"public",
"static",
"void",
"clearSREConfiguration",
"(",
")",
"throws",
"CoreException",
"{",
"final",
"SARLEclipsePlugin",
"plugin",
"=",
"SARLEclipsePlugin",
".",
"getDefault",
"(",
")",
";",
"plugin",
".",
"getPreferences",
"(",
")",
".",
"remove",
"(",
"get... | Remove the SRE configuration information from the preferences.
@throws CoreException if trying to save the current state of SREs encounters a problem | [
"Remove",
"the",
"SRE",
"configuration",
"information",
"from",
"the",
"preferences",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L457-L461 |
56,756 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.initializeSREExtensions | private static void initializeSREExtensions() {
final MultiStatus status = new MultiStatus(SARLEclipsePlugin.PLUGIN_ID,
IStatus.OK, "Exceptions occurred", null); //$NON-NLS-1$
final IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
SARLEclipsePlugin.PLUGIN_ID, SARLEclipseC... | java | private static void initializeSREExtensions() {
final MultiStatus status = new MultiStatus(SARLEclipsePlugin.PLUGIN_ID,
IStatus.OK, "Exceptions occurred", null); //$NON-NLS-1$
final IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
SARLEclipsePlugin.PLUGIN_ID, SARLEclipseC... | [
"private",
"static",
"void",
"initializeSREExtensions",
"(",
")",
"{",
"final",
"MultiStatus",
"status",
"=",
"new",
"MultiStatus",
"(",
"SARLEclipsePlugin",
".",
"PLUGIN_ID",
",",
"IStatus",
".",
"OK",
",",
"\"Exceptions occurred\"",
",",
"null",
")",
";",
"//$... | Initializes SRE extensions. | [
"Initializes",
"SRE",
"extensions",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L466-L493 |
56,757 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.getSREsAsXML | public static String getSREsAsXML(IProgressMonitor monitor) throws CoreException {
initializeSREs();
try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
final DocumentBuilder builder = factory.newDocumentBuilder();
final Document xmldocument = builder.newDocument();
final ... | java | public static String getSREsAsXML(IProgressMonitor monitor) throws CoreException {
initializeSREs();
try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
final DocumentBuilder builder = factory.newDocumentBuilder();
final Document xmldocument = builder.newDocument();
final ... | [
"public",
"static",
"String",
"getSREsAsXML",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"CoreException",
"{",
"initializeSREs",
"(",
")",
";",
"try",
"{",
"final",
"DocumentBuilderFactory",
"factory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
... | Returns the listing of currently installed SREs as a single XML file.
@param monitor monitor on the XML building.
@return an XML representation of all of the currently installed SREs.
@throws CoreException if trying to compute the XML for the SRE state encounters a problem. | [
"Returns",
"the",
"listing",
"of",
"currently",
"installed",
"SREs",
"as",
"a",
"single",
"XML",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L552-L572 |
56,758 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.initializePersistedSREs | @SuppressWarnings("checkstyle:cyclomaticcomplexity")
private static String initializePersistedSREs() {
// // FOR DEBUG
// try {
// clearSREConfiguration();
// } catch (CoreException e1) {
// e1.printStackTrace();
// }
final String rawXml = SARLEclipsePlugin.getDefault().getPreferences().get(
... | java | @SuppressWarnings("checkstyle:cyclomaticcomplexity")
private static String initializePersistedSREs() {
// // FOR DEBUG
// try {
// clearSREConfiguration();
// } catch (CoreException e1) {
// e1.printStackTrace();
// }
final String rawXml = SARLEclipsePlugin.getDefault().getPreferences().get(
... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:cyclomaticcomplexity\"",
")",
"private",
"static",
"String",
"initializePersistedSREs",
"(",
")",
"{",
"//\t\t// FOR DEBUG",
"//\t\ttry {",
"//\t\t\tclearSREConfiguration();",
"//\t\t} catch (CoreException e1) {",
"//\t\t\te1.printStackTrac... | This method loads installed SREs based an existing user preference
or old SRE configurations file. | [
"This",
"method",
"loads",
"installed",
"SREs",
"based",
"an",
"existing",
"user",
"preference",
"or",
"old",
"SRE",
"configurations",
"file",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L640-L723 |
56,759 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.initializeSREs | @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:variabledeclarationusagedistance",
"checkstyle:npathcomplexity"})
private static void initializeSREs() {
ISREInstall[] newSREs = new ISREInstall[0];
boolean savePrefs = false;
LOCK.lock();
final String previousDefault = defaultSREId;
try {
... | java | @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:variabledeclarationusagedistance",
"checkstyle:npathcomplexity"})
private static void initializeSREs() {
ISREInstall[] newSREs = new ISREInstall[0];
boolean savePrefs = false;
LOCK.lock();
final String previousDefault = defaultSREId;
try {
... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:cyclomaticcomplexity\"",
",",
"\"checkstyle:variabledeclarationusagedistance\"",
",",
"\"checkstyle:npathcomplexity\"",
"}",
")",
"private",
"static",
"void",
"initializeSREs",
"(",
")",
"{",
"ISREInstall",
"[",
"]",
"newSREs... | Perform SRE install initialization. Does not hold locks
while performing change notification.
@since 3.2 | [
"Perform",
"SRE",
"install",
"initialization",
".",
"Does",
"not",
"hold",
"locks",
"while",
"performing",
"change",
"notification",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L731-L812 |
56,760 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.createUniqueIdentifier | public static String createUniqueIdentifier() {
String id;
do {
id = UUID.randomUUID().toString();
} while (getSREFromId(id) != null);
return id;
} | java | public static String createUniqueIdentifier() {
String id;
do {
id = UUID.randomUUID().toString();
} while (getSREFromId(id) != null);
return id;
} | [
"public",
"static",
"String",
"createUniqueIdentifier",
"(",
")",
"{",
"String",
"id",
";",
"do",
"{",
"id",
"=",
"UUID",
".",
"randomUUID",
"(",
")",
".",
"toString",
"(",
")",
";",
"}",
"while",
"(",
"getSREFromId",
"(",
"id",
")",
"!=",
"null",
")... | Replies an unique identifier.
@return a unique identifier. | [
"Replies",
"an",
"unique",
"identifier",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L826-L832 |
56,761 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.isUnpackedSRE | public static boolean isUnpackedSRE(File directory) {
File manifestFile = new File(directory, "META-INF"); //$NON-NLS-1$
manifestFile = new File(manifestFile, "MANIFEST.MF"); //$NON-NLS-1$
if (manifestFile.canRead()) {
try (InputStream manifestStream = new FileInputStream(manifestFile)) {
final Manifest ma... | java | public static boolean isUnpackedSRE(File directory) {
File manifestFile = new File(directory, "META-INF"); //$NON-NLS-1$
manifestFile = new File(manifestFile, "MANIFEST.MF"); //$NON-NLS-1$
if (manifestFile.canRead()) {
try (InputStream manifestStream = new FileInputStream(manifestFile)) {
final Manifest ma... | [
"public",
"static",
"boolean",
"isUnpackedSRE",
"(",
"File",
"directory",
")",
"{",
"File",
"manifestFile",
"=",
"new",
"File",
"(",
"directory",
",",
"\"META-INF\"",
")",
";",
"//$NON-NLS-1$",
"manifestFile",
"=",
"new",
"File",
"(",
"manifestFile",
",",
"\"M... | Replies if the given directory contains a SRE.
@param directory the directory.
@return <code>true</code> if the given directory contains a SRE. Otherwise <code>false</code>.
@see #isPackedSRE(File) | [
"Replies",
"if",
"the",
"given",
"directory",
"contains",
"a",
"SRE",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L870-L891 |
56,762 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.isPackedSRE | public static boolean isPackedSRE(File jarFile) {
try (JarFile jFile = new JarFile(jarFile)) {
final Manifest manifest = jFile.getManifest();
if (manifest == null) {
return false;
}
final Attributes sarlSection = manifest.getAttributes(SREConstants.MANIFEST_SECTION_SRE);
if (sarlSection == null) {
... | java | public static boolean isPackedSRE(File jarFile) {
try (JarFile jFile = new JarFile(jarFile)) {
final Manifest manifest = jFile.getManifest();
if (manifest == null) {
return false;
}
final Attributes sarlSection = manifest.getAttributes(SREConstants.MANIFEST_SECTION_SRE);
if (sarlSection == null) {
... | [
"public",
"static",
"boolean",
"isPackedSRE",
"(",
"File",
"jarFile",
")",
"{",
"try",
"(",
"JarFile",
"jFile",
"=",
"new",
"JarFile",
"(",
"jarFile",
")",
")",
"{",
"final",
"Manifest",
"manifest",
"=",
"jFile",
".",
"getManifest",
"(",
")",
";",
"if",
... | Replies if the given JAR file contains a SRE.
<p>The SRE detection is based on the content of the manifest.
@param jarFile the JAR file to test.
@return <code>true</code> if the given directory contains a SRE. Otherwise <code>false</code>.
@see #isUnpackedSRE(File) | [
"Replies",
"if",
"the",
"given",
"JAR",
"file",
"contains",
"a",
"SRE",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L928-L947 |
56,763 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.getDeclaredBootstrap | public static String getDeclaredBootstrap(IPath path) {
try {
final IFile location = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (location != null) {
final IPath pathLocation = location.getLocation();
if (pathLocation != null) {
final File file = pathLocation.toFile();
if (file.... | java | public static String getDeclaredBootstrap(IPath path) {
try {
final IFile location = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (location != null) {
final IPath pathLocation = location.getLocation();
if (pathLocation != null) {
final File file = pathLocation.toFile();
if (file.... | [
"public",
"static",
"String",
"getDeclaredBootstrap",
"(",
"IPath",
"path",
")",
"{",
"try",
"{",
"final",
"IFile",
"location",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getFile",
"(",
"path",
")",
";",
"if",
... | Replies the bootstrap name declared within the given path, corresponding to a JAR file or a folder.
<p>The SRE bootstrap detection is based on the service definition within META-INF folder.
@param path the path to test.
@return the bootstrap or {@code null} if none.
@since 0.7
@see #containsPackedBootstrap(IPath)
@se... | [
"Replies",
"the",
"bootstrap",
"name",
"declared",
"within",
"the",
"given",
"path",
"corresponding",
"to",
"a",
"JAR",
"file",
"or",
"a",
"folder",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L1110-L1141 |
56,764 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/JreProxyInstaller.java | JreProxyInstaller.processElement | protected Object processElement(Object obj, Class<?> expectedType) {
if (obj == null || obj instanceof Proxy) {
return obj;
}
if (obj instanceof Doc) {
return wrap(obj);
} else if (expectedType != null && expectedType.isArray()) {
final Class<?> componentType = expectedType.getComponentType();
if (D... | java | protected Object processElement(Object obj, Class<?> expectedType) {
if (obj == null || obj instanceof Proxy) {
return obj;
}
if (obj instanceof Doc) {
return wrap(obj);
} else if (expectedType != null && expectedType.isArray()) {
final Class<?> componentType = expectedType.getComponentType();
if (D... | [
"protected",
"Object",
"processElement",
"(",
"Object",
"obj",
",",
"Class",
"<",
"?",
">",
"expectedType",
")",
"{",
"if",
"(",
"obj",
"==",
"null",
"||",
"obj",
"instanceof",
"Proxy",
")",
"{",
"return",
"obj",
";",
"}",
"if",
"(",
"obj",
"instanceof... | Filter the given document.
@param obj the document to filter.
@param expectedType the expected type of the {@code obj}.
@return the filtered {@code obj}. | [
"Filter",
"the",
"given",
"document",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/JreProxyInstaller.java#L100-L134 |
56,765 | sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/JreProxyInstaller.java | JreProxyInstaller.wrap | protected Object wrap(Object object) {
if (object == null || object instanceof Proxy) {
return object;
}
final Class<?> type = object.getClass();
return Proxy.newProxyInstance(type.getClassLoader(), type.getInterfaces(), new ProxyHandler(object));
} | java | protected Object wrap(Object object) {
if (object == null || object instanceof Proxy) {
return object;
}
final Class<?> type = object.getClass();
return Proxy.newProxyInstance(type.getClassLoader(), type.getInterfaces(), new ProxyHandler(object));
} | [
"protected",
"Object",
"wrap",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"object",
"==",
"null",
"||",
"object",
"instanceof",
"Proxy",
")",
"{",
"return",
"object",
";",
"}",
"final",
"Class",
"<",
"?",
">",
"type",
"=",
"object",
".",
"getClass",... | Unwrap the given object.
@param object the object.
@return the unwrapped object. | [
"Unwrap",
"the",
"given",
"object",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/proxy/JreProxyInstaller.java#L146-L152 |
56,766 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.writePackageFiles | protected void writePackageFiles(QualifiedName name, String lineSeparator,
IExtraLanguageGeneratorContext context) {
final IFileSystemAccess2 fsa = context.getFileSystemAccess();
final String outputConfiguration = getOutputConfigurationName();
QualifiedName libraryName = null;
for (final String segment : nam... | java | protected void writePackageFiles(QualifiedName name, String lineSeparator,
IExtraLanguageGeneratorContext context) {
final IFileSystemAccess2 fsa = context.getFileSystemAccess();
final String outputConfiguration = getOutputConfigurationName();
QualifiedName libraryName = null;
for (final String segment : nam... | [
"protected",
"void",
"writePackageFiles",
"(",
"QualifiedName",
"name",
",",
"String",
"lineSeparator",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"final",
"IFileSystemAccess2",
"fsa",
"=",
"context",
".",
"getFileSystemAccess",
"(",
")",
";",
"final"... | Generate the Python package files.
<p>This function generates the "__init__.py" files for all the packages.
@param name the name of the generated type.
@param lineSeparator the line separator.
@param context the generation context. | [
"Generate",
"the",
"Python",
"package",
"files",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L203-L227 |
56,767 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generatePythonClassDeclaration | @SuppressWarnings("static-method")
protected boolean generatePythonClassDeclaration(String typeName, boolean isAbstract,
List<? extends JvmTypeReference> superTypes, String comment, boolean ignoreObjectType, PyAppendable it,
IExtraLanguageGeneratorContext context) {
if (!Strings.isEmpty(typeName)) {
it.appe... | java | @SuppressWarnings("static-method")
protected boolean generatePythonClassDeclaration(String typeName, boolean isAbstract,
List<? extends JvmTypeReference> superTypes, String comment, boolean ignoreObjectType, PyAppendable it,
IExtraLanguageGeneratorContext context) {
if (!Strings.isEmpty(typeName)) {
it.appe... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"boolean",
"generatePythonClassDeclaration",
"(",
"String",
"typeName",
",",
"boolean",
"isAbstract",
",",
"List",
"<",
"?",
"extends",
"JvmTypeReference",
">",
"superTypes",
",",
"String",
"comment"... | Generate the type declaration for a Python class.
@param typeName name of the type.
@param isAbstract indicates if the type is abstract (interface included).
@param superTypes the super types.
@param comment the type declaration's comment.
@param ignoreObjectType ignores the "Object" type if the super types.
@param it... | [
"Generate",
"the",
"type",
"declaration",
"for",
"a",
"Python",
"class",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L251-L280 |
56,768 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generateDocString | protected static boolean generateDocString(String comment, PyAppendable it) {
final String cmt = comment == null ? null : comment.trim();
if (!Strings.isEmpty(cmt)) {
assert cmt != null;
it.append("\"\"\"").increaseIndentation(); //$NON-NLS-1$
for (final String line : cmt.split("[\n\r\f]+")) { //$NON-NLS-... | java | protected static boolean generateDocString(String comment, PyAppendable it) {
final String cmt = comment == null ? null : comment.trim();
if (!Strings.isEmpty(cmt)) {
assert cmt != null;
it.append("\"\"\"").increaseIndentation(); //$NON-NLS-1$
for (final String line : cmt.split("[\n\r\f]+")) { //$NON-NLS-... | [
"protected",
"static",
"boolean",
"generateDocString",
"(",
"String",
"comment",
",",
"PyAppendable",
"it",
")",
"{",
"final",
"String",
"cmt",
"=",
"comment",
"==",
"null",
"?",
"null",
":",
"comment",
".",
"trim",
"(",
")",
";",
"if",
"(",
"!",
"String... | Generate a Python docstring with the given comment.
@param comment the comment.
@param it the receiver of the docstring.
@return {@code true} if the docstring is added, {@code false} otherwise. | [
"Generate",
"a",
"Python",
"docstring",
"with",
"the",
"given",
"comment",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L288-L301 |
56,769 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generateBlockComment | protected static boolean generateBlockComment(String comment, PyAppendable it) {
final String cmt = comment == null ? null : comment.trim();
if (!Strings.isEmpty(cmt)) {
assert cmt != null;
for (final String line : cmt.split("[\n\r\f]+")) { //$NON-NLS-1$
it.append("# ").append(line).newLine(); //$NON-NLS... | java | protected static boolean generateBlockComment(String comment, PyAppendable it) {
final String cmt = comment == null ? null : comment.trim();
if (!Strings.isEmpty(cmt)) {
assert cmt != null;
for (final String line : cmt.split("[\n\r\f]+")) { //$NON-NLS-1$
it.append("# ").append(line).newLine(); //$NON-NLS... | [
"protected",
"static",
"boolean",
"generateBlockComment",
"(",
"String",
"comment",
",",
"PyAppendable",
"it",
")",
"{",
"final",
"String",
"cmt",
"=",
"comment",
"==",
"null",
"?",
"null",
":",
"comment",
".",
"trim",
"(",
")",
";",
"if",
"(",
"!",
"Str... | Generate a Python block comment with the given comment.
@param comment the comment.
@param it the receiver of the block comment.
@return {@code true} if the block comment is added, {@code false} otherwise. | [
"Generate",
"a",
"Python",
"block",
"comment",
"with",
"the",
"given",
"comment",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L309-L319 |
56,770 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generateTypeDeclaration | @SuppressWarnings({ "checkstyle:parameternumber" })
protected boolean generateTypeDeclaration(
String fullyQualifiedName,
String name, boolean isAbstract,
List<? extends JvmTypeReference> superTypes,
String comment,
boolean ignoreObjectType, List<? extends XtendMember> members, PyAppendable it,
IExtr... | java | @SuppressWarnings({ "checkstyle:parameternumber" })
protected boolean generateTypeDeclaration(
String fullyQualifiedName,
String name, boolean isAbstract,
List<? extends JvmTypeReference> superTypes,
String comment,
boolean ignoreObjectType, List<? extends XtendMember> members, PyAppendable it,
IExtr... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:parameternumber\"",
"}",
")",
"protected",
"boolean",
"generateTypeDeclaration",
"(",
"String",
"fullyQualifiedName",
",",
"String",
"name",
",",
"boolean",
"isAbstract",
",",
"List",
"<",
"?",
"extends",
"JvmTypeRefere... | Generate the given type.
@param fullyQualifiedName the fully qualified name of the type.
@param name the name of the type.
@param isAbstract indicates if the type is abstract.
@param superTypes the super types.
@param comment the comment.
@param ignoreObjectType ignores the "Object" type if the super types.
@param mem... | [
"Generate",
"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/PyGenerator.java#L335-L375 |
56,771 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generateEnumerationDeclaration | protected boolean generateEnumerationDeclaration(SarlEnumeration enumeration, PyAppendable it, IExtraLanguageGeneratorContext context) {
if (!Strings.isEmpty(enumeration.getName())) {
it.append("class ").append(enumeration.getName()); //$NON-NLS-1$
it.append("(Enum"); //$NON-NLS-1$
it.append(newType("enum.En... | java | protected boolean generateEnumerationDeclaration(SarlEnumeration enumeration, PyAppendable it, IExtraLanguageGeneratorContext context) {
if (!Strings.isEmpty(enumeration.getName())) {
it.append("class ").append(enumeration.getName()); //$NON-NLS-1$
it.append("(Enum"); //$NON-NLS-1$
it.append(newType("enum.En... | [
"protected",
"boolean",
"generateEnumerationDeclaration",
"(",
"SarlEnumeration",
"enumeration",
",",
"PyAppendable",
"it",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isEmpty",
"(",
"enumeration",
".",
"getName",
"(",
... | Generate the given enumeration declaration.
@param enumeration the enumeration.
@param it the receiver of the generated code.
@param context the context.
@return {@code true} if a declaration was generated. {@code false} if no enumeration was generated.
@since 0.8 | [
"Generate",
"the",
"given",
"enumeration",
"declaration",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L385-L411 |
56,772 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generatePythonConstructors | protected boolean generatePythonConstructors(String container, List<? extends XtendMember> members,
PyAppendable it, IExtraLanguageGeneratorContext context) {
// Prepare field initialization
boolean hasConstructor = false;
for (final XtendMember member : members) {
if (context.getCancelIndicator().isCancele... | java | protected boolean generatePythonConstructors(String container, List<? extends XtendMember> members,
PyAppendable it, IExtraLanguageGeneratorContext context) {
// Prepare field initialization
boolean hasConstructor = false;
for (final XtendMember member : members) {
if (context.getCancelIndicator().isCancele... | [
"protected",
"boolean",
"generatePythonConstructors",
"(",
"String",
"container",
",",
"List",
"<",
"?",
"extends",
"XtendMember",
">",
"members",
",",
"PyAppendable",
"it",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"// Prepare field initialization",
"... | Generate the constructors for a Python class.
@param container the fully qualified name of the container.
@param members the members to be added.
@param it the output.
@param context the generation context.
@return {@code true} if a constructor was generated. {@code false} if no constructor was generated. | [
"Generate",
"the",
"constructors",
"for",
"a",
"Python",
"class",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L421-L452 |
56,773 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.newType | @SuppressWarnings("static-method")
protected JvmType newType(String pythonName) {
final JvmGenericType type = TypesFactory.eINSTANCE.createJvmGenericType();
final int index = pythonName.indexOf("."); //$NON-NLS-1$
if (index <= 0) {
type.setSimpleName(pythonName);
} else {
type.setPackageName(pythonName.s... | java | @SuppressWarnings("static-method")
protected JvmType newType(String pythonName) {
final JvmGenericType type = TypesFactory.eINSTANCE.createJvmGenericType();
final int index = pythonName.indexOf("."); //$NON-NLS-1$
if (index <= 0) {
type.setSimpleName(pythonName);
} else {
type.setPackageName(pythonName.s... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"JvmType",
"newType",
"(",
"String",
"pythonName",
")",
"{",
"final",
"JvmGenericType",
"type",
"=",
"TypesFactory",
".",
"eINSTANCE",
".",
"createJvmGenericType",
"(",
")",
";",
"final",
"int",
... | Create a JvmType for a Python type.
@param pythonName the python type name.
@return the type. | [
"Create",
"a",
"JvmType",
"for",
"a",
"Python",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L459-L470 |
56,774 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generatePythonField | protected void generatePythonField(SarlField field, PyAppendable it, IExtraLanguageGeneratorContext context) {
generateBlockComment(getTypeBuilder().getDocumentation(field), it);
if (!field.isStatic()) {
it.append("self."); //$NON-NLS-1$
}
final String fieldName = it.declareUniqueNameVariable(field, field.ge... | java | protected void generatePythonField(SarlField field, PyAppendable it, IExtraLanguageGeneratorContext context) {
generateBlockComment(getTypeBuilder().getDocumentation(field), it);
if (!field.isStatic()) {
it.append("self."); //$NON-NLS-1$
}
final String fieldName = it.declareUniqueNameVariable(field, field.ge... | [
"protected",
"void",
"generatePythonField",
"(",
"SarlField",
"field",
",",
"PyAppendable",
"it",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"generateBlockComment",
"(",
"getTypeBuilder",
"(",
")",
".",
"getDocumentation",
"(",
"field",
")",
",",
"i... | Create a field declaration.
@param field the field to generate.
@param it the output
@param context the generation context. | [
"Create",
"a",
"field",
"declaration",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L478-L492 |
56,775 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator.generateGuardEvaluators | protected void generateGuardEvaluators(String container, PyAppendable it, IExtraLanguageGeneratorContext context) {
final Map<String, Map<String, List<Pair<XExpression, String>>>> allGuardEvaluators = context.getMapData(EVENT_GUARDS_MEMENTO);
final Map<String, List<Pair<XExpression, String>>> guardEvaluators = allG... | java | protected void generateGuardEvaluators(String container, PyAppendable it, IExtraLanguageGeneratorContext context) {
final Map<String, Map<String, List<Pair<XExpression, String>>>> allGuardEvaluators = context.getMapData(EVENT_GUARDS_MEMENTO);
final Map<String, List<Pair<XExpression, String>>> guardEvaluators = allG... | [
"protected",
"void",
"generateGuardEvaluators",
"(",
"String",
"container",
",",
"PyAppendable",
"it",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"Pair",
"<",
"XExpressi... | Generate the memorized guard evaluators.
@param container the fully qualified name of the container of the guards.
@param it the output.
@param context the generation context. | [
"Generate",
"the",
"memorized",
"guard",
"evaluators",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L601-L636 |
56,776 | sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java | PyGenerator._before | protected void _before(SarlCapacityUses uses, IExtraLanguageGeneratorContext context) {
// Rename the function in order to produce the good features at the calls.
for (final JvmTypeReference capacity : uses.getCapacities()) {
final JvmType type = capacity.getType();
if (type instanceof JvmDeclaredType) {
... | java | protected void _before(SarlCapacityUses uses, IExtraLanguageGeneratorContext context) {
// Rename the function in order to produce the good features at the calls.
for (final JvmTypeReference capacity : uses.getCapacities()) {
final JvmType type = capacity.getType();
if (type instanceof JvmDeclaredType) {
... | [
"protected",
"void",
"_before",
"(",
"SarlCapacityUses",
"uses",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"// Rename the function in order to produce the good features at the calls.",
"for",
"(",
"final",
"JvmTypeReference",
"capacity",
":",
"uses",
".",
"g... | Mark the functions of the used capacities in order to have a valid feature call within the code.
@param uses the capacity uses.
@param context the context. | [
"Mark",
"the",
"functions",
"of",
"the",
"used",
"capacities",
"in",
"order",
"to",
"have",
"a",
"valid",
"feature",
"call",
"within",
"the",
"code",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L1035-L1043 |
56,777 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/ExtraLanguageValidatorSupport.java | ExtraLanguageValidatorSupport.checkExtraLanguageRules | @Check(CheckType.NORMAL)
public void checkExtraLanguageRules(EObject currentObject) {
final List<AbstractExtraLanguageValidator> validators = this.validatorProvider.getValidators(
currentObject.eResource());
if (!validators.isEmpty()) {
for (final AbstractExtraLanguageValidator validator : validators) {
... | java | @Check(CheckType.NORMAL)
public void checkExtraLanguageRules(EObject currentObject) {
final List<AbstractExtraLanguageValidator> validators = this.validatorProvider.getValidators(
currentObject.eResource());
if (!validators.isEmpty()) {
for (final AbstractExtraLanguageValidator validator : validators) {
... | [
"@",
"Check",
"(",
"CheckType",
".",
"NORMAL",
")",
"public",
"void",
"checkExtraLanguageRules",
"(",
"EObject",
"currentObject",
")",
"{",
"final",
"List",
"<",
"AbstractExtraLanguageValidator",
">",
"validators",
"=",
"this",
".",
"validatorProvider",
".",
"getV... | Check the rules for the activated extra languages.
@param currentObject the current object to test. | [
"Check",
"the",
"rules",
"for",
"the",
"activated",
"extra",
"languages",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/ExtraLanguageValidatorSupport.java#L76-L87 |
56,778 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/InjectionFragment2.java | InjectionFragment2.setComment | public void setComment(String comment) {
this.comment = comment;
if (!Strings.isEmpty(comment)) {
this.name = MessageFormat.format("{0} [{1}]", getClass().getName(), comment); //$NON-NLS-1$
} else {
this.name = getClass().getName();
}
} | java | public void setComment(String comment) {
this.comment = comment;
if (!Strings.isEmpty(comment)) {
this.name = MessageFormat.format("{0} [{1}]", getClass().getName(), comment); //$NON-NLS-1$
} else {
this.name = getClass().getName();
}
} | [
"public",
"void",
"setComment",
"(",
"String",
"comment",
")",
"{",
"this",
".",
"comment",
"=",
"comment",
";",
"if",
"(",
"!",
"Strings",
".",
"isEmpty",
"(",
"comment",
")",
")",
"{",
"this",
".",
"name",
"=",
"MessageFormat",
".",
"format",
"(",
... | Change the comment for the injection fragment.
@param comment the comment for the fragment. | [
"Change",
"the",
"comment",
"for",
"the",
"injection",
"fragment",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/InjectionFragment2.java#L88-L95 |
56,779 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SARLGeneratorConfigProvider.java | SARLGeneratorConfigProvider.createDefaultGeneratorConfig | protected GeneratorConfig createDefaultGeneratorConfig() {
final GeneratorConfig config = new GeneratorConfig();
if (this.defaultVersion == null) {
this.defaultVersion = JavaVersion.fromQualifier(System.getProperty("java.specification.version")); //$NON-NLS-1$
if (this.defaultVersion != null) {
config.set... | java | protected GeneratorConfig createDefaultGeneratorConfig() {
final GeneratorConfig config = new GeneratorConfig();
if (this.defaultVersion == null) {
this.defaultVersion = JavaVersion.fromQualifier(System.getProperty("java.specification.version")); //$NON-NLS-1$
if (this.defaultVersion != null) {
config.set... | [
"protected",
"GeneratorConfig",
"createDefaultGeneratorConfig",
"(",
")",
"{",
"final",
"GeneratorConfig",
"config",
"=",
"new",
"GeneratorConfig",
"(",
")",
";",
"if",
"(",
"this",
".",
"defaultVersion",
"==",
"null",
")",
"{",
"this",
".",
"defaultVersion",
"=... | Invoked for creating the default generator configuration.
@return the configuration. | [
"Invoked",
"for",
"creating",
"the",
"default",
"generator",
"configuration",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/compiler/SARLGeneratorConfigProvider.java#L71-L82 |
56,780 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/sarl/actionprototype/DefaultActionPrototypeProvider.java | DefaultActionPrototypeProvider.createPrototype | protected InferredPrototype createPrototype(QualifiedActionName id,
boolean isVarargs, FormalParameterProvider parameters) {
assert parameters != null;
final ActionParameterTypes key = new ActionParameterTypes(isVarargs, parameters.getFormalParameterCount());
final Map<ActionParameterTypes, List<InferredStanda... | java | protected InferredPrototype createPrototype(QualifiedActionName id,
boolean isVarargs, FormalParameterProvider parameters) {
assert parameters != null;
final ActionParameterTypes key = new ActionParameterTypes(isVarargs, parameters.getFormalParameterCount());
final Map<ActionParameterTypes, List<InferredStanda... | [
"protected",
"InferredPrototype",
"createPrototype",
"(",
"QualifiedActionName",
"id",
",",
"boolean",
"isVarargs",
",",
"FormalParameterProvider",
"parameters",
")",
"{",
"assert",
"parameters",
"!=",
"null",
";",
"final",
"ActionParameterTypes",
"key",
"=",
"new",
"... | Build and replies the inferred action signature for the element with
the given ID. This function creates the different signatures according
to the definition, or not, of default values for the formal parameters.
@param id identifier of the function.
@param isVarargs indicates if the signature has a variatic parameter.... | [
"Build",
"and",
"replies",
"the",
"inferred",
"action",
"signature",
"for",
"the",
"element",
"with",
"the",
"given",
"ID",
".",
"This",
"function",
"creates",
"the",
"different",
"signatures",
"according",
"to",
"the",
"definition",
"or",
"not",
"of",
"defaul... | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/sarl/actionprototype/DefaultActionPrototypeProvider.java#L239-L267 |
56,781 | sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/bugfixes/unpublished/BugMultilineCommentIndentation.java | BugMultilineCommentIndentation.fix | @SuppressWarnings("static-method")
public ITextReplacerContext fix(final ITextReplacerContext context, IComment comment) {
final IHiddenRegion hiddenRegion = comment.getHiddenRegion();
if (detectBugSituation(hiddenRegion) && fixBug(hiddenRegion)) {
// Indentation of the first comment line
final ITextRegionAc... | java | @SuppressWarnings("static-method")
public ITextReplacerContext fix(final ITextReplacerContext context, IComment comment) {
final IHiddenRegion hiddenRegion = comment.getHiddenRegion();
if (detectBugSituation(hiddenRegion) && fixBug(hiddenRegion)) {
// Indentation of the first comment line
final ITextRegionAc... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"public",
"ITextReplacerContext",
"fix",
"(",
"final",
"ITextReplacerContext",
"context",
",",
"IComment",
"comment",
")",
"{",
"final",
"IHiddenRegion",
"hiddenRegion",
"=",
"comment",
".",
"getHiddenRegion",
"(... | Fixing the bug.
@param context the replacement context.
@param comment the comment for which the fix must be applied.
@return the new context. | [
"Fixing",
"the",
"bug",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/bugfixes/unpublished/BugMultilineCommentIndentation.java#L59-L71 |
56,782 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/MainProjectWizardPage.java | MainProjectWizardPage.putDefaultClasspathEntriesIn | public void putDefaultClasspathEntriesIn(Collection<IClasspathEntry> classpathEntries) {
final IPath newPath = this.jreGroup.getJREContainerPath();
if (newPath != null) {
classpathEntries.add(JavaCore.newContainerEntry(newPath));
} else {
final IClasspathEntry[] entries = PreferenceConstants.getDefaultJRELi... | java | public void putDefaultClasspathEntriesIn(Collection<IClasspathEntry> classpathEntries) {
final IPath newPath = this.jreGroup.getJREContainerPath();
if (newPath != null) {
classpathEntries.add(JavaCore.newContainerEntry(newPath));
} else {
final IClasspathEntry[] entries = PreferenceConstants.getDefaultJRELi... | [
"public",
"void",
"putDefaultClasspathEntriesIn",
"(",
"Collection",
"<",
"IClasspathEntry",
">",
"classpathEntries",
")",
"{",
"final",
"IPath",
"newPath",
"=",
"this",
".",
"jreGroup",
".",
"getJREContainerPath",
"(",
")",
";",
"if",
"(",
"newPath",
"!=",
"nul... | Returns the default class path entries to be added on new projects.
By default this is the JRE container as selected by the user.
@param classpathEntries the collection in which the classpath entries will be added. | [
"Returns",
"the",
"default",
"class",
"path",
"entries",
"to",
"be",
"added",
"on",
"new",
"projects",
".",
"By",
"default",
"this",
"is",
"the",
"JRE",
"container",
"as",
"selected",
"by",
"the",
"user",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/MainProjectWizardPage.java#L383-L398 |
56,783 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/MainProjectWizardPage.java | MainProjectWizardPage.getOutputLocation | public IPath getOutputLocation() {
IPath outputLocationPath = new Path(getProjectName()).makeAbsolute();
outputLocationPath = outputLocationPath.append(
Path.fromPortableString(SARLConfig.FOLDER_BIN));
return outputLocationPath;
} | java | public IPath getOutputLocation() {
IPath outputLocationPath = new Path(getProjectName()).makeAbsolute();
outputLocationPath = outputLocationPath.append(
Path.fromPortableString(SARLConfig.FOLDER_BIN));
return outputLocationPath;
} | [
"public",
"IPath",
"getOutputLocation",
"(",
")",
"{",
"IPath",
"outputLocationPath",
"=",
"new",
"Path",
"(",
"getProjectName",
"(",
")",
")",
".",
"makeAbsolute",
"(",
")",
";",
"outputLocationPath",
"=",
"outputLocationPath",
".",
"append",
"(",
"Path",
"."... | Returns the source class path entries to be added on new projects.
The underlying resource may not exist.
@return returns the default class path entries | [
"Returns",
"the",
"source",
"class",
"path",
"entries",
"to",
"be",
"added",
"on",
"new",
"projects",
".",
"The",
"underlying",
"resource",
"may",
"not",
"exist",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/MainProjectWizardPage.java#L406-L413 |
56,784 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/extractor/AbstractCodeElementExtractor.java | AbstractCodeElementExtractor.findAction | protected static Action findAction(EObject grammarComponent, String assignmentName) {
for (final Action action : GrammarUtil.containedActions(grammarComponent)) {
if (GrammarUtil.isAssignedAction(action)) {
if (Objects.equals(assignmentName, action.getFeature())) {
return action;
}
}
}
return n... | java | protected static Action findAction(EObject grammarComponent, String assignmentName) {
for (final Action action : GrammarUtil.containedActions(grammarComponent)) {
if (GrammarUtil.isAssignedAction(action)) {
if (Objects.equals(assignmentName, action.getFeature())) {
return action;
}
}
}
return n... | [
"protected",
"static",
"Action",
"findAction",
"(",
"EObject",
"grammarComponent",
",",
"String",
"assignmentName",
")",
"{",
"for",
"(",
"final",
"Action",
"action",
":",
"GrammarUtil",
".",
"containedActions",
"(",
"grammarComponent",
")",
")",
"{",
"if",
"(",... | Replies the assignment component with the given nazme in the given grammar component.
@param grammarComponent the component to explore.
@param assignmentName the name of the assignment to search for.
@return the assignment component. | [
"Replies",
"the",
"assignment",
"component",
"with",
"the",
"given",
"nazme",
"in",
"the",
"given",
"grammar",
"component",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/extractor/AbstractCodeElementExtractor.java#L112-L121 |
56,785 | sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/extractor/AbstractCodeElementExtractor.java | AbstractCodeElementExtractor.getContainerInRule | protected EObject getContainerInRule(EObject root, EObject content) {
EObject container = content;
do {
final EClassifier classifier = getGeneratedTypeFor(container);
if (classifier != null) {
return container;
}
container = container.eContainer();
} while (container != root);
final EClassifier ... | java | protected EObject getContainerInRule(EObject root, EObject content) {
EObject container = content;
do {
final EClassifier classifier = getGeneratedTypeFor(container);
if (classifier != null) {
return container;
}
container = container.eContainer();
} while (container != root);
final EClassifier ... | [
"protected",
"EObject",
"getContainerInRule",
"(",
"EObject",
"root",
",",
"EObject",
"content",
")",
"{",
"EObject",
"container",
"=",
"content",
";",
"do",
"{",
"final",
"EClassifier",
"classifier",
"=",
"getGeneratedTypeFor",
"(",
"container",
")",
";",
"if",... | Replies the container in the grammar rule for the given content element.
@param root the biggest enclosing element to consider in the grammar.
@param content the grammar element to search for the container.
@return the container of the content. | [
"Replies",
"the",
"container",
"in",
"the",
"grammar",
"rule",
"for",
"the",
"given",
"content",
"element",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/extractor/AbstractCodeElementExtractor.java#L157-L171 |
56,786 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.createClassCellEditor | protected CellEditor createClassCellEditor() {
return new DialogCellEditor(getControl()) {
@Override
protected Object openDialogBox(Control cellEditorWindow) {
final OpenTypeSelectionDialog dialog = new OpenTypeSelectionDialog(
getControl().getShell(),
false,
PlatformUI.getWorkbench().getP... | java | protected CellEditor createClassCellEditor() {
return new DialogCellEditor(getControl()) {
@Override
protected Object openDialogBox(Control cellEditorWindow) {
final OpenTypeSelectionDialog dialog = new OpenTypeSelectionDialog(
getControl().getShell(),
false,
PlatformUI.getWorkbench().getP... | [
"protected",
"CellEditor",
"createClassCellEditor",
"(",
")",
"{",
"return",
"new",
"DialogCellEditor",
"(",
"getControl",
"(",
")",
")",
"{",
"@",
"Override",
"protected",
"Object",
"openDialogBox",
"(",
"Control",
"cellEditorWindow",
")",
"{",
"final",
"OpenType... | Create a cell editor that enables to select a class.
@return the cell editor. | [
"Create",
"a",
"cell",
"editor",
"that",
"enables",
"to",
"select",
"a",
"class",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L334-L359 |
56,787 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.enableButtons | private void enableButtons() {
final int itemCount = this.list.getTable().getItemCount();
final boolean hasElement = itemCount > 0;
IStructuredSelection selection;
if (hasElement) {
selection = this.list.getStructuredSelection();
final int selectionCount = selection.size();
if (selectionCount <= 0 || s... | java | private void enableButtons() {
final int itemCount = this.list.getTable().getItemCount();
final boolean hasElement = itemCount > 0;
IStructuredSelection selection;
if (hasElement) {
selection = this.list.getStructuredSelection();
final int selectionCount = selection.size();
if (selectionCount <= 0 || s... | [
"private",
"void",
"enableButtons",
"(",
")",
"{",
"final",
"int",
"itemCount",
"=",
"this",
".",
"list",
".",
"getTable",
"(",
")",
".",
"getItemCount",
"(",
")",
";",
"final",
"boolean",
"hasElement",
"=",
"itemCount",
">",
"0",
";",
"IStructuredSelectio... | Enables the type conversion buttons based on selected items counts in the viewer. | [
"Enables",
"the",
"type",
"conversion",
"buttons",
"based",
"on",
"selected",
"items",
"counts",
"in",
"the",
"viewer",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L389-L414 |
56,788 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.setTypeConversions | protected void setTypeConversions(List<Pair<String, String>> typeConversions, boolean notifyController) {
this.conversions.clear();
if (typeConversions != null) {
for (final Pair<String, String> entry : typeConversions) {
this.conversions.add(new ConversionMapping(entry.getKey(), entry.getValue()));
}
}... | java | protected void setTypeConversions(List<Pair<String, String>> typeConversions, boolean notifyController) {
this.conversions.clear();
if (typeConversions != null) {
for (final Pair<String, String> entry : typeConversions) {
this.conversions.add(new ConversionMapping(entry.getKey(), entry.getValue()));
}
}... | [
"protected",
"void",
"setTypeConversions",
"(",
"List",
"<",
"Pair",
"<",
"String",
",",
"String",
">",
">",
"typeConversions",
",",
"boolean",
"notifyController",
")",
"{",
"this",
".",
"conversions",
".",
"clear",
"(",
")",
";",
"if",
"(",
"typeConversions... | Sets the type conversions to be displayed in this block.
@param typeConversions the type conversions.
@param notifyController indicates if the controller should be notified. | [
"Sets",
"the",
"type",
"conversions",
"to",
"be",
"displayed",
"in",
"this",
"block",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L422-L434 |
56,789 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.addTypeConversion | protected void addTypeConversion(String javaType, String targetType, boolean updateSelection) {
final ConversionMapping entry = new ConversionMapping(javaType, targetType);
this.conversions.add(entry);
//refresh from model
refreshListUI();
if (updateSelection) {
this.list.setSelection(new StructuredSelecti... | java | protected void addTypeConversion(String javaType, String targetType, boolean updateSelection) {
final ConversionMapping entry = new ConversionMapping(javaType, targetType);
this.conversions.add(entry);
//refresh from model
refreshListUI();
if (updateSelection) {
this.list.setSelection(new StructuredSelecti... | [
"protected",
"void",
"addTypeConversion",
"(",
"String",
"javaType",
",",
"String",
"targetType",
",",
"boolean",
"updateSelection",
")",
"{",
"final",
"ConversionMapping",
"entry",
"=",
"new",
"ConversionMapping",
"(",
"javaType",
",",
"targetType",
")",
";",
"th... | Add a type conversion.
@param javaType the name of the java type.
@param targetType the name of the target type.
@param updateSelection indicates if the selection should be updated. | [
"Add",
"a",
"type",
"conversion",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L442-L456 |
56,790 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.removeCurrentTypeConversion | @SuppressWarnings("unchecked")
protected void removeCurrentTypeConversion() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final String[] types = new String[selection.size()];
final Iterator<ConversionMapping> iter = selection.iterator();
int i = 0;
while (iter.hasNext()) {
t... | java | @SuppressWarnings("unchecked")
protected void removeCurrentTypeConversion() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final String[] types = new String[selection.size()];
final Iterator<ConversionMapping> iter = selection.iterator();
int i = 0;
while (iter.hasNext()) {
t... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"void",
"removeCurrentTypeConversion",
"(",
")",
"{",
"final",
"IStructuredSelection",
"selection",
"=",
"this",
".",
"list",
".",
"getStructuredSelection",
"(",
")",
";",
"final",
"String",
"[",
"]"... | Remove the current type conversion. | [
"Remove",
"the",
"current",
"type",
"conversion",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L468-L479 |
56,791 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.moveSelectionTop | protected void moveSelectionTop() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index > 0) {
final int endIndex = index + selection.size() - 1;
for (int i = 0; i < selection.size(); ++i) {
final C... | java | protected void moveSelectionTop() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index > 0) {
final int endIndex = index + selection.size() - 1;
for (int i = 0; i < selection.size(); ++i) {
final C... | [
"protected",
"void",
"moveSelectionTop",
"(",
")",
"{",
"final",
"IStructuredSelection",
"selection",
"=",
"this",
".",
"list",
".",
"getStructuredSelection",
"(",
")",
";",
"final",
"int",
"index",
"=",
"this",
".",
"conversions",
".",
"indexOf",
"(",
"select... | Move the selection at the top. | [
"Move",
"the",
"selection",
"at",
"the",
"top",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L483-L497 |
56,792 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.moveSelectionUp | protected void moveSelectionUp() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index > 0) {
final ConversionMapping previous = this.conversions.remove(index - 1);
this.conversions.add(index + selectio... | java | protected void moveSelectionUp() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index > 0) {
final ConversionMapping previous = this.conversions.remove(index - 1);
this.conversions.add(index + selectio... | [
"protected",
"void",
"moveSelectionUp",
"(",
")",
"{",
"final",
"IStructuredSelection",
"selection",
"=",
"this",
".",
"list",
".",
"getStructuredSelection",
"(",
")",
";",
"final",
"int",
"index",
"=",
"this",
".",
"conversions",
".",
"indexOf",
"(",
"selecti... | Move the selection up. | [
"Move",
"the",
"selection",
"up",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L501-L512 |
56,793 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.moveSelectionDown | protected void moveSelectionDown() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index >= 0 && (index + selection.size()) < this.conversions.size()) {
final ConversionMapping next = this.conversions.remo... | java | protected void moveSelectionDown() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index >= 0 && (index + selection.size()) < this.conversions.size()) {
final ConversionMapping next = this.conversions.remo... | [
"protected",
"void",
"moveSelectionDown",
"(",
")",
"{",
"final",
"IStructuredSelection",
"selection",
"=",
"this",
".",
"list",
".",
"getStructuredSelection",
"(",
")",
";",
"final",
"int",
"index",
"=",
"this",
".",
"conversions",
".",
"indexOf",
"(",
"selec... | Move the selection down. | [
"Move",
"the",
"selection",
"down",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L516-L527 |
56,794 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.moveSelectionBottom | protected void moveSelectionBottom() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index >= 0 && (index + selection.size()) < this.conversions.size()) {
for (int i = 0; i < selection.size(); ++i) {
f... | java | protected void moveSelectionBottom() {
final IStructuredSelection selection = this.list.getStructuredSelection();
final int index = this.conversions.indexOf(selection.getFirstElement());
if (index >= 0 && (index + selection.size()) < this.conversions.size()) {
for (int i = 0; i < selection.size(); ++i) {
f... | [
"protected",
"void",
"moveSelectionBottom",
"(",
")",
"{",
"final",
"IStructuredSelection",
"selection",
"=",
"this",
".",
"list",
".",
"getStructuredSelection",
"(",
")",
";",
"final",
"int",
"index",
"=",
"this",
".",
"conversions",
".",
"indexOf",
"(",
"sel... | Move the selection at the bottom. | [
"Move",
"the",
"selection",
"at",
"the",
"bottom",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L531-L544 |
56,795 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.removeTypeConversions | protected void removeTypeConversions(String... types) {
for (final String type : types) {
final Iterator<ConversionMapping> iterator = this.conversions.iterator();
while (iterator.hasNext()) {
final ConversionMapping pair = iterator.next();
if (Strings.equal(pair.getSource(), type)) {
iterator.remo... | java | protected void removeTypeConversions(String... types) {
for (final String type : types) {
final Iterator<ConversionMapping> iterator = this.conversions.iterator();
while (iterator.hasNext()) {
final ConversionMapping pair = iterator.next();
if (Strings.equal(pair.getSource(), type)) {
iterator.remo... | [
"protected",
"void",
"removeTypeConversions",
"(",
"String",
"...",
"types",
")",
"{",
"for",
"(",
"final",
"String",
"type",
":",
"types",
")",
"{",
"final",
"Iterator",
"<",
"ConversionMapping",
">",
"iterator",
"=",
"this",
".",
"conversions",
".",
"itera... | Remove the given type conversions.
@param types the type conversions to be removed. | [
"Remove",
"the",
"given",
"type",
"conversions",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L550-L565 |
56,796 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.refreshListUI | protected void refreshListUI() {
final Display display = Display.getDefault();
if (display.getThread().equals(Thread.currentThread())) {
if (!this.list.isBusy()) {
this.list.refresh();
}
} else {
display.syncExec(new Runnable() {
@SuppressWarnings("synthetic-access")
@Override
public void... | java | protected void refreshListUI() {
final Display display = Display.getDefault();
if (display.getThread().equals(Thread.currentThread())) {
if (!this.list.isBusy()) {
this.list.refresh();
}
} else {
display.syncExec(new Runnable() {
@SuppressWarnings("synthetic-access")
@Override
public void... | [
"protected",
"void",
"refreshListUI",
"(",
")",
"{",
"final",
"Display",
"display",
"=",
"Display",
".",
"getDefault",
"(",
")",
";",
"if",
"(",
"display",
".",
"getThread",
"(",
")",
".",
"equals",
"(",
"Thread",
".",
"currentThread",
"(",
")",
")",
"... | Refresh the UI list of type conversions. | [
"Refresh",
"the",
"UI",
"list",
"of",
"type",
"conversions",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L579-L596 |
56,797 | sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java | AbstractConversionTable.sortByTargetColumn | private void sortByTargetColumn() {
this.list.setComparator(new ViewerComparator() {
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
if (e1 != null && e2 != null) {
return e1.toString().compareToIgnoreCase(e2.toString());
}
return super.compare(viewer, e1, e2);
}
@Ov... | java | private void sortByTargetColumn() {
this.list.setComparator(new ViewerComparator() {
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
if (e1 != null && e2 != null) {
return e1.toString().compareToIgnoreCase(e2.toString());
}
return super.compare(viewer, e1, e2);
}
@Ov... | [
"private",
"void",
"sortByTargetColumn",
"(",
")",
"{",
"this",
".",
"list",
".",
"setComparator",
"(",
"new",
"ViewerComparator",
"(",
")",
"{",
"@",
"Override",
"public",
"int",
"compare",
"(",
"Viewer",
"viewer",
",",
"Object",
"e1",
",",
"Object",
"e2"... | Sorts the type conversions by target type. | [
"Sorts",
"the",
"type",
"conversions",
"by",
"target",
"type",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L630-L646 |
56,798 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/BuildSettingWizardPage.java | BuildSettingWizardPage.updateStatus | private void updateStatus(Throwable event) {
Throwable cause = event;
while (cause != null
&& (!(cause instanceof CoreException))
&& cause.getCause() != null
&& cause.getCause() != cause) {
cause = cause.getCause();
}
if (cause instanceof CoreException) {
updateStatus(((CoreException) cause).g... | java | private void updateStatus(Throwable event) {
Throwable cause = event;
while (cause != null
&& (!(cause instanceof CoreException))
&& cause.getCause() != null
&& cause.getCause() != cause) {
cause = cause.getCause();
}
if (cause instanceof CoreException) {
updateStatus(((CoreException) cause).g... | [
"private",
"void",
"updateStatus",
"(",
"Throwable",
"event",
")",
"{",
"Throwable",
"cause",
"=",
"event",
";",
"while",
"(",
"cause",
"!=",
"null",
"&&",
"(",
"!",
"(",
"cause",
"instanceof",
"CoreException",
")",
")",
"&&",
"cause",
".",
"getCause",
"... | Update the status of this page according to the given exception.
@param event the exception. | [
"Update",
"the",
"status",
"of",
"this",
"page",
"according",
"to",
"the",
"given",
"exception",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/BuildSettingWizardPage.java#L193-L213 |
56,799 | sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/BuildSettingWizardPage.java | BuildSettingWizardPage.performFinish | public void performFinish(IProgressMonitor monitor) throws CoreException, InterruptedException {
final SubMonitor subMonitor = SubMonitor.convert(monitor, 4);
try {
monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPageTwo_operation_create, 3);
if (this.currProject == null) {
updateProject(subMonito... | java | public void performFinish(IProgressMonitor monitor) throws CoreException, InterruptedException {
final SubMonitor subMonitor = SubMonitor.convert(monitor, 4);
try {
monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPageTwo_operation_create, 3);
if (this.currProject == null) {
updateProject(subMonito... | [
"public",
"void",
"performFinish",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"CoreException",
",",
"InterruptedException",
"{",
"final",
"SubMonitor",
"subMonitor",
"=",
"SubMonitor",
".",
"convert",
"(",
"monitor",
",",
"4",
")",
";",
"try",
"{",
"moni... | Called from the wizard on finish.
@param monitor the progress monitor
@throws CoreException thrown when the project creation or configuration failed
@throws InterruptedException thrown when the user canceled the project creation | [
"Called",
"from",
"the",
"wizard",
"on",
"finish",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/BuildSettingWizardPage.java#L604-L627 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.