Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Class Cast Exception, can't get past ...
Class Cast Exception, can't get past ... [message #157295] Sat, 15 November 2003 15:00 Go to next message
David Whitehurst is currently offline David WhitehurstFriend
Messages: 76
Registered: July 2009
Member
Does anyone know why I might get a class cast exception, the code compiled
so the class is valid?

public class SQLHostAction implements IWorkbenchWindowActionDelegate {

private IWorkbenchWindow window;

private static final String HOST_PLUGIN =
"com.piratepete.xpdeveloper.SQLHost";


/**

* The constructor.

*/

public SQLHostAction() {

}

/**

* The action has been activated. The argument of the

* method represents the 'real' action sitting

* in the workbench UI.

* @see IWorkbenchWindowActionDelegate#run

*/

public void run(IAction action) {

try {

SQLHost host = (SQLHost) Platform.getPlugin(HOST_PLUGIN); // breaks here
.....

host.update("Hello David L. Whitehurst");


--
David L. Whitehurst
aka. PiratePete
http://www.piratepetesoftware.com
dlwhitehurst@comcast.net
(Resolved) Re: Class Cast Exception, can't get past ... [message #157310 is a reply to message #157295] Sat, 15 November 2003 15:45 Go to previous message
David Whitehurst is currently offline David WhitehurstFriend
Messages: 76
Registered: July 2009
Member
Resolved, some exception possibly due to class attribute being defined in
plugin.xml.

David
--
David L. Whitehurst
aka. PiratePete
http://www.piratepetesoftware.com
dlwhitehurst@comcast.net
"David" <dlwhitehurst@comcast.net> wrote in message
news:bp5evt$ekf$1@eclipse.org...
> Does anyone know why I might get a class cast exception, the code compiled
> so the class is valid?
>
> public class SQLHostAction implements IWorkbenchWindowActionDelegate {
>
> private IWorkbenchWindow window;
>
> private static final String HOST_PLUGIN =
> "com.piratepete.xpdeveloper.SQLHost";
>
>
> /**
>
> * The constructor.
>
> */
>
> public SQLHostAction() {
>
> }
>
> /**
>
> * The action has been activated. The argument of the
>
> * method represents the 'real' action sitting
>
> * in the workbench UI.
>
> * @see IWorkbenchWindowActionDelegate#run
>
> */
>
> public void run(IAction action) {
>
> try {
>
> SQLHost host = (SQLHost) Platform.getPlugin(HOST_PLUGIN); // breaks here
> ....
>
> host.update("Hello David L. Whitehurst");
>
>
> --
> David L. Whitehurst
> aka. PiratePete
> http://www.piratepetesoftware.com
> dlwhitehurst@comcast.net
>
>
Previous Topic:HTML editing perspective?
Next Topic:Compiling one file without building the project
Goto Forum:
  


Current Time: Sat Nov 09 05:29:40 GMT 2024

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

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

Back to the top