Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bonita
bonita-studio
Commits
5fc5a75a
Commit
5fc5a75a
authored
Sep 09, 2015
by
rbioteau
Browse files
BS-14177
Do not delete folder (only files) when applying a look n feel
parent
27b7ea65
Changes
1
Hide whitespace changes
Inline
Side-by-side
bundles/plugins/org.bonitasoft.studio.diagram.custom/src/org/bonitasoft/studio/diagram/custom/repository/ApplicationResourceFileStore.java
View file @
5fc5a75a
...
...
@@ -36,6 +36,7 @@ import org.bonitasoft.studio.pics.Pics;
import
org.eclipse.core.resources.IFile
;
import
org.eclipse.core.resources.IFolder
;
import
org.eclipse.core.resources.IResource
;
import
org.eclipse.core.resources.IResourceVisitor
;
import
org.eclipse.core.runtime.CoreException
;
import
org.eclipse.core.runtime.IProgressMonitor
;
import
org.eclipse.core.runtime.Path
;
...
...
@@ -495,9 +496,17 @@ public class ApplicationResourceFileStore extends AbstractFileStore implements I
public
void
clear
()
{
try
{
for
(
final
IResource
toDelete
:
getResourcesApplicationFolder
().
members
())
{
toDelete
.
delete
(
true
,
Repository
.
NULL_PROGRESS_MONITOR
);
}
getResourcesApplicationFolder
().
accept
(
new
IResourceVisitor
()
{
@Override
public
boolean
visit
(
IResource
resource
)
throws
CoreException
{
if
(
resource
instanceof
IFile
)
{
resource
.
delete
(
true
,
Repository
.
NULL_PROGRESS_MONITOR
);
BonitaStudioLog
.
debug
(
resource
.
getName
()
+
" has been deleted."
,
Activator
.
PLUGIN_ID
);
}
return
true
;
}
});
deleteIfExists
(
getConfirmationTemplate
());
deleteIfExists
(
getConsultationTemplate
());
deleteIfExists
(
getErrorTemplate
());
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment