public ListOperator(ContainerOperator container, ComponentChooser chooser) { this(new JListOperator(container, chooser)); }
public ListOperator(ContainerOperator container, int index) { this(new JListOperator(container, index)); }
@RobotKeyword public Object[] getSelectedValues(String index) { JListOperator operator = new JListOperator((ContainerOperator) Context.getContext(), Integer.parseInt(index)); return operator.getSelectedValues(); } }
/** * Adds GlassFish server using path from glassfish.home property */ public static void addApplicationServer() { String glassfishHome = System.getProperty("glassfish.home"); if (glassfishHome == null) { throw new Error("Can't add GlassFish server. glassfish.home property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("GlassFish")) { // There is no GlassFish node so we'll add it serversNode.performPopupActionNoBlock(addServerMenuItem); WizardOperator addServerInstanceDialog = new WizardOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("GlassFish Server"); addServerInstanceDialog.next(); new JTextFieldOperator(addServerInstanceDialog).setText(glassfishHome); addServerInstanceDialog.next(); addServerInstanceDialog.finish(); } }
/** * Adds GlassFish server using path from glassfish.home property */ public static void addApplicationServer() { String glassfishHome = System.getProperty("glassfish.home"); if (glassfishHome == null) { throw new Error("Can't add GlassFish server. glassfish.home property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("GlassFish")) { // There is no GlassFish node so we'll add it serversNode.performPopupActionNoBlock(addServerMenuItem); WizardOperator addServerInstanceDialog = new WizardOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("GlassFish Server"); addServerInstanceDialog.next(); new JTextFieldOperator(addServerInstanceDialog).setText(glassfishHome); addServerInstanceDialog.next(); addServerInstanceDialog.finish(); } }
public static void addTomcatServer() { String appServerPath = System.getProperty("tomcat.installRoot"); if (appServerPath == null) { throw new Error("Can't add tomcat server. tomcat.installRoot property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT"); String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH"); RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("Tomcat")) { serversNode.performPopupActionNoBlock(addServerMenuItem); NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("Tomcat"); new JButtonOperator(addServerInstanceDialog, nextButtonCaption).push(); new JTextFieldOperator(addServerInstanceDialog, 1).setText(appServerPath); new JCheckBoxOperator(addServerInstanceDialog,1).changeSelection(false); new JButtonOperator(addServerInstanceDialog, finishButtonCaption).push(); } }
public static void addTomcatServer() { String appServerPath = System.getProperty("tomcat.installRoot"); if (appServerPath == null) { throw new Error("Can't add tomcat server. tomcat.installRoot property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT"); String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH"); RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("Tomcat")) { serversNode.performPopupActionNoBlock(addServerMenuItem); NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("Tomcat"); new JButtonOperator(addServerInstanceDialog, nextButtonCaption).push(); new JTextFieldOperator(addServerInstanceDialog, 1).setText(appServerPath); new JCheckBoxOperator(addServerInstanceDialog,1).changeSelection(false); new JButtonOperator(addServerInstanceDialog, finishButtonCaption).push(); } }
new JListOperator(addServerInstanceDialog, 1).selectItem(glassFishV2ListItem);
new JListOperator(addServerInstanceDialog, 1).selectItem(glassFishV3ListItem); new JButtonOperator(addServerInstanceDialog, nextButtonCaption).push(); new JTextFieldOperator(addServerInstanceDialog).enterText(appServerPath);