String usrPropsFile = aparser.getValue(ArgsParser.PROPS);
Cache.loadProperties(usrPropsFile);
+
+ if (aparser.contains(ArgsParser.NODISPLAY)
+ || aparser.contains(ArgsParser.NOGUI)
+ || aparser.contains(ArgsParser.HEADLESS)
+ || "true".equals(System.getProperty("java.awt.headless")))
+ {
+ headless = true;
+ }
+
if (isJS)
{
isJavaAppletTag = aparser.isApplet();
showUsage();
System.exit(0);
}
- if (aparser.contains(ArgsParser.NODISPLAY)
- || aparser.contains(ArgsParser.NOGUI)
- || aparser.contains(ArgsParser.HEADLESS)
- || "true".equals(System.getProperty("java.awt.headless")))
- {
- headless = true;
- }
+
// anything else!
try
{
- if (Platform.isWin())
+ if (!isJS && Platform.isWin())
{
UIManager.setLookAndFeel(
headless ? "javax.swing.plaf.metal.MetalLookAndFeel"
+ "] executed successfully!");
groovyscript = null;
}
- checkOutputFile(aparser, af, format);
while (aparser.getSize() > 0)
{
System.out.println("Unknown arg: " + aparser.nextValue());
}
}
+ checkOutputFile(aparser, af, format);
}
}
AlignFrame startUpAlframe = null;
*/
if (align != null)
{
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerMappings(align.getCodonFrames());
}
List<AlignedCodonFrame> mappings = al.getCodonFrames();
if (mappings != null)
{
- StructureSelectionManager ssm = Desktop.getInstance()
+ StructureSelectionManager ssm = Desktop
.getStructureSelectionManager();
for (AlignedCodonFrame acf : mappings)
{
@Override
public void sendSelection()
{
- Desktop.getInstance().getStructureSelectionManager().sendSelection(
+ Desktop.getStructureSelectionManager().sendSelection(
new SequenceGroup(getSelectionGroup()),
new ColumnSelection(getColumnSelection()),
new HiddenColumns(getAlignment().getHiddenColumns()), this);
@Override
public StructureSelectionManager getStructureSelectionManager()
{
- return Desktop.getInstance().getStructureSelectionManager();
+ return Desktop.getStructureSelectionManager();
}
@Override
{
PDBEntry entry = new PDBEntry();
StructureFile pdbfile = null;
- pdbfile = Desktop.getInstance().getStructureSelectionManager()
+ pdbfile = Desktop.getStructureSelectionManager()
.setMapping(false, new SequenceI[]
{ sequence }, null, fileName, type);
if (pdbfile == null)
* register any new mappings for sequence mouseover etc
* (will not duplicate any previously registered mappings)
*/
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerMappings(dataset.getCodonFrames());
if (copyAlignment.getHeight() <= 0)
// A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
// IF JALVIEW IS RUNNING HEADLESS
// ///////////////////////////////////////////////
- if (Desktop.getInstance().instanceOnly || Jalview.isHeadlessMode())
+ if (Jalview.isHeadlessMode() || Desktop.getInstance().instanceOnly)
{
return;
}
{
// TODO if CommandListener is only ever 1:1 for complementary views,
// may change broadcast pattern to direct messaging (more efficient)
- final StructureSelectionManager ssm = Desktop.getInstance()
+ final StructureSelectionManager ssm = Desktop
.getStructureSelectionManager();
ssm.addCommandListener(((AlignFrame) getTopFrame()).getViewport());
ssm.addCommandListener(((AlignFrame) getBottomFrame()).getViewport());
*/
adjustLayout();
- final StructureSelectionManager ssm = Desktop.getInstance()
+ final StructureSelectionManager ssm = Desktop
.getStructureSelectionManager();
ssm.addCommandListener(newTopPanel.av);
ssm.addCommandListener(newBottomPanel.av);
try
{
IPickManager pm = vclient.getPickManager();
- StructureSelectionManager ssm = Desktop.getInstance()
+ StructureSelectionManager ssm = Desktop
.getStructureSelectionManager();
VamsasApplication me = this;
pm.registerMessageHandler(new IMessageHandler()
{
// register PDB entries with desktop's structure selection
// manager
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerPDBEntry(pdbe);
}
}
// active
if (mappings != null)
{
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerMappings(mappings);
}
}
acf.addMap(from, to, mapping);
}
bindjvvobj(mapping, sequenceMapping);
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerMapping(acf);
// Try to link up any conjugate database references in the two sequences
// matchConjugateDBRefs(from, to, mapping);
{
if (ds.getCodonFrames() != null)
{
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerMappings(ds.getCodonFrames());
}
}
{
entry.setProperty(prop.getName(), prop.getValue());
}
- Desktop.getInstance().getStructureSelectionManager()
+ Desktop.getStructureSelectionManager()
.registerPDBEntry(entry);
// adds PDBEntry to datasequence's set (since Jalview 2.10)
if (al.getSequenceAt(i).getDatasetSequence() != null)
String cmds = "nodisplay -open examples/uniref50.fa -sortbytree -props test/jalview/io/testProps.jvprops -colour zappo "
+ "-jabaws http://www.compbio.dundee.ac.uk/jabaws -nosortbytree "
+ "-features examples/testdata/plantfdx.features -annotations examples/testdata/plantfdx.annotations -tree examples/testdata/uniref50_test_tree";
+ System.out.println("CommandLine test " + ++ntest);
Worker worker = getJalviewDesktopRunner(true, cmds, SETUP_TIMEOUT);
String ln = null;
while ((ln = worker.getOutputReader().readLine()) != null)
{
System.err.println(ln);
}
+
}
+ int ntest = 0;
+
@BeforeTest(alwaysRun = true)
public void setUpForCommandLineInputOperations() throws IOException
{
int timeout)
{
String cmd = harg + type + " " + fileName;
- // System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd);
+ System.out.println(">>>>>>>>>>>>>>>> Command : " + cmd);
File file = new File(fileName);
file.deleteOnExit();
Worker worker = getJalviewDesktopRunner(withAWT, cmd, timeout);
/*
* remove any sequence mappings left lying around by other tests
*/
- Desktop.getInstance().getStructureSelectionManager().resetAll();
+ Desktop.getStructureSelectionManager().resetAll();
}
@BeforeMethod(alwaysRun = true)