public class Jammy
extends org.eclipse.ui.plugin.AbstractUIPlugin
Modifier and Type | Field and Description |
---|---|
static java.lang.Object[] |
CHILDLESS
Empty object array in order to avoid empty array allocation duplication.
|
private static java.lang.String |
CONTEST_STATE |
private java.util.List<IContestSelectionListener> |
contestListeners |
private ContestInfo |
currentContest |
private Problem |
currentProblem |
private java.util.Map<java.lang.String,ILanguageManager> |
managers |
private static Jammy |
plugin
Plug-in instance.
|
static java.lang.String |
PLUGIN_ID
Plug-in ID.
|
private java.util.List<IProblemSelectionListener> |
problemListeners |
Constructor and Description |
---|
Jammy()
The constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addContestSelectionListener(IContestSelectionListener listener)
Adds the given
IContestSelectionListener to the listener list. |
void |
addProblemSelectionListener(IProblemSelectionListener listener)
Adds the given
IProblemSelectionListener to the listener list. |
private void |
fireContestSelectionChanged()
Notifies all
IContestSelectionListener instance
registered that the current round has changed. |
private void |
fireProblemSelectionChanged()
Notifies all
IProblemSelectionListener instance
registered that the current problem has changed. |
java.util.Optional<ContestInfo> |
getCurrentContest() |
ILanguageManager |
getCurrentLanguageManager() |
java.util.Optional<Problem> |
getCurrentProblem() |
static Jammy |
getDefault()
Returns the shared instance
|
java.util.Set<java.lang.String> |
getLanguages() |
private void |
loadManagers() |
private void |
loadState() |
void |
removeContestSelectionListener(IContestSelectionListener listener)
Removes the given
IContestSelectionListener of the listener list. |
void |
removeProblemSelectionListener(IProblemSelectionListener listener)
Removes the given
IProblemSelectionListener of the listener list. |
private void |
saveState() |
void |
setCurrentProblem(Problem problem) |
void |
setCurrentRound(Round round) |
void |
start(org.osgi.framework.BundleContext context) |
void |
stop(org.osgi.framework.BundleContext context) |
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
public static final java.lang.String PLUGIN_ID
private static Jammy plugin
public static final java.lang.Object[] CHILDLESS
private ContestInfo currentContest
private Problem currentProblem
private final java.util.List<IContestSelectionListener> contestListeners
private final java.util.List<IProblemSelectionListener> problemListeners
private final java.util.Map<java.lang.String,ILanguageManager> managers
private static final java.lang.String CONTEST_STATE
public void addContestSelectionListener(IContestSelectionListener listener)
IContestSelectionListener
to the listener list.listener
- Listener instance to register.public void removeContestSelectionListener(IContestSelectionListener listener)
IContestSelectionListener
of the listener list.listener
- Listener instance to unregisterpublic void addProblemSelectionListener(IProblemSelectionListener listener)
IProblemSelectionListener
to the listener list.listener
- Listener instance to register.public void removeProblemSelectionListener(IProblemSelectionListener listener)
IProblemSelectionListener
of the listener list.listener
- Listener instance to unregisterprivate void fireContestSelectionChanged()
IContestSelectionListener
instance
registered that the current round has changed.private void fireProblemSelectionChanged()
IProblemSelectionListener
instance
registered that the current problem has changed.public void setCurrentRound(Round round)
round
- public void setCurrentProblem(Problem problem)
problem
- public java.util.Optional<ContestInfo> getCurrentContest()
public java.util.Optional<Problem> getCurrentProblem()
private void loadState()
private void saveState()
private void loadManagers()
public ILanguageManager getCurrentLanguageManager()
public java.util.Set<java.lang.String> getLanguages()
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception
start
in interface org.osgi.framework.BundleActivator
start
in class org.eclipse.ui.plugin.AbstractUIPlugin
java.lang.Exception
public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception
stop
in interface org.osgi.framework.BundleActivator
stop
in class org.eclipse.ui.plugin.AbstractUIPlugin
java.lang.Exception
public static Jammy getDefault()