Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Invoking New / Interface programmatically (from cheatsheet)
Invoking New / Interface programmatically (from cheatsheet) [message #245523] Wed, 11 July 2007 17:37 Go to next message
Eclipse UserFriend
Originally posted by: myawn.ebay.com

I'm trying to put together a cheatsheet for walking developers through a
simple development scenario. One of the first steps is to create a new
Java interface. I'd like this to be a linkable action from the cheatsheet.

- Is there an action already defined I can reference to invoke this
function?
- If not, is there a wizard available where I can write my own simple
action just to invoke the existing wizard?

I have found that NewInterfaceWizardPage is defined in the
org.eclipse.jdt.wizards package, so if neither of the above options
exists, I think I can use this to roll my own Wizard, and then invoke it
from my own custom action -- I just wanted to see if there were reusable
parts for the Wizard and Action before I did that.

Thanks,
Mike
Re: Invoking New / Interface programmatically (from cheatsheet) [message #245570 is a reply to message #245523] Thu, 12 July 2007 09:44 Go to previous messageGo to next message
Eclipse UserFriend
Mike Yawn wrote:
> I'm trying to put together a cheatsheet for walking developers through a
> simple development scenario. One of the first steps is to create a new
> Java interface. I'd like this to be a linkable action from the cheatsheet.
>
> - Is there an action already defined I can reference to invoke this
> function?
> - If not, is there a wizard available where I can write my own simple
> action just to invoke the existing wizard?
>
> I have found that NewInterfaceWizardPage is defined in the
> org.eclipse.jdt.wizards package, so if neither of the above options
> exists, I think I can use this to roll my own Wizard, and then invoke it
> from my own custom action -- I just wanted to see if there were reusable
> parts for the Wizard and Action before I did that.

There is the new wizard command, org.eclipse.ui.newWizard, and it takes
an optional ID, newWizardId.

The 3.3 cheatsheet editor has a command composer that can list available
options. In 3.3 it looks like it would embed the link for you. It says
the magic information is:

org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wiza rds.NewInterfaceCreationWizard)

Later,
PW
Re: Invoking New / Interface programmatically (from cheatsheet) [message #245617 is a reply to message #245570] Thu, 12 July 2007 18:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: myawn.ebay.com

Paul Webster wrote:
> Mike Yawn wrote:
>> I'm trying to put together a cheatsheet for walking developers through
>> a simple development scenario. One of the first steps is to create a
>> new Java interface. I'd like this to be a linkable action from the
>> cheatsheet.
>>
>> - Is there an action already defined I can reference to invoke this
>> function?
>> - If not, is there a wizard available where I can write my own simple
>> action just to invoke the existing wizard?
>>
>> I have found that NewInterfaceWizardPage is defined in the
>> org.eclipse.jdt.wizards package, so if neither of the above options
>> exists, I think I can use this to roll my own Wizard, and then invoke
>> it from my own custom action -- I just wanted to see if there were
>> reusable parts for the Wizard and Action before I did that.
>
> There is the new wizard command, org.eclipse.ui.newWizard, and it takes
> an optional ID, newWizardId.
>
> The 3.3 cheatsheet editor has a command composer that can list available
> options. In 3.3 it looks like it would embed the link for you. It says
> the magic information is:
>
> org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wiza rds.NewInterfaceCreationWizard)
>
>
> Later,
> PW

That's cool -- thanks. I should be moving to Eclipse 3.3 in the next
week or so, as soon as our tools team completes testing with it
(assuming no issues are found).

Mike
Re: Invoking New / Interface programmatically (from cheatsheet) [message #245885 is a reply to message #245617] Tue, 17 July 2007 10:15 Go to previous message
Eclipse UserFriend
Mike Yawn wrote:
>>
>> The 3.3 cheatsheet editor has a command composer that can list
>> available options. In 3.3 it looks like it would embed the link for
>> you. It says the magic information is:
>>
>> org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wiza rds.NewInterfaceCreationWizard)
>>
>>
>> Later,
>> PW
>
> That's cool -- thanks. I should be moving to Eclipse 3.3 in the next
> week or so, as soon as our tools team completes testing with it
> (assuming no issues are found).

Just as an aside, the command itself would be available in 3.2 and
possibly even in 3.1 ...

The command composer can a more friendly way to track down commands than
searching through the Plug-in Registry view :-)

PW
Previous Topic:How to get Annotations on IType?
Next Topic:code execution at java breakpoint
Goto Forum:
  


Current Time: Thu May 29 03:46:25 EDT 2025

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

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

Back to the top