Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uaaltools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
universAAL
uaaltools
Commits
4d6988c2
Commit
4d6988c2
authored
11 years ago
by
Dott. Federico Volpini
Browse files
Options
Downloads
Patches
Plain Diff
added confirm dialog in case of overwriting .uapp file
parent
2f47e053
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mpa/org.universaal.tools.packaging.tool/src/org/universaal/tools/packaging/tool/gui/StartPage.java
+18
-5
18 additions, 5 deletions
...rc/org/universaal/tools/packaging/tool/gui/StartPage.java
with
18 additions
and
5 deletions
mpa/org.universaal.tools.packaging.tool/src/org/universaal/tools/packaging/tool/gui/StartPage.java
+
18
−
5
View file @
4d6988c2
...
...
@@ -30,6 +30,7 @@ import java.util.List;
import
org.codehaus.plexus.util.FileUtils
;
import
org.eclipse.core.resources.IProject
;
import
org.eclipse.jface.dialogs.MessageDialog
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.events.SelectionListener
;
...
...
@@ -155,14 +156,26 @@ public class StartPage extends PageImpl {
Dialog
d
=
new
Dialog
();
destination
=
d
.
open
(
parent
.
getShell
(),
new
String
[]{
"*.uapp"
},
false
,
"UAPP file path..."
);
if
(
destination
!=
null
){
Boolean
overwrite
=
false
;
if
(!
destination
.
getAbsolutePath
().
endsWith
(
".uapp"
))
destination
=
new
File
(
destination
+
".uapp"
);
name
.
setText
(
destination
.
getAbsolutePath
());
if
(
destination
.
isAbsolute
()
&&
parts
.
size
()
>
0
){
setPageComplete
(
true
);
}
File
tmp
=
new
File
(
destination
.
getAbsolutePath
());
if
(
tmp
.
exists
())
{
overwrite
=
MessageDialog
.
openConfirm
(
parent
.
getShell
(),
"File exists!"
,
"The file "
+
destination
.
getAbsolutePath
()+
" already exists.\n\n"
+
"Would you like to overwrite it ?"
);
}
if
(
overwrite
){
name
.
setText
(
destination
.
getAbsolutePath
());
if
(
destination
.
isAbsolute
()
&&
parts
.
size
()
>
0
){
setPageComplete
(
true
);
}
}
else
{
this
.
widgetSelected
(
e
);
}
}
}
...
...
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