Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Uploader
Commits
a14b41d3
Commit
a14b41d3
authored
Jul 23, 2014
by
Matija Obreza
Browse files
Remember workspace file name
parent
42abdb40
Changes
4
Hide whitespace changes
Inline
Side-by-side
anno-gui/.gitignore
View file @
a14b41d3
/target
/derby.log
anno-gui/pom.xml
View file @
a14b41d3
...
...
@@ -152,7 +152,7 @@
<dependency>
<groupId>
org.genesys2
</groupId>
<artifactId>
client-api
</artifactId>
<version>
0.0.1
-SNAPSHOT
</version>
<version>
0.0.1
</version>
</dependency>
<dependency>
<groupId>
commons-collections
</groupId>
...
...
anno-gui/src/main/java/org/genesys2/anno/gui/AppWindow.java
View file @
a14b41d3
...
...
@@ -240,11 +240,11 @@ public class AppWindow {
AnnotationConfigApplicationContext
ctx
=
new
AnnotationConfigApplicationContext
(
SpringConfig
.
class
);
AppWindow
appWindow
=
(
AppWindow
)
ctx
.
getBean
(
"appWindow"
);
appWindow
.
execute
();
_log
.
info
(
"Closing Spring context"
);
ctx
.
close
();
_log
.
info
(
"All tidied up."
);
// Workaround for hanging derby.rawStoreDeamon
System
.
exit
(
0
);
}
...
...
@@ -611,7 +611,13 @@ public class AppWindow {
FileDialog
dialog
=
new
FileDialog
(
shlGenesysMagic
,
SWT
.
SAVE
);
dialog
.
setFilterNames
(
new
String
[]
{
"JSON Format"
});
dialog
.
setFilterExtensions
(
new
String
[]
{
"*.json"
});
dialog
.
setFileName
(
"workspace.json"
);
if
(
builder
.
getWorkspaceFilename
()
==
null
)
{
dialog
.
setFileName
(
"workspace.json"
);
}
else
{
File
file
=
new
File
(
builder
.
getWorkspaceFilename
());
dialog
.
setFileName
(
file
.
getName
());
dialog
.
setFilterPath
(
file
.
getParent
());
}
String
path
=
dialog
.
open
();
if
(
path
!=
null
)
{
...
...
anno-gui/src/main/java/org/genesys2/anno/gui/DwcaBuilder.java
View file @
a14b41d3
...
...
@@ -36,11 +36,16 @@ import org.json.JSONTokener;
public
class
DwcaBuilder
extends
AbstractModelObject
{
private
List
<
DataSourceFile
>
fileRoots
=
new
ArrayList
<
DataSourceFile
>();
private
String
workspaceFilename
=
null
;
public
List
<
DataSourceFile
>
getFileRoots
()
{
return
fileRoots
;
}
public
String
getWorkspaceFilename
()
{
return
workspaceFilename
;
}
public
void
addDataSource
(
DataSourceFile
dataSource
)
{
if
(
dataSource
==
null
)
return
;
...
...
@@ -133,6 +138,7 @@ public class DwcaBuilder extends AbstractModelObject {
fileWriter
.
close
();
System
.
out
.
println
(
main
.
toString
());
this
.
workspaceFilename
=
filePath
;
}
public
void
loadWorkspace
(
String
filePath
,
Settings
settings
)
throws
FileNotFoundException
,
JSONException
{
...
...
@@ -222,6 +228,7 @@ public class DwcaBuilder extends AbstractModelObject {
settings
.
setOauthSettings
(
oAuthSettings
);
this
.
workspaceFilename
=
filePath
;
}
}
Write
Preview
Supports
Markdown
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