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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
praxis
praxis-core
Commits
e2913893
Commit
e2913893
authored
14 years ago
by
BIGARET Sebastien
Browse files
Options
Downloads
Patches
Plain Diff
Added a transient field 'copiedFromResults' for copy/paste support
(diff -w to view)
parent
97520f2d
Branches
enhancing_results_view
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#63
failed
6 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/eu/telecom_bretagne/praxis/core/workflow/Workflow.java
+7
-1
7 additions, 1 deletion
src/eu/telecom_bretagne/praxis/core/workflow/Workflow.java
src/eu/telecom_bretagne/praxis/core/workflow/WorkflowInput.java
+26
-11
26 additions, 11 deletions
.../telecom_bretagne/praxis/core/workflow/WorkflowInput.java
with
33 additions
and
12 deletions
src/eu/telecom_bretagne/praxis/core/workflow/Workflow.java
+
7
−
1
View file @
e2913893
...
...
@@ -367,13 +367,19 @@ public class Workflow {
@Override
public
Workflow
clone
()
{
Workflow
clone
;
try
{
return
new
Workflow
(
toXMLDocument
(),
new
XMLWarnings
());
clone
=
new
Workflow
(
toXMLDocument
(),
new
XMLWarnings
());
}
catch
(
InvalidXMLException
e
)
{
// Sounds impossible. If this happens, there's something wrong in the implementation itself!
Log
.
log
.
log
(
Level
.
SEVERE
,
"Ooops, unable to clone() ?!!"
,
e
);
return
null
;
}
// when cloned inside the GUI, we should take care of the wf input's copiedFromResults status
// (see comments for this field for details)
for
(
WorkflowInput
input:
this
.
getInputs
())
clone
.
getInputWithId
(
this
.
getIdForInput
(
input
)).
copiedFromResults
=
input
.
copiedFromResults
;
return
clone
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/eu/telecom_bretagne/praxis/core/workflow/WorkflowInput.java
+
26
−
11
View file @
e2913893
...
...
@@ -40,6 +40,13 @@ public class WorkflowInput
protected
transient
ArrayList
<
Parameter
>
parameters
=
new
ArrayList
<
Parameter
>();
/**
* This field is only used to mark the files copied from a result into the clipboard. When pasting such an
* input into a workflow, the file itself should be copied into an other location, so that the original file,
* belonging to a result, is not subject to changes.
*/
public
transient
boolean
copiedFromResults
=
false
;
void
addOutput
(
Parameter
p
)
{
parameters
.
add
(
p
);
...
...
@@ -262,10 +269,18 @@ public class WorkflowInput
propChgSupport
.
firePropertyChange
(
"name"
,
oldName
,
name
);
}
/**
* Sets the content of this object.
* @param content
* the content to set. A {@code null} value is equivalent to the empty array.
*/
public
void
setContent
(
List
<
String
>
content
)
{
if
(
type
==
INPUT_TYPE
.
FILE
||
type
==
INPUT_TYPE
.
DIRECTORY
)
{
List
<
String
>
_filepaths
=
this
.
filepaths
;
if
(
content
==
null
)
filepaths
=
new
ArrayList
<
String
>();
else
filepaths
=
new
ArrayList
<
String
>(
content
);
propChgSupport
.
firePropertyChange
(
"filepaths"
,
_filepaths
,
filepaths
);
}
...
...
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