diff --git a/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/actions/OpenAction.java b/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/actions/OpenAction.java index dac48f9..50a0102 100644 --- a/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/actions/OpenAction.java +++ b/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/actions/OpenAction.java @@ -5,6 +5,7 @@ import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; +import javax.swing.filechooser.FileNameExtensionFilter; import graphicalrefactor.editor.Editor; import graphicalrefactor.views.GraphicalRefactor; @@ -29,6 +30,9 @@ JFileChooser fc = new JFileChooser(wd); + FileFilter model = new FileNameExtensionFilter("model",".model"); + FileFilter dtram = new FileNameExtensionFilter("dtram", ".dtram"); + // Adds file filter for supported file format FileFilter defaultFilter = new FileFilter() { @@ -42,7 +46,10 @@ return null; } }; + fc.addChoosableFileFilter(defaultFilter); + fc.addChoosableFileFilter(model); + fc.addChoosableFileFilter(dtram); int rc = fc.showDialog(null, "Open Model File"); if (rc == JFileChooser.APPROVE_OPTION) { lastDir = fc.getSelectedFile().getParent();