Re: Skip the "Choose Project" step in New Project wizard

geertjan wielenga <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Organization Oracle Corporation
Message-ID <[email protected]>
I don't think there's a way to skip the first step. Maybe you could 
programmatically invoke the Enter key, which would automate the first 
step, though still not skip it.

Here's a custom Action class for opening the New Project wizard -- 
again, no skipping of the first step, I don't think that is possible.

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Action;
import org.netbeans.spi.project.ui.support.CommonProjectActions;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.awt.ActionRegistration;
import org.openide.util.NbBundle.Messages;

@ActionID(
         category = "Project",
         id = "org.netbeans.demo.sfpws.NewProjectAction"
)
@ActionRegistration(
         asynchronous = true,
         displayName = "#CTL_NewProjectAction"
)
@ActionReferences({
     @ActionReference(path = "Shortcuts", name = "DS-N"),
     @ActionReference(path = "Menu/File", position = 100),
     @ActionReference(path = "Toolbars/File", position = 200)
})
@Messages("CTL_NewProjectAction=New Project")
public final class NewProjectAction implements ActionListener {

     @Override
     public void actionPerformed(ActionEvent e) {
         Action a = CommonProjectActions.newProjectAction();
         a.actionPerformed(e);
     }

}


Gj


On 20-1-2016 12:55, Neil C Smith wrote:
> Hi,
>
> On 20 January 2016 at 11:25, geertjan wielenga
> <[email protected]> wrote:
>> You're going to have to explain in a lot more detail -- not going to help
>> otherwise.
>>
> I'm assuming the OP only has one project type available?  If so, I'd
> be interested if there's a quick and easy way to skip that page too -
> not that important to me or I'd have switched it out by now, but I
> have noticed it's confusing for my users when there's only one
> possible option.
>
> Best wishes,
>
> Neil
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.