Odd error [message #240234] |
Mon, 10 December 2007 16:17 |
Eclipse User |
|
|
|
Originally posted by: Jim.Cooper.sas.com
Using Eclipse 3.1.2, with the latest GEF that was available for that.
This line out of the org.eclipse.gef.examples.flow FlowEditor.java:
getGraphicalViewer().addDropTargetListener(new
TemplateTransferDropTargetListener(getGraphicalViewer()));
Is giving me this error:
Cannot instantiate the type TemplateTransferDropTargetListener
Any clues on where to start looking for the problem?
|
|
|
Re: Odd error [message #240260 is a reply to message #240234] |
Tue, 11 December 2007 22:49 |
Eclipse User |
|
|
|
Originally posted by: sebukoleth.gmail.com
Jim Cooper wrote:
> Using Eclipse 3.1.2, with the latest GEF that was available for that.
>
> This line out of the org.eclipse.gef.examples.flow FlowEditor.java:
>
> getGraphicalViewer().addDropTargetListener(new
> TemplateTransferDropTargetListener(getGraphicalViewer()));
>
> Is giving me this error:
>
> Cannot instantiate the type TemplateTransferDropTargetListener
>
> Any clues on where to start looking for the problem?
It is an abstract class. Look at its Java doc. "This class is abstract.
Subclasses are responsible for providing the appropriate Factory object
based on the template that is being dragged."
cheers,
Sebu
|
|
|
Re: Odd error [message #240270 is a reply to message #240260] |
Wed, 12 December 2007 19:17 |
Eclipse User |
|
|
|
Originally posted by: Jim.Cooper.sas.com
Sebu T. Koleth wrote:
> Jim Cooper wrote:
>> Using Eclipse 3.1.2, with the latest GEF that was available for that.
>>
>> This line out of the org.eclipse.gef.examples.flow FlowEditor.java:
>>
>> getGraphicalViewer().addDropTargetListener(new
>> TemplateTransferDropTargetListener(getGraphicalViewer()));
>>
>> Is giving me this error:
>>
>> Cannot instantiate the type TemplateTransferDropTargetListener
>>
>> Any clues on where to start looking for the problem?
>
> It is an abstract class. Look at its Java doc. "This class is abstract.
> Subclasses are responsible for providing the appropriate Factory object
> based on the template that is being dragged."
>
> cheers,
> Sebu
So that's why nearly every example "out there" has this exact line of
code, INCLUDING the official org.eclipse.gef.examples.flow code?
Believe it or not, I actually did look at the fact that it's an abstract
class.
Why is it that everyone else in the world seems to be able to use the
code as-is, but I get a compile error?
|
|
|
|
Re: Odd error [message #240311 is a reply to message #240292] |
Mon, 17 December 2007 22:12 |
Eclipse User |
|
|
|
Originally posted by: Jim.Cooper.sas.com
That's actually the conclusion I've come to. Some sort of mis-match
between what I'm trying to work with, and what's out on the web.
I need to track down an earlier version of the examples, and see how it
was handled there.
Prakash wrote:
> Though JavaDocs say so, TemplateTransferDropTargetListener is not an abstract class and you can create instances of it (At least in the 3.2.1 version, which I have) May be initially its an Abstract class and then later it was changed to a concrete class. The examples you have may be from a newer version and your GEF plugin might be an older version.
>
> - Prakash
|
|
|
Powered by
FUDForum. Page generated in 0.25159 seconds