[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: Please Help!!!
|
- From: jdelgad@xxxxxxxxxxxx (Jose)
- Date: Tue, 22 Mar 2005 09:59:34 +0000 (UTC)
- Newsgroups: eclipse.tools.gef
- Organization: not organized
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi all,
I have tried what Gunay said, but it doesn't work. This is the code for
the getConnectionCreateCommand and getConnectionCompleteCommand methods:
protected Command getConnectionCompleteCommand(
CreateConnectionRequest request) {
ModelObject model = (ModelObject) getHost().getModel();
if(model==null){
return null;
}
else{
ConnectionCommand command = (ConnectionCommand) request
.getStartCommand();
command.setTarget(getJCLECSubpart());
ConnectionAnchor ctor = getJCLECEditPart().getTargetConnectionAnchor(
request);
if (ctor == null)
return null;
command.setTargetTerminal(getJCLECEditPart()
.mapConnectionAnchorToTerminal(ctor));
return command;
}
}
protected Command getConnectionCreateCommand(CreateConnectionRequest
request) {
ModelObject model = (ModelObject) getHost().getModel();
if(model == null){
return null;
}
else{
ConnectionCommand command = new ConnectionCommand();
command.setConnection(new Arrow());
command.setSource(getJCLECSubpart());
ConnectionAnchor ctor = getJCLECEditPart().getSourceConnectionAnchor(
request);
command.setSourceTerminal(getJCLECEditPart()
.mapConnectionAnchorToTerminal(ctor));
request.setStartCommand(command);
return command;
}
}
Why it doesn't work? Please, help me. Thankyou very much.
--Jose