Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Getting IContainer from ISelection
Getting IContainer from ISelection [message #201129] Tue, 24 February 2004 16:38 Go to next message
Eclipse UserFriend
Originally posted by: ddurst.larubber.com

Currently I am writing a plugin that auto-generates some .xml files
for a type of project (I know thats ambig.)

Here is the issue, I have been strugling to find away to get
the currently "active" container or selected container inside the wizard
I am using.

Currently I have at my disposal is a ISelection.

So my approach is as follows:

if(selection instanceof IStructuredSelection) {
System.err.println("Structured Selection");
IStructuredSelection structuredSel = (IStructuredSelection)selection;

for(Iterator i = structuredSel.iterator();i.hasNext();){
System.err.println("Loop");
Object obj = i.next();
if(obj instanceof IContainer) {
IContainer container = (IContainer)obj;
System.err.println(container.getName());
}
}
}

But this only results in the output of
Structured Selection
Loop

and I get no container name.

Am I way off base? Is there any tutorials for this?
Re: Getting IContainer from ISelection [message #201168 is a reply to message #201129] Tue, 24 February 2004 17:53 Go to previous message
Eclipse UserFriend
Originally posted by: ddurst.larubber.com

NM I have solved the issue.
Previous Topic:osgi platform
Next Topic:creating packages from folders
Goto Forum:
  


Current Time: Fri Jul 18 14:07:00 EDT 2025

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

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

Back to the top