Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
bonita
bonita-studio
Commits
5c7e606d
Commit
5c7e606d
authored
Oct 31, 2018
by
Romain Bioteau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue with worksapce api
parent
e3c89445
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
6 deletions
+25
-6
bundles/plugins/org.bonitasoft.studio.designer/src/org/bonitasoft/studio/designer/core/UIDesignerServerManager.java
...itasoft/studio/designer/core/UIDesignerServerManager.java
+1
-1
bundles/plugins/org.bonitasoft.studio.designer/src/org/bonitasoft/studio/designer/core/repository/MigrateUIDOperation.java
.../studio/designer/core/repository/MigrateUIDOperation.java
+23
-4
bundles/plugins/org.bonitasoft.studio.groovy.ui/src/org/bonitasoft/studio/groovy/ui/providers/AbstractGroovyScriptConfigurationSynchronizer.java
...viders/AbstractGroovyScriptConfigurationSynchronizer.java
+1
-1
No files found.
bundles/plugins/org.bonitasoft.studio.designer/src/org/bonitasoft/studio/designer/core/UIDesignerServerManager.java
View file @
5c7e606d
...
...
@@ -134,7 +134,7 @@ public class UIDesignerServerManager implements IBonitaProjectListener {
waitForUID
(
pageDesignerURLBuilder
);
BonitaStudioLog
.
info
(
String
.
format
(
"UI Designer has been started on http://localhost:%s/bonita"
,
port
),
UIDesignerPlugin
.
PLUGIN_ID
);
new
MigrateUIDOperation
().
run
(
monitor
);
new
MigrateUIDOperation
(
pageDesignerURLBuilder
).
run
(
monitor
);
}
catch
(
final
CoreException
|
IOException
|
InvocationTargetException
|
InterruptedException
e
)
{
BonitaStudioLog
.
error
(
"Failed to run ui designer war"
,
e
);
}
finally
{
...
...
bundles/plugins/org.bonitasoft.studio.designer/src/org/bonitasoft/studio/designer/core/repository/MigrateUIDOperation.java
View file @
5c7e606d
...
...
@@ -16,6 +16,7 @@ package org.bonitasoft.studio.designer.core.repository;
import
java.lang.reflect.InvocationTargetException
;
import
java.net.MalformedURLException
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
org.bonitasoft.studio.designer.core.PageDesignerURLFactory
;
...
...
@@ -34,18 +35,36 @@ import org.restlet.resource.ResourceException;
public
class
MigrateUIDOperation
implements
IRunnableWithProgress
{
private
PageDesignerURLFactory
pageDesignerURLBuilder
;
public
MigrateUIDOperation
(
PageDesignerURLFactory
pageDesignerURLBuilder
)
{
this
.
pageDesignerURLBuilder
=
pageDesignerURLBuilder
;
}
public
MigrateUIDOperation
()
{
}
@Override
public
void
run
(
IProgressMonitor
monitor
)
throws
InvocationTargetException
,
InterruptedException
{
monitor
.
subTask
(
Messages
.
migratingUID
);
PageDesignerURLFactory
urlBuilder
=
pageDesignerURLBuilder
==
null
?
new
PageDesignerURLFactory
(
getPreferenceStore
())
:
pageDesignerURLBuilder
;
URI
uri
=
null
;
try
{
uri
=
urlBuilder
.
migrate
().
toURI
();
}
catch
(
MalformedURLException
|
URISyntaxException
e1
)
{
throw
new
InvocationTargetException
(
new
MigrationException
(
e1
));
}
try
{
ClientResource
clientResource
=
new
ClientResource
(
new
PageDesignerURLFactory
(
getPreferenceStore
()).
migrate
().
toURI
());
ClientResource
clientResource
=
new
ClientResource
(
uri
);
clientResource
.
setRetryOnError
(
true
);
clientResource
.
setRetryDelay
(
500
);
clientResource
.
setRetryAttempts
(
10
);
clientResource
.
post
(
new
EmptyRepresentation
());
}
catch
(
MalformedURLException
|
URISyntaxException
|
ResourceException
e
)
{
throw
new
InvocationTargetException
(
new
MigrationException
(
e
));
}
catch
(
ResourceException
e
)
{
throw
new
InvocationTargetException
(
new
MigrationException
(
e
),
"Failed to post on "
+
uri
);
}
}
...
...
bundles/plugins/org.bonitasoft.studio.groovy.ui/src/org/bonitasoft/studio/groovy/ui/providers/AbstractGroovyScriptConfigurationSynchronizer.java
View file @
5c7e606d
...
...
@@ -119,7 +119,7 @@ public abstract class AbstractGroovyScriptConfigurationSynchronizer implements I
FragmentContainer
container
=
getContainer
(
configuration
);
for
(
Fragment
f
:
container
.
getFragments
())
{
IResource
member
=
srcFolder
.
findMember
(
Path
.
fromOSString
(
f
.
getValue
()));
if
(!
member
.
exists
())
{
if
(
member
==
null
||
!
member
.
exists
())
{
cc
.
append
(
RemoveCommand
.
create
(
editingDomain
,
container
,
ConfigurationPackage
.
Literals
.
FRAGMENT_CONTAINER__FRAGMENTS
,
f
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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