Need help with new file wizard and selection [message #13625] |
Tue, 22 July 2008 05:20  |
Eclipse User |
|
|
|
Originally posted by: yeronimuz.aol.com
I have a wizard page which extends WizardNewFileCreationPage. When I run
my app and have selected the wizard to use and need to select a
project in the next page where the file needs to be created, then the
contents pane shows only dotted lines for every project in my workspace,
see my unanswered previous post.
I figured out that this could have something todo with the selection
being empty.
First I tried to set the container path:
setContainerFullPath(ResourcesPlugin.getWorkspace().getRoot( ).getLocation());
but that didn't work.
In WizardNewFileCreationPage.initialPopulateContainerNameField( ) I saw
that currentSelection is empty.
What is this selection, and with what should I feed it?
Regards,
Jeroen.
|
|
|
|
Re: Need help with new file wizard and selection [message #16311 is a reply to message #13625] |
Thu, 14 August 2008 05:48  |
Eclipse User |
|
|
|
Originally posted by: yeronimuz.aol.com
Jeroen Lankheet wrote:
> I have a wizard page which extends WizardNewFileCreationPage. When I run
> my app and have selected the wizard to use and need to select a project
> in the next page where the file needs to be created, then the contents
> pane shows only dotted lines for every project in my workspace, see my
> unanswered previous post.
> I figured out that this could have something todo with the selection
> being empty.
> First I tried to set the container path:
> setContainerFullPath(ResourcesPlugin.getWorkspace().getRoot( ).getLocation());
>
>
> but that didn't work.
> In WizardNewFileCreationPage.initialPopulateContainerNameField( ) I saw
> that currentSelection is empty.
>
> What is this selection, and with what should I feed it?
>
> Regards,
> Jeroen.
After submitting bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=240789
folks have pointed me to one additional line of code which addresses an
internal plugin and thus creates a warning, but provides a workable
solution.
public void initialize(IWorkbenchConfigurer configurer) {
super.initialize(configurer);
WorkbenchAdapterBuilder.registerAdapters();
}
|
|
|
Re: Need help with new file wizard and selection [message #576015 is a reply to message #13625] |
Sun, 10 August 2008 01:03  |
Eclipse User |
|
|
|
Jeroen Lankheet 提到:
> I have a wizard page which extends WizardNewFileCreationPage. When I run
> my app and have selected the wizard to use and need to select a project
> in the next page where the file needs to be created, then the contents
> pane shows only dotted lines for every project in my workspace, see my
> unanswered previous post.
> I figured out that this could have something todo with the selection
> being empty.
> First I tried to set the container path:
> setContainerFullPath(ResourcesPlugin.getWorkspace().getRoot( ).getLocation());
>
>
> but that didn't work.
> In WizardNewFileCreationPage.initialPopulateContainerNameField( ) I saw
> that currentSelection is empty.
>
> What is this selection, and with what should I feed it?
>
> Regards,
> Jeroen.
for example for java project. If user have selected the node in Package
Explorer you can do this :
ISelection sel = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow()
.getSelectionService()
.getSelection("org.eclipse.jdt.ui.PackageExplorer");
|
|
|
Re: Need help with new file wizard and selection [message #576334 is a reply to message #13625] |
Thu, 14 August 2008 05:48  |
Eclipse User |
|
|
|
Jeroen Lankheet wrote:
> I have a wizard page which extends WizardNewFileCreationPage. When I run
> my app and have selected the wizard to use and need to select a project
> in the next page where the file needs to be created, then the contents
> pane shows only dotted lines for every project in my workspace, see my
> unanswered previous post.
> I figured out that this could have something todo with the selection
> being empty.
> First I tried to set the container path:
> setContainerFullPath(ResourcesPlugin.getWorkspace().getRoot( ).getLocation());
>
>
> but that didn't work.
> In WizardNewFileCreationPage.initialPopulateContainerNameField( ) I saw
> that currentSelection is empty.
>
> What is this selection, and with what should I feed it?
>
> Regards,
> Jeroen.
After submitting bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=240789
folks have pointed me to one additional line of code which addresses an
internal plugin and thus creates a warning, but provides a workable
solution.
public void initialize(IWorkbenchConfigurer configurer) {
super.initialize(configurer);
WorkbenchAdapterBuilder.registerAdapters();
}
|
|
|
Powered by
FUDForum. Page generated in 0.03563 seconds