|
Re: Running models standalone [message #618226 is a reply to message #560098] |
Tue, 21 September 2010 23:00 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
Oliver Mannion wrote on Tue, 21 September 2010 04:23 | Hi,
I'm just getting in AMP.
I have seen apps that run standalone using the eclipse GUI. Is it possible to turn a model into a such a standalone application (without the development functions)?
This is as opposed to having to run the model from within the same eclipse environment that development occurs.
|
Hi Oliver,
That's an interesting question. First as of course you know, you can deploy apps as Swing applications simply by creating an Ascape project and dragging the model over.
re: Eclipse hosted models, that should be totally doable. The idea here would be to have an Eclipse RCP application that simply supported the model that you had just created perhaps with the project explorer bundled so that you would have a place to organize output data, etc.. This is all very straightforward. However... with eclipse "straightforward" doesn't (hardly?) ever mean "easy". But perhaps we'd be surprised and it would be easy.
Eventually it would be nice to have some sort of wizard to deploy such things. But if you want to try to do this on your own, here's a basic plan..
1. Read up on on building RCP products -- its very helpful to go through a tutorial -- Lars Vogella has an excellent one here: http://www.vogella.de/articles/EclipseRCP/article.html
2. Create a feature and product for your app. Include the escape, agf and axf features, but do *not* include the AMF stuff.
3. Hook up some way to launch the model -- you could just customize the existing handlers pretty easily I think to take a fixed model.
4. Fix stuff that goes wrong when you try 3.
|
|
|
|
|
|
Re: Running models standalone [message #632977 is a reply to message #632749] |
Thu, 14 October 2010 21:04 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
Oliver Mannion wrote on Thu, 14 October 2010 03:15 | I think I might have to make a change to EsclipseEscapeRunner. In particular I am thinking of creating a version of
public void open(final IResource projectResource, final String modelClassName, String modelName, String[] args,
boolean block)
that will accept a project name instead of a projectResource. This is so I don't have to have a workspace with resources. Instead I'll specify the class name which will be a Scape existing in a plugin - i think this will work?
|
Yes, it makes sense but I can't be sure it will work out of the box -- we assume that we have a project elsewhere. In fact..
If you look at that method, it calls org.eclipse.amp.escape.ide.ProjectLoader. This of course currently requires a project, where it just grabs the path, so you could add something for that.. but! you don't actually need it all because it is doing dynamic class loading and we don't need that if we're launching a new runtime and we have the code as a plugin. IOTW, the current case is the hard case. So what actually needs to happen is that the open should be refactored and the dynamic version added in. Or, I suppose you could create a flag for it instead.
I you want to make that change/addition to EsclipseEscapeRunner itself, then please feel free -- submit a patch and we'll get it in.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04906 seconds