Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » ExecutionStrategy.execute returns Collections.EMPTY_LIST
ExecutionStrategy.execute returns Collections.EMPTY_LIST [message #62548] Sun, 15 October 2006 05:42 Go to next message
Eclipse UserFriend
Originally posted by: greenl.mot.com

Hi,

I found I cannot create an edge for a connection, and I try to root cause it
in the GMF runtime library code, here is what I got:

File: org.eclipse.gmf.runtime.common.core.service.ExecutionStrateg y
Line: 75

public static final ExecutionStrategy FIRST =
new ExecutionStrategy("First") { //$NON-NLS-1$

private static final long serialVersionUID = 1L;

public List execute(Service service, IOperation operation) {
for (int i = 0; i < PRIORITIES.length; ++i) {
List providers = service.getProviders(this, PRIORITIES[i], operation);

if (providers.size() != 0) {
return Collections.singletonList(operation.execute((IProvider)
providers.get(0)));
}
}

==> return Collections.EMPTY_LIST;
}

The ExecutionStrategy.execute return Collections.EMPTY_LIST when creating
that edge, while succesfully created elements (Nodes, Edge whatever) in my
program will not reach this line. Can you tell me what does it mean if
execute run to this line?

Thanks,
Green
Re: ExecutionStrategy.execute returns Collections.EMPTY_LIST [message #62814 is a reply to message #62548] Sun, 15 October 2006 17:42 Go to previous message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Put a breakpoint in your <PluginName>ViewProvider class in the following
method:

protected Class getEdgeViewClass(IAdaptable semanticAdapter,....)

See what happens. I suspect this method ends up returning null when you
try to create a connection.

vlad

On Sun, 15 Oct 2006 13:42:07 +0800, Green Law wrote:

> Hi,
>
> I found I cannot create an edge for a connection, and I try to root cause it
> in the GMF runtime library code, here is what I got:
>
> File: org.eclipse.gmf.runtime.common.core.service.ExecutionStrateg y
> Line: 75
>
> public static final ExecutionStrategy FIRST =
> new ExecutionStrategy("First") { //$NON-NLS-1$
>
> private static final long serialVersionUID = 1L;
>
> public List execute(Service service, IOperation operation) {
> for (int i = 0; i < PRIORITIES.length; ++i) {
> List providers = service.getProviders(this, PRIORITIES[i], operation);
>
> if (providers.size() != 0) {
> return Collections.singletonList(operation.execute((IProvider)
> providers.get(0)));
> }
> }
>
> ==> return Collections.EMPTY_LIST;
> }
>
> The ExecutionStrategy.execute return Collections.EMPTY_LIST when creating
> that edge, while succesfully created elements (Nodes, Edge whatever) in my
> program will not reach this line. Can you tell me what does it mean if
> execute run to this line?
>
> Thanks,
> Green
Previous Topic:Multiple EOpposite?
Next Topic:Where can I get Logic Sample source code
Goto Forum:
  


Current Time: Sat Jul 27 12:48:01 GMT 2024

Powered by FUDForum. Page generated in 0.02112 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top