git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a9d3783
)
JAL-3453 removed unused Desktop.instanceOnly
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 24 Oct 2019 14:42:42 +0000
(15:42 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 24 Oct 2019 14:42:42 +0000
(15:42 +0100)
src/jalview/gui/Desktop.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/Desktop.java
b/src/jalview/gui/Desktop.java
index
8b12ca8
..
9e0c89b
100644
(file)
--- a/
src/jalview/gui/Desktop.java
+++ b/
src/jalview/gui/Desktop.java
@@
-227,18
+227,6
@@
public class Desktop extends GDesktop
public JInternalFrame PIDSlider;
public JInternalFrame PIDSlider;
- /**
- * just an instance (for testng, probably); no actual frames
- *
- * This flag, when set true, allows a headless-like operation, with a Desktop
- * object but no actual frames. Though not headless, this option disallows
- * dialogs to run in test environments.
- *
- * It is set by invoking Desktop.getInstanceOnly().
- *
- */
- static boolean instanceOnly;
-
class MyDesktopManager implements DesktopManager
{
class MyDesktopManager implements DesktopManager
{
@@
-377,20
+365,6
@@
public class Desktop extends GDesktop
: (Desktop) ApplicationSingletonProvider
.getInstance(Desktop.class);
}
: (Desktop) ApplicationSingletonProvider
.getInstance(Desktop.class);
}
-
- /**
- * For TestNG, this constructor can be utilized to allow the creation of a
- * singleton Desktop instance with the creation of frames, but no addition to
- * the Desktop object, as in headless mode. Dialogs are not initiated.
- * Cache.log is also initialized for some tests that require it despite there
- * being no Desktop.
- *
- */
- public static Desktop getInstanceOnly()
- {
- instanceOnly = true;
- return getInstance();
- }
/**
* Private constructor enforces singleton pattern. It is called by reflection
/**
* Private constructor enforces singleton pattern. It is called by reflection
@@
-924,9
+898,9
@@
public class Desktop extends GDesktop
}
// THIS IS A PUBLIC STATIC METHOD, SO IT MAY BE CALLED EVEN IN
// A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
}
// THIS IS A PUBLIC STATIC METHOD, SO IT MAY BE CALLED EVEN IN
// A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
- // IF JALVIEW IS RUNNING HEADLESS OR IN INSTANCE-ONLY (testNG) MODE
+ // IF JALVIEW IS RUNNING HEADLESS
// ///////////////////////////////////////////////
// ///////////////////////////////////////////////
- if (Jalview.isHeadlessMode() || Desktop.instanceOnly)
+ if (Jalview.isHeadlessMode())
{
return;
}
{
return;
}
@@
-3309,7
+3283,7
@@
public class Desktop extends GDesktop
{
}
}
{
}
}
- if (instanceOnly || Jalview.isHeadlessMode())
+ if (Jalview.isHeadlessMode())
{
return;
}
{
return;
}