Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Need help with new file wizard and selection
Need help with new file wizard and selection [message #13625] Tue, 22 July 2008 05:20 Go to next message
Eclipse UserFriend
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 #16159 is a reply to message #13625] Sun, 10 August 2008 01:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chingyichan.tw.gmail.com

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 #16311 is a reply to message #13625] Thu, 14 August 2008 05:48 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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();
}
Previous Topic:acmeproduct.exe appears not to work when placed in the recommended directory
Next Topic:acmeproduct.exe appears not to work when placed in the recommended directory
Goto Forum:
  


Current Time: Wed Apr 16 05:53:22 EDT 2025

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

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

Back to the top