package jalview.io;
import jalview.api.AlignmentViewPanel;
+import jalview.bin.Cache;
import jalview.datamodel.AlignmentExportData;
import jalview.exceptions.NoFileSelectedException;
+import jalview.gui.AlignFrame;
import jalview.json.binding.v1.BioJSReleasePojo;
import jalview.json.binding.v1.BioJSRepositoryPojo;
+import jalview.util.BrowserLauncher;
import jalview.util.MessageManager;
import java.io.BufferedInputStream;
public static final String DEFAULT_DIR = System.getProperty("user.home")
+ File.separatorChar + ".biojs_templates" + File.separatorChar;
- public static final String BJS_TEMPLATES_LOCAL_DIRECTORY = jalview.bin.Cache
+ public static final String BJS_TEMPLATES_LOCAL_DIRECTORY = Cache
.getDefault("biojs_template_directory", DEFAULT_DIR);
- public static final String BJS_TEMPLATE_GIT_REPO = jalview.bin.Cache
+ public static final String BJS_TEMPLATE_GIT_REPO = Cache
.getDefault(
"biojs_template_git_repo",
"https://raw.githubusercontent.com/tcofoegbu/bjs-template/master/package.json");
{
String outputFile = getOutputFile();
// String jalviewAlignmentJson = JSONFile.getJSONData(ap);
- AlignmentExportData exportData = jalview.gui.AlignFrame
+ AlignmentExportData exportData = AlignFrame
.getAlignmentForExport(
JSONFile.FILE_DESC, ap.getAlignViewport());
if (exportData.getSettings().isCancelled())
out.print(generatedBioJsWithJalviewAlignmentAsJson);
out.flush();
out.close();
- jalview.util.BrowserLauncher.openURL("file:///" + outputFile);
+ BrowserLauncher.openURL("file:///" + outputFile);
} catch (NoFileSelectedException ex)
{
// do noting if no file was selected
{
String selectedFile = null;
JalviewFileChooser jvFileChooser = new JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+ Cache.getProperty("LAST_DIRECTORY"), new String[]
{ "html" }, new String[]
{ "HTML files" }, "HTML files");
jvFileChooser.setFileView(new JalviewFileView());
int fileChooserOpt = jvFileChooser.showSaveDialog(null);
if (fileChooserOpt == JalviewFileChooser.APPROVE_OPTION)
{
- jalview.bin.Cache.setProperty("LAST_DIRECTORY", jvFileChooser
+ Cache.setProperty("LAST_DIRECTORY", jvFileChooser
.getSelectedFile().getParent());
selectedFile = jvFileChooser.getSelectedFile().getPath();
}