Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
praxis-core
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
praxis
praxis-core
Commits
007ccd19
Commit
007ccd19
authored
8 years ago
by
BIGARET Sebastien
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev', for version 2016.10-1
parents
304c29f4
cef73ff4
No related branches found
No related tags found
No related merge requests found
Pipeline
#115
failed
6 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.externalToolBuilders/ant XMCDA-java.jar.launch
+3
-2
3 additions, 2 deletions
.externalToolBuilders/ant XMCDA-java.jar.launch
CHANGES
+12
-0
12 additions, 0 deletions
CHANGES
src/org/xmcda/ProgramExecutionResult.java
+29
-7
29 additions, 7 deletions
src/org/xmcda/ProgramExecutionResult.java
with
44 additions
and
9 deletions
.externalToolBuilders/ant XMCDA-java.jar.launch
+
3
−
2
View file @
007ccd19
...
...
@@ -13,8 +13,9 @@
<stringAttribute
key=
"org.eclipse.jdt.launching.CLASSPATH_PROVIDER"
value=
"org.eclipse.ant.ui.AntClasspathProvider"
/>
<booleanAttribute
key=
"org.eclipse.jdt.launching.DEFAULT_CLASSPATH"
value=
"true"
/>
<stringAttribute
key=
"org.eclipse.jdt.launching.PROJECT_ATTR"
value=
"XMCDA-java"
/>
<stringAttribute
key=
"org.eclipse.ui.externaltools.ATTR_LOCATION"
value=
"${workspace_loc:/XMCDA-NG/build.xml}"
/>
<booleanAttribute
key=
"org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED"
value=
"true"
/>
<stringAttribute
key=
"org.eclipse.ui.externaltools.ATTR_LOCATION"
value=
"${workspace_loc:/XMCDA-java/build.xml}"
/>
<stringAttribute
key=
"org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS"
value=
"full,incremental,auto,"
/>
<booleanAttribute
key=
"org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED"
value=
"true"
/>
<stringAttribute
key=
"org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY"
value=
"${workspace_loc:/XMCDA-
NG
}"
/>
<stringAttribute
key=
"org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY"
value=
"${workspace_loc:/XMCDA-
java
}"
/>
</launchConfiguration>
This diff is collapsed.
Click to expand it.
CHANGES
0 → 100644
+
12
−
0
View file @
007ccd19
v2016.10-1
----------
- ProgramExecutionResult.Status.exitStatus() semantic changes:it now
returns 0 for both OK and WARNING status, 1 for ERROR and 2 for
TERMINATED.
This allows programs to use it as their own return status,
considering that both OK and WARNING status indicates a valid
execution.
v2016.10
--------
First public release.
This diff is collapsed.
Click to expand it.
src/org/xmcda/ProgramExecutionResult.java
+
29
−
7
View file @
007ccd19
...
...
@@ -8,7 +8,7 @@ import java.util.ArrayList;
* <li>its global {@link #getStatus()} status,</li>
* <li>a list of @{link {@link Message messages}.</li>
* </ul>
* Its status is normally deduced
when the object is buil
t:
* Its status is normally deduced
during the lifespan of this objec
t:
* <ul>
* <li>it starts with the default value OK;</li>
* <li>its seriouness is elevated to WARNING as soon as a warning message is added;</li>
...
...
@@ -19,7 +19,7 @@ import java.util.ArrayList;
* this: {@code OK < WARNING < ERROR < TERMINATED}; its value always goes up, e.g. from OK to ERROR but never fall
* back to a smaller value.<br/>
* <br/>
*The TERMIN
I
ATED value has a special behaviour: it can only be set (or replaced by an other status) by using
*
The TERMINATED value has a special behaviour: it can only be set (or replaced by an other status) by using
* {@link #forceStatus(Status)}. It is intended to signal that the program has been terminated by an external
* mean, when possible (for example after receiving a signal from the operating system, or terminated by the user,
* etc.).
...
...
@@ -32,15 +32,18 @@ public class ProgramExecutionResult
extends
ArrayList
<
Message
>
implements
HasDescription
,
CommonAttributes
,
java
.
io
.
Serializable
,
XMCDARootElement
{
/** This enumerates the statuses that a program execution result
* {@link ProgramExecutionResult#getStatus() can have}.
/**
* This enumerates the statuses that a program execution result {@link ProgramExecutionResult#getStatus() can have}.
* A program can use this to determine its own return status code. Both status {@code OK} and {@code WARNING} means
* that a program's execution is successful, even if a {@code WARNING} status tells that the user may have to
* check the outputs and/or the warning messages issued by the program.
*/
public
static
enum
Status
{
/** Status OK means that neither {@link #addWarning(String)} nor {@link #addError(String)} have been called */
OK
,
/** Status WARNING means that at least a warning has been signaled with {@link #addWarning(String)}, but that
* no {@link #addError(String) errors} have been signal
l
ed. */
* no {@link #addError(String) errors} have been signaled. */
WARNING
,
/** Status ERROR means that at least an error has been signaled with {@link #addError(String)}. */
ERROR
,
...
...
@@ -48,11 +51,30 @@ public class ProgramExecutionResult
* {@link #forceStatus(Status) forceStatus(Status.TERMINATED)} */
TERMINATED
;
/**
* Returns the exit status corresponding to this status. A program typically use this for returning its own exit
* status.
* <ul>
* <li>{@code OK} and {@WARNING} status represents a successful execution, hence the return code is {@code 0}
* (zero),
* <li>{@code ERROR} returns 1,
* <li>{@code TERMINATED} return 2.
*
* @return 0 for {@code OK} and {@code WARNING}, 1 for {@code ERROR} and 2 for {@code TERMINATED}.
*/
public
int
exitStatus
()
{
return
this
.
ordinal
();
switch
(
this
)
{
case
OK:
case
WARNING:
return
0
;
case
ERROR:
return
1
;
case
TERMINATED:
return
2
;
default
:
throw
new
RuntimeException
(
"Unknown status :"
+
this
.
toString
());
}
}
}
;
}
private
static
final
long
serialVersionUID
=
1L
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment