Skip to content

Commit

Permalink
Added VersionInfo.java property to projectSpace.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfleisch committed Jan 12, 2023
1 parent 887c96d commit c0791c8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public static List<CompoundContainerId> importProject(
List<String> globalFiles = sourceReader.listFiles("*").stream()
.filter(p -> !p.equals(PSLocations.FORMAT) &&
!p.equals(PSLocations.COMPRESSION) &&
!p.equals(PSLocations.VERSION) &&
!p.equals(SummaryLocations.COMPOUND_SUMMARY_ADDUCTS) &&
!p.equals(SummaryLocations.COMPOUND_SUMMARY) &&
!p.equals(SummaryLocations.FORMULA_SUMMARY) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public class ProjectSpaceManager<I extends Instance> implements IterableWithSize
//configure ProjectSpaceProperties
config.defineProjectSpaceProperty(FilenameFormatter.PSProperty.class, new FilenameFormatter.PSPropertySerializer());
config.defineProjectSpaceProperty(CompressionFormat.class, new CompressionFormat.Serializer());
config.defineProjectSpaceProperty(VersionInfo.class, new VersionInfo.Serializer());
//configure compound container
config.registerContainer(CompoundContainer.class, new CompoundContainerSerializer());
config.registerComponent(CompoundContainer.class, ProjectSpaceConfig.class, new ProjectSpaceConfigSerializer());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ public void actionPerformed(ActionEvent e) {
jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
jfc.setAcceptAllFileFilterUsed(false);
jfc.addChoosableFileFilter(new ProjectDirectoryFilter());
jfc.addChoosableFileFilter(new ProjectArchivedFilter());


while (true) {
final int state = jfc.showDialog(MF, "Save As");
Expand All @@ -68,8 +66,6 @@ public void actionPerformed(ActionEvent e) {
if (!selFile.getName().endsWith(".sirius"))
selFile = new File(selFile.getParentFile(),selFile.getName() + ".sirius");



if (!selFile.exists() || selFile.isDirectory() && Objects.requireNonNull(selFile.list()).length == 0) {
SiriusProperties.
setAndStoreInBackground(SiriusProperties.DEFAULT_SAVE_DIR_PATH, selFile.getParentFile().getAbsolutePath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ public void actionPerformed(ActionEvent e) {
jfc.setCurrentDirectory(PropertyManager.getFile(SiriusProperties.DEFAULT_SAVE_FILE_PATH));
jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
jfc.setAcceptAllFileFilterUsed(false);
jfc.addChoosableFileFilter(new ProjectArchivedFilter());
jfc.addChoosableFileFilter(new ProjectDirectoryFilter());
// jfc.setApproveButtonText("Export");

File selectedFile = null;

Expand Down

0 comments on commit c0791c8

Please sign in to comment.