|
Re: How to make a class a singleton [message #1085607 is a reply to message #1085364] |
Tue, 13 August 2013 05:49 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Ken,
Certainly you can add such things by hand, but there's no way to
generate it. It's always possible to create more than one instance of
any non-abstract EClass...
On 12/08/2013 10:40 PM, Ken Mising name wrote:
> I have a class I've described in ECore that I'd like to be a singleton
> class. Is this possible in ECore/EMF?
> So, instead of executing:
>
> ProjectsFactory.eINSTANCE.createWorkspaceManager();
>
> I would execute:
>
> ProjectsFactory.eINSTANCE.getWorkspaceManager();
>
> or even better:
>
> WorkspaceManager.getWorkspaceManager();
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.01906 seconds