Skip to main content



      Home
Home » Newcomers » Newcomers » How to get my Project wizard
How to get my Project wizard [message #205279] Mon, 16 April 2007 23:48 Go to next message
Eclipse UserFriend
how to get a project wizard?
why are these is not yet ?

IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint =
registry.getExtensionPoint("org.eclipse.ui.newWizard");
IExtension[] extension=extensionPoint.getExtensions();
for(int i=0;i<extension.length;i++){
IConfigurationElement[]
elements=extension[i].getConfigurationElements();
for(int j=0;j<elements.length;j++){
System.out.println(elements[i].getName());
System.out.println(elements[j].getAttribute("id"));
// IConfigurationElement[]
wizards=elements[j].getChildren("wizard");

if(elements[j].getAttribute("id").equals("com.mbi.designer.bpel.viewer.edito
rs.WorkflowCreationWizard")){
try {
System.out.println("find out");
elements[j].createExecutableExtension("class");
} catch (CoreException e1) {
e1.printStackTrace();
}
break;
}
}
}
Re: How to get my Project wizard [message #205339 is a reply to message #205279] Tue, 17 April 2007 03:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jakub.jurkiewicz.gmail.com

Hi,

I have just tried to run your code and I see one tiny mistake:
the extension point ID for new wizards is: org.eclipse.ui.newWizards and
not org.eclipse.ui.newWizard (you've missed the "s" at the end).
I guess that was the problem.

Hope this helps,
Jakub Jurkiewicz

w wrote:
> how to get a project wizard?
> why are these is not yet ?
>
> IExtensionRegistry registry = Platform.getExtensionRegistry();
> IExtensionPoint extensionPoint =
> registry.getExtensionPoint("org.eclipse.ui.newWizard");
> IExtension[] extension=extensionPoint.getExtensions();
> for(int i=0;i<extension.length;i++){
> IConfigurationElement[]
> elements=extension[i].getConfigurationElements();
> for(int j=0;j<elements.length;j++){
> System.out.println(elements[i].getName());
> System.out.println(elements[j].getAttribute("id"));
> // IConfigurationElement[]
> wizards=elements[j].getChildren("wizard");
>
> if(elements[j].getAttribute("id").equals("com.mbi.designer.bpel.viewer.edito
> rs.WorkflowCreationWizard")){
> try {
> System.out.println("find out");
> elements[j].createExecutableExtension("class");
> } catch (CoreException e1) {
> e1.printStackTrace();
> }
> break;
> }
> }
> }
>
>
Re: How to get my Project wizard [message #205347 is a reply to message #205339] Tue, 17 April 2007 04:55 Go to previous message
Eclipse UserFriend
First, Thank you .
The fragment of code is missed the "s",but have not on my program.
I try execute my code,it only have System's(current Eclipse environment)
plugin wizard at IExtensionRegistry,but havn't my
wizard(com.mbi.designer.bpel.viewer.editors.Workflowcreation Wizard).

This is my modified code ,It is error by now.
// IExtensionPoint extensionPoint =
registry.getExtensionPoint("org.eclipse.ui.newWizards");
IExtension[] extension=extensionPoint.getExtensions();
IExtension[] extension=registry.getExtensions("com.mbi.feature");

for(int i=0;i<extension.length;i++){
System.out.println("extension:label>>>"+extension[i].getLabel());
IConfigurationElement[]
elements=extension[i].getConfigurationElements();

for(int j=0;j<elements.length;j++){
System.out.println(elements[i].getName());
System.out.println(elements[j].getAttribute("id"));
// IConfigurationElement[]
wizards=elements[j].getChildren("wizard");

if(elements[j].getAttribute("id").equals("com.mbi.designer.bpel.viewer.edito
rs.WorkflowCreationWizard")){
try {
System.out.println("find out");
elements[j].createExecutableExtension("class");
} catch (CoreException e1) {
// TODO ???? catch ?
e1.printStackTrace();
}
break;
}
}
}*/
"Jakub Jurkiewicz" <jakub.jurkiewicz@gmail.com> ????
news:f01t5v$7ei$3@build.eclipse.org...
> Hi,
>
> I have just tried to run your code and I see one tiny mistake:
> the extension point ID for new wizards is: org.eclipse.ui.newWizards and
> not org.eclipse.ui.newWizard (you've missed the "s" at the end).
> I guess that was the problem.
>
> Hope this helps,
> Jakub Jurkiewicz
>
> w wrote:
> > how to get a project wizard?
> > why are these is not yet ?
> >
> > IExtensionRegistry registry = Platform.getExtensionRegistry();
> > IExtensionPoint extensionPoint =
> > registry.getExtensionPoint("org.eclipse.ui.newWizard");
> > IExtension[] extension=extensionPoint.getExtensions();
> > for(int i=0;i<extension.length;i++){
> > IConfigurationElement[]
> > elements=extension[i].getConfigurationElements();
> > for(int j=0;j<elements.length;j++){
> > System.out.println(elements[i].getName());
> > System.out.println(elements[j].getAttribute("id"));
> > // IConfigurationElement[]
> > wizards=elements[j].getChildren("wizard");
> >
> >
if(elements[j].getAttribute("id").equals("com.mbi.designer.bpel.viewer.edito
> > rs.WorkflowCreationWizard")){
> > try {
> > System.out.println("find out");
> > elements[j].createExecutableExtension("class");
> > } catch (CoreException e1) {
> > e1.printStackTrace();
> > }
> > break;
> > }
> > }
> > }
> >
> >
Previous Topic:how to add wizard to file->new menu
Next Topic:Error starting Eclipse on Debian 4 Etch
Goto Forum:
  


Current Time: Sat May 03 14:11:08 EDT 2025

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

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

Back to the top