Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Different behavior in Linux and Windows

> I have a different behavior in Linux and Windows for the following piece
> of code:
> 
> protected void sampleGetSelectedProject() {
> 
> ISelectionService
> ss=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionServ
> ice();
> 
> String projExpID = "org.eclipse.ui.navigator.ProjectExplorer";
> 
>       ISelection sel = ss.getSelection(projExpID);
  ... 
> window.getShell(),
>                   project.getName(),
>                   project.getName());
> }
> }
> 
> In Windows the function correctly works, while in Linux there shows the
> following message box:
> 
> "The chosen operation is not currently available"
> 
> Eclipse version and the cdt version are the same in Linux and Windows.
> 
> Any hint about this strange behavior?

Daniele,

You'd better redirect these kind of questions to the eclipse
newsgroup, see: http://www.eclipse.org/newsgroups/ 
In the above case it could be useful to mention how the
sampleGetSelectedProject() method is triggered, e.g. through a menu or
toolbar button, I remember having the 'chosen operation not available'
message in case of a plugin.xml action referring to a class that
somehow couldn't be loaded. In such a case the 'sampleGetSelectedProject()'
method implementation itselve could be fine.

Regards,
  Wieant


Back to the top