* It is set by invoking Desktop.getInstanceOnly().
*
*/
- boolean instanceOnly;
+ static boolean instanceOnly;
class MyDesktopManager implements DesktopManager
{
*/
public static Desktop getInstanceOnly()
{
- Desktop d = (Desktop) ApplicationSingletonProvider
- .getInstance(Desktop.class);
- d.instanceOnly = true;
- return d;
+ instanceOnly = true;
+ return getInstance();
}
/**
* Private constructor enforces singleton pattern. It is called by reflection
* from ApplicationSingletonProvider.getInstance().
*/
- @SuppressWarnings("unused")
private Desktop()
{
Cache.initLogger();
// A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
// IF JALVIEW IS RUNNING HEADLESS OR IN INSTANCE-ONLY (testNG) MODE
// ///////////////////////////////////////////////
- if (Jalview.isHeadlessMode() || Desktop.getInstance().instanceOnly)
+ if (Jalview.isHeadlessMode() || Desktop.instanceOnly)
{
return;
}