MetaDone
metadone.client.MainClientMetadone Class Reference
Inheritance diagram for metadone.client.MainClientMetadone:
Collaboration diagram for metadone.client.MainClientMetadone:

List of all members.

Classes

class  BusinessManagerSubscriber
class  NotificationSubscriber
class  QuestionSubscriber

Public Types

enum  ClientState {
  STARTING, READY, CONNECTED, PROJECT_OPENED,
  QUIT
}

Public Member Functions

 MainClientMetadone (Properties properties)
void close ()
ClientState getClientState ()
String toString ()
MetadoneDesktopPane getDesktopPane ()
final void warning (boolean synchronous, String msg)
void warning (boolean synchronous, String msg, Throwable th)
final void error (boolean synchronous, String msg)
void error (boolean synchronous, String msg, Throwable th)
void inform (String msg)
final synchronized void setWorkspace (Workspace workspace)
final Workspace getWorkspace ()
final BusinessManager getBusinessManager ()
void setBusinessManager (final BusinessManager businessManager)
MetadoneEvents getEventManager ()
GrasylaFactoryStore getGrasylaFactories ()
User getUser ()
BundleContext getBundleContext ()
synchronized void setBundleContext (BundleContext bundleContext)
synchronized void addPlugin (final MetadonePlugin plugin)
synchronized void removePlugin (final MetadonePlugin plugin)
final Properties getGlobalProperties ()
Project getProject ()

Static Public Member Functions

static Properties getProperties (String filename)
static final MainClientMetadone getSingleton ()
static synchronized final
MainClientMetadone 
initializeSingleton (Properties properties)

Static Public Attributes

static final Comparator
< JMenuItem > 
MENU_COMPARATOR
static final String DEFAULT_REPOSITORY = "DEFAULT_REPOSITORY"

Protected Member Functions

void initalizeWorkspace (Workspace workspace) throws BadPreCondition
synchronized void reactivatePlugin (final MetadonePlugin plugin)
synchronized void reactivatePlugins ()

Package Functions

boolean isTestingVersion ()

Static Package Functions

 [static initializer]

Private Member Functions

void setUIFont (FontUIResource fontUIResource)
void createMenuBar ()
void createToolLog (Object constraint)
void enableActions (Collection< Action > actions)
void changeState (ClientState st)
void updatePluginsMenu ()
synchronized void setBusinessManagerRun (final BusinessManager businessManager)
synchronized void reorderPluginMenu ()

Static Private Member Functions

static final Action registerAction (Action action)

Private Attributes

volatile Workspace workspace = null
volatile BundleContext bundleContext = null
volatile BusinessManager businessManager = null
volatile ClientState state
JMenuBar MainMenuBar
JLogger LoggerPanel
final MetadoneDesktopPane desktopPane
final GrasylaFactoryStore grasylaFactories = new GrasylaFactoryStore()
Set< MetadonePluginplugins = new HashSet<MetadonePlugin>()
JMenu pluginMenu
Map< MetadonePlugin, JMenuItem > pluginMenuMap = new HashMap<MetadonePlugin, JMenuItem>()
int pluginMenuFixCount = 0
final Properties globalProperties
final NotificationSubscriber subscriberNotif = new NotificationSubscriber()
final QuestionSubscriber subscriberQuestion = new QuestionSubscriber()
final BusinessManagerSubscriber subscriberBM = new BusinessManagerSubscriber()

Static Private Attributes

static final long serialVersionUID = 1L
static final Logger logger = Logger.getLogger(MainClientMetadone.class)
static final Collection< Action > ALL_ACTIONS = new HashSet<Action>()
static final Action ACTION_ABOUT = registerAction(new AboutAction())
static final Action ACTION_HELP = registerAction(new HelpAction())
static final Action ACTION_BROWSEMETAL2 = registerAction(new Browsemetal2Action())
static final Action ACTION_BROWSEMETAL1 = registerAction(new Browsemetal1Action())
static final Action ACTION_TEST3 = registerAction(new Test3Action())
static final Action ACTION_TEST4 = registerAction(new Test4Action())
static final Action ACTION_RETRODOC = registerAction(new RetroDocAction())
static final Action ACTION_UNDO = registerAction(new UndoRedoAction(true))
static final Action ACTION_REDO = registerAction(new UndoRedoAction(false))
static final Action ACTION_PASTE = registerAction(new PasteAction())
static final Action ACTION_CUT = registerAction(new CutAction())
static final Action ACTION_COPY = registerAction(new CopyAction())
static final Action ACTION_QUIT = registerAction(new QuitAction())
static final Action ACTION_CONFIGURE = registerAction(new ConfigureAction())
static final Action ACTION_CLOSE_PROJECT = registerAction(new CloseProjectAction())
static final Action ACTION_CLOSE_DATABASE = registerAction(new CloseDatabaseAction())
static final Action ACTION_ROLLBACK = registerAction(new RollbackAction())
static final Action ACTION_COMMIT = registerAction(new CommitAction())
static final Action ACTION_OPEN_PROJECT = registerAction(new OpenProjectAction())
static final Action ACTION_CONNECT = registerAction(new ConnectAction())
static final Action ACTION_TEST1 = registerAction(new Test1Action())
static final Action ACTION_OPEN_OMEGA_MODEL = registerAction(new OpenOmegaModel())
static final Action ACTION_TEST2 = registerAction(new Test2Action())
static final Action ACTION_TEST5 = registerAction(new Test5Action())
static final Action ACTION_TEST6 = registerAction(new Test6Action())
static final Action ACTION_ECORE = registerAction(new Test_ECORE_Action())
static final Action ACTION_VISUALIZE_META_MODEL = registerAction(new VisualizeMetaModelAction())
static final Action ACTION_CREATE_META_CLASS = registerAction(new CreateMetaThingAction())
static final Action ACTION_CREATE_CONCRETE_MODEL = registerAction(new ConcreteModelCreateAction())
static final Action ACTION_VISUALIZE_MODEL = registerAction(new VisualizeModelAction())
static final Action ACTION_PLUGINS = registerAction(new PluginsAction())
static final Action ACTION_IMPORT = registerAction(new ImportModelAction())
static final Action ACTION_OPEN_GRASYLA = registerAction(new OpenGrasylaScriptAction())
static final Action ACTION_PRINT_METAMODEL = registerAction(new PrintOmegaMetaModel())
static final Action ACTION_ONTOLOGY_IMPORT = registerAction(new OntologyImportAction())
static final Action ACTION_SETSYMPATHICNAME = registerAction(new SetSympathicExpressionAction())
static volatile MainClientMetadone singleton = null

Member Enumeration Documentation

The meaningful events from the menu point of view

Enumerator:
STARTING 
READY 
CONNECTED 
PROJECT_OPENED 
QUIT 

Constructor & Destructor Documentation


Member Function Documentation

metadone.client.MainClientMetadone.[static initializer] ( ) [static, package]
void metadone.client.MainClientMetadone.changeState ( ClientState  st) [private]

References metadone.client.MainClientMetadone.ACTION_ABOUT, metadone.client.MainClientMetadone.ACTION_BROWSEMETAL1, metadone.client.MainClientMetadone.ACTION_BROWSEMETAL2, metadone.client.MainClientMetadone.ACTION_CLOSE_DATABASE, metadone.client.MainClientMetadone.ACTION_CLOSE_PROJECT, metadone.client.MainClientMetadone.ACTION_COMMIT, metadone.client.MainClientMetadone.ACTION_CONFIGURE, metadone.client.MainClientMetadone.ACTION_CONNECT, metadone.client.MainClientMetadone.ACTION_CREATE_CONCRETE_MODEL, metadone.client.MainClientMetadone.ACTION_CREATE_META_CLASS, metadone.client.MainClientMetadone.ACTION_ECORE, metadone.client.MainClientMetadone.ACTION_HELP, metadone.client.MainClientMetadone.ACTION_IMPORT, metadone.client.MainClientMetadone.ACTION_ONTOLOGY_IMPORT, metadone.client.MainClientMetadone.ACTION_OPEN_GRASYLA, metadone.client.MainClientMetadone.ACTION_OPEN_OMEGA_MODEL, metadone.client.MainClientMetadone.ACTION_OPEN_PROJECT, metadone.client.MainClientMetadone.ACTION_PRINT_METAMODEL, metadone.client.MainClientMetadone.ACTION_QUIT, metadone.client.MainClientMetadone.ACTION_REDO, metadone.client.MainClientMetadone.ACTION_RETRODOC, metadone.client.MainClientMetadone.ACTION_SETSYMPATHICNAME, metadone.client.MainClientMetadone.ACTION_TEST1, metadone.client.MainClientMetadone.ACTION_TEST2, metadone.client.MainClientMetadone.ACTION_TEST3, metadone.client.MainClientMetadone.ACTION_TEST4, metadone.client.MainClientMetadone.ACTION_TEST5, metadone.client.MainClientMetadone.ACTION_TEST6, metadone.client.MainClientMetadone.ACTION_UNDO, metadone.client.MainClientMetadone.ACTION_VISUALIZE_META_MODEL, metadone.client.MainClientMetadone.ACTION_VISUALIZE_MODEL, metadone.client.MainClientMetadone.enableActions(), metadone.client.MainClientMetadone.getEventManager(), metadone.client.MainClientMetadone.logger, metadone.client.MainClientMetadone.state, metadone.client.MainClientMetadone.subscriberBM, metadone.client.MainClientMetadone.subscriberNotif, metadone.client.MainClientMetadone.subscriberQuestion, metadone.metabusiness.events.MetadoneEvents.trigger(), and metadone.client.MainClientMetadone.updatePluginsMenu().

Referenced by metadone.client.MainClientMetadone.MainClientMetadone(), metadone.client.MainClientMetadone.setBusinessManagerRun(), metadone.client.MainClientMetadone.setWorkspace(), and metadone.client.MainClientMetadone.BusinessManagerSubscriber.trigger().

void metadone.client.MainClientMetadone.createMenuBar ( ) [private]

References metadone.client.MainClientMetadone.ACTION_ABOUT, metadone.client.MainClientMetadone.ACTION_BROWSEMETAL1, metadone.client.MainClientMetadone.ACTION_BROWSEMETAL2, metadone.client.MainClientMetadone.ACTION_CLOSE_DATABASE, metadone.client.MainClientMetadone.ACTION_CLOSE_PROJECT, metadone.client.MainClientMetadone.ACTION_COMMIT, metadone.client.MainClientMetadone.ACTION_CONFIGURE, metadone.client.MainClientMetadone.ACTION_CONNECT, metadone.client.MainClientMetadone.ACTION_COPY, metadone.client.MainClientMetadone.ACTION_CREATE_CONCRETE_MODEL, metadone.client.MainClientMetadone.ACTION_CREATE_META_CLASS, metadone.client.MainClientMetadone.ACTION_CUT, metadone.client.MainClientMetadone.ACTION_ECORE, metadone.client.MainClientMetadone.ACTION_HELP, metadone.client.MainClientMetadone.ACTION_IMPORT, metadone.client.MainClientMetadone.ACTION_ONTOLOGY_IMPORT, metadone.client.MainClientMetadone.ACTION_OPEN_GRASYLA, metadone.client.MainClientMetadone.ACTION_OPEN_OMEGA_MODEL, metadone.client.MainClientMetadone.ACTION_OPEN_PROJECT, metadone.client.MainClientMetadone.ACTION_PASTE, metadone.client.MainClientMetadone.ACTION_PLUGINS, metadone.client.MainClientMetadone.ACTION_PRINT_METAMODEL, metadone.client.MainClientMetadone.ACTION_QUIT, metadone.client.MainClientMetadone.ACTION_REDO, metadone.client.MainClientMetadone.ACTION_RETRODOC, metadone.client.MainClientMetadone.ACTION_ROLLBACK, metadone.client.MainClientMetadone.ACTION_SETSYMPATHICNAME, metadone.client.MainClientMetadone.ACTION_TEST1, metadone.client.MainClientMetadone.ACTION_TEST2, metadone.client.MainClientMetadone.ACTION_TEST3, metadone.client.MainClientMetadone.ACTION_TEST4, metadone.client.MainClientMetadone.ACTION_TEST5, metadone.client.MainClientMetadone.ACTION_TEST6, metadone.client.MainClientMetadone.ACTION_UNDO, metadone.client.MainClientMetadone.ACTION_VISUALIZE_META_MODEL, metadone.client.MainClientMetadone.ACTION_VISUALIZE_MODEL, metadone.client.MainClientMetadone.getDesktopPane(), metadone.client.MetadoneDesktopPane.getModelMenu(), metadone.client.MainClientMetadone.isTestingVersion(), metadone.client.MainClientMetadone.MainMenuBar, metadone.client.MainClientMetadone.pluginMenu, metadone.client.MainClientMetadone.pluginMenuFixCount, and metadone.client.MainClientMetadone.updatePluginsMenu().

Referenced by metadone.client.MainClientMetadone.MainClientMetadone().

void metadone.client.MainClientMetadone.createToolLog ( Object  constraint) [private]
void metadone.client.MainClientMetadone.enableActions ( Collection< Action >  actions) [private]

enable the actions in actions and disable the other actions.

Parameters:
actionsa list of actions, not null.

References metadone.client.MainClientMetadone.ALL_ACTIONS.

Referenced by metadone.client.MainClientMetadone.changeState().

void metadone.client.MainClientMetadone.error ( boolean  synchronous,
String  msg,
Throwable  th 
)
ClientState metadone.client.MainClientMetadone.getClientState ( )
final Properties metadone.client.MainClientMetadone.getGlobalProperties ( )
static Properties metadone.client.MainClientMetadone.getProperties ( String  filename) [static]
Returns:
The default properties of the program.

References metadone.client.MainClientMetadone.logger.

Referenced by metadone.client.actions.ConnectAction.configureJPA2().

static final MainClientMetadone metadone.client.MainClientMetadone.getSingleton ( ) [static]

Gets the singleton (the window)

Returns:
The window

References metadone.client.MainClientMetadone.initializeSingleton(), and metadone.client.MainClientMetadone.singleton.

Referenced by metadone.client.dialog.swing.genConcreteObject.Panel_one_range.SelectActionListener.actionPerformed(), metadone.client.dialog.swing.genConcreteObject.Panel_one_domain.SelectActionListener.actionPerformed(), metadone.client.actions.VisualizeModelAction.actionPerformed(), metadone.client.actions.VisualizeMetaModelAction.actionPerformed(), metadone.client.actions.UndoRedoAction.actionPerformed(), metadone.client.actions.TestDialogConcrete.actionPerformed(), metadone.client.actions.Test_ECORE_Action.actionPerformed(), metadone.client.actions.Test6Action.actionPerformed(), metadone.client.actions.Test5Action.actionPerformed(), metadone.client.actions.Test4Action.actionPerformed(), metadone.client.actions.Test3Action.actionPerformed(), metadone.client.actions.Test2Action.actionPerformed(), metadone.client.actions.SelectAsRangeAction.actionPerformed(), metadone.client.actions.RollbackAction.actionPerformed(), metadone.client.actions.RetroDocAction.actionPerformed(), metadone.client.actions.QuitAction.actionPerformed(), metadone.client.actions.PrintOmegaMetaModel.actionPerformed(), metadone.client.actions.PluginsAction.actionPerformed(), metadone.client.actions.OpenProjectAction.actionPerformed(), metadone.client.actions.OpenOmegaModel.actionPerformed(), metadone.client.actions.OpenGrasylaScriptAction.actionPerformed(), metadone.client.actions.OntologyImportAction.actionPerformed(), metadone.client.actions.ImportModelAction.actionPerformed(), metadone.client.actions.ConnectAction.actionPerformed(), metadone.client.actions.ConfigureAction.actionPerformed(), metadone.client.actions.ConcreteObjectDeleteAction.actionPerformed(), metadone.client.actions.ConcreteObjectCreateAction.actionPerformed(), metadone.client.actions.ConcreteModelCreateAction.actionPerformed(), metadone.client.actions.CommitAction.actionPerformed(), metadone.client.actions.CloseDatabaseAction.actionPerformed(), metadone.client.actions.Browsemetal2Action.actionPerformed(), metadone.client.actions.Browsemetal1Action.actionPerformed(), metadone.client.actions.AboutAction.actionPerformed(), metadone.client.dialog.swing.PickOntology.addListeners(), metadone.client.dialog.swing.genConcreteObject.Builder.buildDialog(), metadone.client.actions.CloseProjectAction.closeProject(), metadone.client.MetadoneDesktopPane.ContextMenuSubscriber.componentShown(), metadone.client.grasyla2.GrasylaEngineFactory.configure(), metadone.client.dialog.swing.selectDatabase.MySelectDatabase.configure(), metadone.client.dialog.swing.genConcreteObject.DialogConcreteRoles.configure(), metadone.client.actions.Test4Action.configureGrasyla(), metadone.client.functions.importer.owl.OWLImporter.createConcreteModel(), metadone.client.functions.importer.GrasylaImporter.createConcreteModel(), metadone.client.dialog.swing.helperBrowserMetal2.NodeRoot.getChildren(), metadone.client.dialog.swing.helperBrowserMetal1.NodeRoot.getChildren(), metadone_bundle_client.ClientBusinessTracker.getClientWindow(), metadone.client.functions.importer.Importer.AbstractImporter.getMetamodel(), metadone.client.actions.RetroDocAction.getMM_parent_metamodel(), metadone.client.dialog.swing.metaobjecteditor.ModelTreeChooseMetaObject.getRoot(), metadone.metadone_standalone.MetadoneStandalone.getSingletonInstance(), metadone.client.grasyla2.visuallibrary.GraphVizLayout.GraphVizLayout(), metadone.client.actions.Test4Action.initConcreteModel(), metadone.client.actions.Test3Action.initConcreteModel(), metadone.client.actions.RetroDocAction.initConcreteModel(), metadone.client.actions.OntologyImportAction.initConcreteModel(), metadone.client.actions.Test4Action.initConcreteModelForOwlOnt(), metadone.client.actions.OntologyImportAction.initConcreteModelForOwlOnt(), metadone.client.actions.Test3Action.initGrasylaScript(), metadone.client.actions.Test5Action.initMetaModel(), metadone.client.actions.RetroDocAction.initMetaModel(), metadone.client.actions.Test6Action.initModels(), metadone.client.dialog.swing.metaobjecteditor.MyPanelMetaProperty.myconfigure(), metadone.client.dialog.swing.metaobjecteditor.MyCreateMetaObject.myconfigure(), metadone.client.dialog.swing.visualizeModel.MyVisualizeModel.MyVisualizeModel(), metadone.client.actions.ImportModelAction.openFile(), metadone.client.functions.importer.PromotingImporter.AbstractPromotingImporter.promoteToMetamodel(), metadone.client.dialog.swing.genConcreteObject.DialogConcreteRoles.selectMetaObject(), metadone.client.MetadoneDesktopPane.EngineObserver.start(), metadone.client.actions.GenerateDotAction.test_projectiterator2(), metadone.client.dialog.swing.helperBrowserMetal1.NodeValue.toString(), metadone.client.dialog.swing.helperBrowserMetal1.NodeDataObject.toString(), metadone.client.functions.importer.km3.KM3Importer.Translator.translateModel(), metadone.client.MetadoneDesktopPane.EngineObserver.trigger(), metadone.client.MetadoneDesktopPane.updateForSelectedFrame(), metadone.client.dialog.swing.visualizeModel.MyVisualizeModel.updateListOfConcreteModels(), metadone.client.MetadoneDesktopPane.updateModelMenuItems(), and metadone.client.MetadoneDesktopPane.updatePopupMenuItems().

final Workspace metadone.client.MainClientMetadone.getWorkspace ( )

References metadone.client.MainClientMetadone.workspace.

Referenced by metadone.client.actions.VisualizeMetaModelAction.actionPerformed(), metadone.client.actions.UndoRedoAction.actionPerformed(), metadone.client.actions.TestDialogConcrete.actionPerformed(), metadone.client.actions.Test_ECORE_Action.actionPerformed(), metadone.client.actions.Test3Action.actionPerformed(), metadone.client.actions.Test2Action.actionPerformed(), metadone.client.actions.PrintOmegaMetaModel.actionPerformed(), metadone.client.actions.OpenGrasylaScriptAction.actionPerformed(), metadone.client.actions.ConcreteModelCreateAction.actionPerformed(), metadone.client.actions.CommitAction.actionPerformed(), metadone.client.actions.Browsemetal2Action.actionPerformed(), metadone.client.actions.Browsemetal1Action.actionPerformed(), metadone.client.actions.CloseProjectAction.closeProject(), metadone.client.grasyla2.GrasylaEngineFactory.configure(), metadone.client.actions.Test4Action.configureGrasyla(), metadone.client.functions.importer.owl.OWLImporter.createConcreteModel(), metadone.client.functions.importer.GrasylaImporter.createConcreteModel(), metadone.client.MainClientMetadone.getGrasylaFactories(), metadone.client.functions.importer.Importer.AbstractImporter.getMetamodel(), metadone.client.actions.RetroDocAction.getMM_parent_metamodel(), metadone.client.MainClientMetadone.getProject(), metadone.client.dialog.swing.metaobjecteditor.ModelTreeChooseMetaObject.getRoot(), metadone.client.MainClientMetadone.getUser(), metadone.client.actions.Test3Action.initConcreteModel(), metadone.client.actions.RetroDocAction.initConcreteModel(), metadone.client.actions.Test3Action.initGrasylaScript(), metadone.client.actions.Test5Action.initMetaModel(), metadone.client.actions.RetroDocAction.initMetaModel(), metadone.client.actions.Test6Action.initModels(), metadone.client.dialog.swing.visualizeModel.MyVisualizeModel.MyVisualizeModel(), metadone.client.functions.importer.PromotingImporter.AbstractPromotingImporter.promoteToMetamodel(), metadone.client.MainClientMetadone.reactivatePlugin(), metadone.client.functions.importer.km3.KM3Importer.Translator.translateModel(), metadone.client.MainClientMetadone.QuestionSubscriber.trigger(), metadone.client.MetadoneDesktopPane.updateForSelectedFrame(), and metadone.client.dialog.swing.visualizeModel.MyVisualizeModel.updateListOfConcreteModels().

static synchronized final MainClientMetadone metadone.client.MainClientMetadone.initializeSingleton ( Properties  properties) [static]

Initializes the singleton.

Parameters:
propertiesThe properties
Returns:
The window
Exceptions:
IllegalStateExceptionwhen the singleton is already initialized

References metadone.client.MainClientMetadone.MainClientMetadone(), and metadone.client.MainClientMetadone.singleton.

Referenced by metadone.client.MainClientMetadone.getSingleton(), metadone.metadone_standalone.MetadoneStandalone.main(), and metadone_bundle_client.MetadoneActivator.start().

boolean metadone.client.MainClientMetadone.isTestingVersion ( ) [package]

Indicates whether we are running in a debug version.

This should not be used to change existing behavior, but only to add options for debugging.

Returns:
true if in debug version

References metadone.util.ClassUtil.convert(), and metadone.client.MainClientMetadone.getGlobalProperties().

Referenced by metadone.client.MainClientMetadone.createMenuBar(), and metadone.client.MetadoneDesktopPane.updateModelMenuItems().

synchronized void metadone.client.MainClientMetadone.reactivatePlugins ( ) [protected]
static final Action metadone.client.MainClientMetadone.registerAction ( Action  action) [static, private]
synchronized void metadone.client.MainClientMetadone.setBundleContext ( BundleContext  bundleContext)
void metadone.client.MainClientMetadone.setUIFont ( FontUIResource  fontUIResource) [private]
String metadone.client.MainClientMetadone.toString ( )
void metadone.client.MainClientMetadone.warning ( boolean  synchronous,
String  msg,
Throwable  th 
)

Member Data Documentation

final Action metadone.client.MainClientMetadone.ACTION_COPY = registerAction(new CopyAction()) [static, private]
final Action metadone.client.MainClientMetadone.ACTION_CUT = registerAction(new CutAction()) [static, private]
final Action metadone.client.MainClientMetadone.ACTION_PASTE = registerAction(new PasteAction()) [static, private]
final Comparator<JMenuItem> metadone.client.MainClientMetadone.MENU_COMPARATOR [static]
Initial value:
 new Comparator<JMenuItem>() {
        @Override
        public int compare(JMenuItem o1, JMenuItem o2) {
            return o1.getText().compareTo(o2.getText());
        }
    }

Referenced by metadone.client.MetadoneDesktopPane.addSortedMenuItems(), and metadone.client.MainClientMetadone.reorderPluginMenu().

final long metadone.client.MainClientMetadone.serialVersionUID = 1L [static, private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations