ExecutionStrategy.execute returns Collections.EMPTY_LIST [message #62548] |
Sun, 15 October 2006 01:42  |
Eclipse User |
|
|
|
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 13:42  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04020 seconds