Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tlatools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
tlatools
Commits
aadfa28e
Commit
aadfa28e
authored
Apr 11, 2018
by
Markus Alexander Kuppe
Browse files
Options
Downloads
Patches
Plain Diff
Verify that the user provided email address is valid and can be used to
send the model checking result to. [Feature][Toolbox]
parent
91e8f444
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.lamport.tla.toolbox.tool.tlc.ui/src/org/lamport/tla/toolbox/tool/tlc/ui/editor/page/MainModelPage.java
+23
-0
23 additions, 0 deletions
...rt/tla/toolbox/tool/tlc/ui/editor/page/MainModelPage.java
with
23 additions
and
0 deletions
org.lamport.tla.toolbox.tool.tlc.ui/src/org/lamport/tla/toolbox/tool/tlc/ui/editor/page/MainModelPage.java
+
23
−
0
View file @
aadfa28e
...
...
@@ -742,6 +742,29 @@ public class MainModelPage extends BasicFormPage implements IConfigurationConsta
}
}
// Verify that the user provided email address is valid and can be used to send
// the model checking result to.
if
(
this
.
distributedCombo
.
getSelectionIndex
()
>
1
)
{
final
String
text
=
resultMailAddressText
.
getText
();
try
{
javax
.
mail
.
internet
.
InternetAddress
.
parse
(
text
,
true
);
}
catch
(
javax
.
mail
.
internet
.
AddressException
exp
)
{
modelEditor
.
addErrorMessage
(
"email address invalid"
,
"For Cloud TLC to work please enter a valid email address."
,
this
.
getId
(),
IMessageProvider
.
ERROR
,
UIHelper
.
getWidget
(
dm
.
getAttributeControl
(
LAUNCH_DISTRIBUTED_RESULT_MAIL_ADDRESS
)));
setComplete
(
false
);
expandSection
(
SEC_HOW_TO_RUN
);
}
if
(
""
.
equals
(
text
.
trim
()))
{
modelEditor
.
addErrorMessage
(
"email address missing"
,
"For Cloud TLC to work please enter an email address."
,
this
.
getId
(),
IMessageProvider
.
ERROR
,
UIHelper
.
getWidget
(
dm
.
getAttributeControl
(
LAUNCH_DISTRIBUTED_RESULT_MAIL_ADDRESS
)));
setComplete
(
false
);
expandSection
(
SEC_HOW_TO_RUN
);
}
}
mm
.
setAutoUpdate
(
true
);
super
.
validatePage
(
switchToErrorPage
);
...
...
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