From: miettinen Date: Fri, 28 Feb 2014 12:13:42 +0000 (+0000) Subject: Separate file name extensions for different Sysdyn export files: Models: *.sysdyn... X-Git-Tag: 1.8.1~123 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=5204be37d2f73de34f9052e06f0dbe0fee7f8100;p=simantics%2Fsysdyn.git Separate file name extensions for different Sysdyn export files: Models: *.sysdyn, Modules: *.sysdynModule, Function Libraries: *.sysdynFunctions (refs #4737). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29008 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportFunctionLibrary.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportFunctionLibrary.java index 002abbbd..251ab7a4 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportFunctionLibrary.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportFunctionLibrary.java @@ -85,7 +85,7 @@ public class ExportFunctionLibrary extends AbstractHandler { if(path.isEmpty() || !(new File(path).exists())) path = Platform.getLocation().toOSString(); fd.setFilterPath(path); - String[] filterExt = {"*.tg"}; + String[] filterExt = {"*.sysdynFunctions"}; fd.setFilterExtensions(filterExt); fd.setOverwrite(true); final String selected = fd.open(); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModelHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModelHandler.java index 7bba5ae9..92a5ac8e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModelHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModelHandler.java @@ -235,7 +235,7 @@ public class ExportModelHandler extends AbstractHandler { fd.setFileName(name); fd.setFilterPath(path); - String[] filterExt = {"*.tg"}; + String[] filterExt = {"*.sysdyn"}; fd.setFilterExtensions(filterExt); fd.setOverwrite(true); fullPath = fd.open(); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModuleHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModuleHandler.java index 7d7e7fcf..6a0cc12f 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModuleHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/exports/ExportModuleHandler.java @@ -154,7 +154,7 @@ public class ExportModuleHandler extends AbstractHandler { if(path.isEmpty() || !(new File(path).exists())) path = Platform.getLocation().toOSString(); fd.setFilterPath(path); - String[] filterExt = {"*.tg"}; + String[] filterExt = {"*.sysdynModule"}; fd.setFilterExtensions(filterExt); fd.setOverwrite(true); final String selected = fd.open(); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportFunctionLibrary.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportFunctionLibrary.java index cdd40a04..4e227e73 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportFunctionLibrary.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportFunctionLibrary.java @@ -65,7 +65,7 @@ public class ImportFunctionLibrary extends AbstractHandler { if(path.isEmpty() || !(new File(path).exists())) path = Platform.getLocation().toOSString(); fd.setFilterPath(path); - String[] filterExt = {"*.tg"}; + String[] filterExt = {"*.sysdynFunctions; *.tg", "*.*"}; fd.setFilterExtensions(filterExt); final String selected = fd.open(); if(selected == null) return null; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModelHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModelHandler.java index aba2cf0a..48daeb98 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModelHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModelHandler.java @@ -51,7 +51,7 @@ public class ImportModelHandler extends AbstractHandler { } fd.setFilterPath(path); - String[] filterExt = {"*.tg"}; + String[] filterExt = {"*.sysdyn; *.tg", "*.*"}; fd.setFilterExtensions(filterExt); final String selected = fd.open(); if(selected == null) return null; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModuleHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModuleHandler.java index e4645106..19c40314 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModuleHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/imports/ImportModuleHandler.java @@ -61,12 +61,12 @@ public class ImportModuleHandler extends AbstractHandler { if(path.isEmpty() || !(new File(path).exists())) path = Platform.getLocation().toOSString(); fd.setFilterPath(path); - String[] filterExt = {"*.tg"}; + String[] filterExt = {"*.sysdynModule; *.tg", "*.*"}; fd.setFilterExtensions(filterExt); final String selected = fd.open(); if(selected == null) return null; - Job job = new DatabaseJob("Import model") { + Job job = new DatabaseJob("Import module") { @Override protected IStatus run(IProgressMonitor monitor) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsExportPage.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsExportPage.java index 06b421f2..785df451 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsExportPage.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsExportPage.java @@ -233,7 +233,7 @@ public class WizardFunctionsExportPage extends WizardPage { FileDialog dialog = new FileDialog(shell, SWT.SAVE); - String[] ext = {"*.tg"}; + String[] ext = {"*.sysdynFunctions"}; dialog.setFilterExtensions(ext); dialog.setText("Export Function Library"); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsImportPage.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsImportPage.java index 3e5600ae..702a96cd 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsImportPage.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/functions/WizardFunctionsImportPage.java @@ -227,7 +227,7 @@ public class WizardFunctionsImportPage extends WizardPage{ FileDialog dialog = new FileDialog(shell, SWT.OPEN); - String[] ext = {"*.tg"}; + String[] ext = {"*.sysdynFunctions; *.tg", "*.*"}; dialog.setFilterExtensions(ext); dialog.setText("Import Function Library"); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsExportPage.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsExportPage.java index a7194de6..ae1f0e8e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsExportPage.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsExportPage.java @@ -232,7 +232,7 @@ public class WizardModelsExportPage extends WizardPage { FileDialog dialog = new FileDialog(shell, SWT.SAVE); - String[] ext = {"*.tg"}; + String[] ext = {"*.sysdyn"}; dialog.setFilterExtensions(ext); dialog.setText("Export Model"); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java index 636fd688..e91798ed 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/models/WizardModelsImportPage.java @@ -155,7 +155,7 @@ public class WizardModelsImportPage extends WizardPage{ FileDialog dialog = new FileDialog(shell, SWT.OPEN); - String[] ext = {"*.tg"}; + String[] ext = {"*.sysdyn; *.tg", "*.*"}; dialog.setFilterExtensions(ext); dialog.setText("Import Model"); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesExportPage.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesExportPage.java index d14135a9..3625dd9d 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesExportPage.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesExportPage.java @@ -236,7 +236,7 @@ public class WizardModulesExportPage extends WizardPage { FileDialog dialog = new FileDialog(shell, SWT.SAVE); - String[] ext = {"*.tg"}; + String[] ext = {"*.sysdynModule"}; dialog.setFilterExtensions(ext); dialog.setText("Export Module"); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesImportPage.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesImportPage.java index 65976791..415d02c3 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesImportPage.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/wizards/modules/WizardModulesImportPage.java @@ -229,7 +229,7 @@ public class WizardModulesImportPage extends WizardPage{ FileDialog dialog = new FileDialog(shell, SWT.OPEN); - String[] ext = {"*.tg"}; + String[] ext = {"*.sysdynModule; *.tg", "*.*"}; dialog.setFilterExtensions(ext); dialog.setText("Import Module");