Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Target Platform problem
Target Platform problem [message #308691] Mon, 02 October 2006 01:26 Go to next message
Eclipse UserFriend
Originally posted by: jpk4077.hotmail.com

Hi,

I have eclipse 3.1 and rational software modeler installed on my system.

The following plugin code works if I set my target platform to eclipse,
but gives me a compile error if the target platform is RSM.

public void run(IAction action) {
Shell shell = new Shell();
ViewPluginAction myact = (ViewPluginAction) action;

IStructuredSelection structuredSelection = (IStructuredSelection)
myact
.getSelection();

}
I checked and it seems the JDT version of RSM is 3.0.1, so I tried making
the plugin for eclsipe ver 3.0. but the code compiles only if the target
is eclipse.

The compilation error is

The method getSelection() is undefined for the type ViewPluginAction

Why should the plugin code change if the target is rational instead of
eclipse? Shouldn't they both be compatible?

Thanks Praveen.
Re: Target Platform problem [message #308757 is a reply to message #308691] Mon, 02 October 2006 20:23 Go to previous messageGo to next message
Eclipse UserFriend
It looks like the difference is your eclipse is 3.1 but RSM is 3.0.x based.

ViewPluginAction is an internal class, which means you can use it, but
it can change in any release. Which is what happened between 3.0.x and 3.1

Later,
PW
Re: Target Platform problem [message #308768 is a reply to message #308757] Mon, 02 October 2006 21:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jpk4077.hotmail.com

Hi Paul,

Is there any other way I can get the selected element on a context menu
without using an internal class?

Thanks Praveen.
Re: Target Platform problem [message #308769 is a reply to message #308768] Mon, 02 October 2006 21:53 Go to previous message
Eclipse UserFriend
Every IObjectActionDelegate (all I*ActionDelegates) should have a
selectionChanged(*) method ... that will give you the current selection.

Later,
PW
Previous Topic:Dual screen IDE
Next Topic:how to add action into particular menubar?
Goto Forum:
  


Current Time: Sun Jun 08 06:57:02 EDT 2025

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

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

Back to the top