org.netbeans.jemmy.operators.JTextFieldOperator Java Examples
The following examples show how to use
org.netbeans.jemmy.operators.JTextFieldOperator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PluginsOperatorTest.java From netbeans with Apache License 2.0 | 6 votes |
/** Sets proxy for network connection. */ public void testSetProxy() { OptionsOperator optionsOper = OptionsOperator.invoke(); optionsOper.selectGeneral(); // "Manual Proxy Setting" String hTTPProxyLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Use_HTTP_Proxy"); new JRadioButtonOperator(optionsOper, hTTPProxyLabel).push(); // "HTTP Proxy:" String proxyHostLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Proxy_Host"); JLabelOperator jloHost = new JLabelOperator(optionsOper, proxyHostLabel); new JTextFieldOperator((JTextField) jloHost.getLabelFor()).typeText("emea-proxy.uk.oracle.com"); // NOI18N // "Port:" String proxyPortLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Proxy_Port"); JLabelOperator jloPort = new JLabelOperator(optionsOper, proxyPortLabel); new JTextFieldOperator((JTextField) jloPort.getLabelFor()).setText("80"); // NOI18N optionsOper.ok(); }
Example #2
Source File: MoveFormClassTest.java From netbeans with Apache License 2.0 | 6 votes |
/** Creates subdata package */ public void testCreatePackage() { ProjectsTabOperator pto = new ProjectsTabOperator(); ProjectRootNode prn = pto.getProjectRootNode(getTestProjectName()); prn.select(); Node formnode = new Node(prn, "Source Packages"); // NOI18N formnode.setComparator(new Operator.DefaultStringComparator(true, false)); formnode.select(); runNoBlockPopupOverNode("New|Java Package...", formnode); // NOI18N NbDialogOperator dialog = new NbDialogOperator("New Java Package"); new JTextFieldOperator(dialog,0).typeText( getTestPackageName() + PACKAGE_NAME); new JButtonOperator(dialog, "Finish").push(); }
Example #3
Source File: ThreadBreakpointsTest.java From netbeans with Apache License 2.0 | 6 votes |
/** * */ public void testThreadBreakpointFunctionalityHitCount() throws Throwable { new NewBreakpointAction().perform(); NbDialogOperator dialog = new NbDialogOperator(Utilities.newBreakpointTitle); setBreakpointType(dialog, "Thread"); new JCheckBoxOperator(dialog, 0).changeSelection(true); new JTextFieldOperator(dialog, 0).setText("1"); dialog.ok(); Utilities.startDebugger(); Utilities.checkConsoleLastLineForText("Thread main stopped."); assertTrue("Thread breakpoint does not work.", Utilities.checkConsoleForText("Thread breakpoint hit by thread", 2)); new ContinueAction().perform(); Utilities.checkConsoleLastLineForText(Utilities.runningStatusBarText); assertEquals("There were more than one hit of the breakpoint", Utilities.checkConsoleForNumberOfOccurrences(Utilities.runningStatusBarText, 0), 2); }
Example #4
Source File: TemplateTest.java From netbeans with Apache License 2.0 | 6 votes |
public void openTemplate(String templateName, String category) throws InterruptedException { NewFileWizardOperator nfwo = NewFileWizardOperator.invoke(); nfwo.selectProject(DATA_PROJECT_NAME); Thread.sleep(3000); nfwo.selectCategory(category); nfwo.selectFileType(templateName); nfwo.next(); JComboBoxOperator jcb_package = new JComboBoxOperator(nfwo, 1); jcb_package.clearText(); // jcb_package.enterText("data"); Thread.sleep(1000); if (templateName.equals("Bean Form")) { nfwo.next(); JTextFieldOperator class_name = new JTextFieldOperator(nfwo); class_name.setText("javax.swing.JButton"); //nfwo.finish(); } nfwo.finish(); Thread.sleep(2000); log(templateName + " is created correctly"); }
Example #5
Source File: OpenTempl_defaultPackTest.java From netbeans with Apache License 2.0 | 6 votes |
public void openTemplate(String templateName, String category) throws InterruptedException { NewFileWizardOperator nfwo = NewFileWizardOperator.invoke(); nfwo.selectProject(DATA_PROJECT_NAME); Thread.sleep(3000); nfwo.selectCategory(category); nfwo.selectFileType(templateName); nfwo.next(); JComboBoxOperator jcb_package = new JComboBoxOperator(nfwo, 1); jcb_package.clearText(); Thread.sleep(1000); if (templateName.equals("Bean Form")) { nfwo.next(); JTextFieldOperator class_name = new JTextFieldOperator(nfwo); class_name.setText("javax.swing.JButton"); nfwo.finish(); log(templateName + " is created correctly"); } else { nfwo.finish(); log(templateName + " is created correctly"); Thread.sleep(1000); } }
Example #6
Source File: SimpleJDAProjectTest.java From netbeans with Apache License 2.0 | 6 votes |
/** Creating JDA Basic project */ public void testCreation() throws InterruptedException { new ActionNoBlock("File|New Project",null).perform(); // NOI18N NewProjectWizardOperator op = new NewProjectWizardOperator(); op.selectProject("Java Desktop Application"); // NOI18N op.next(); op.next(); NbDialogOperator newJDAOp = new NbDialogOperator("New Desktop Application"); // NOI18N new JTextFieldOperator(newJDAOp,2).setText(getTestProjectName()); new JButtonOperator(newJDAOp, "Finish").push(); // NOI18N Thread.sleep(15000); FormDesignerOperator fdo= new FormDesignerOperator(getTestPackageName()+"View.java"); fdo.editor(); Thread.sleep(500); DocumentsDialogOperator ddo= DocumentsDialogOperator.invoke(); int[] array={0,1,2}; ddo.selectDocuments(array); Thread.sleep(500); ddo.btCloseDocuments().doClick(); }
Example #7
Source File: actionsTest.java From netbeans with Apache License 2.0 | 6 votes |
private void createForm(String formType, String name) throws InterruptedException { NewFileWizardOperator nfwo = NewFileWizardOperator.invoke(); nfwo.selectProject(DATA_PROJECT_NAME); Thread.sleep(3000); nfwo.selectCategory("Swing GUI Forms"); nfwo.selectFileType(formType); nfwo.next(); JTextFieldOperator form_name = new JTextFieldOperator(nfwo, 0); form_name.setText(name); JComboBoxOperator jcb_package = new JComboBoxOperator(nfwo, 1); jcb_package.selectItem("data"); Thread.sleep(3000); if (formType.equals("Bean Form")) { nfwo.next(); JTextFieldOperator class_name = new JTextFieldOperator(nfwo); class_name.setText("javax.swing.JButton"); nfwo.finish(); log(formType + " is created correctly"); } else { nfwo.finish(); log(formType + " is created correctly"); Thread.sleep(3000); } }
Example #8
Source File: CreateTestTest.java From netbeans with Apache License 2.0 | 6 votes |
/** * Test creation accessed from popup menu * Without public methods and w/o protected methods and w/o friendly * should allow to create anything -- OK should be disabled */ public void testCreateTestByPopup4() { //necessary to delete created tests from testCreateTestByPopup3 Utilities.deleteNode(Utilities.TEST_PACKAGES_PATH + "|" + TEST_PACKAGE_NAME); Node n = Utilities.openFile(Utilities.SRC_PACKAGES_PATH + "|" + TEST_PACKAGE_NAME + "|" + Utilities.TEST_CLASS_NAME); // Utilities.pushCreateTestsPopup(n); n.performPopupActionNoBlock("Tools|Create/Update Tests"); NbDialogOperator ndo = new NbDialogOperator(CREATE_TESTS_DIALOG); JCheckBoxOperator jbo = new JCheckBoxOperator(ndo, 3);//friendly methods System.out.println(jbo.getText()); jbo.push(); JTextFieldOperator tfo = new JTextFieldOperator(ndo); tfo.setText(tfo.getText() + "."); Utilities.takeANap(Utilities.ACTION_TIMEOUT); assertFalse(ndo.btOK().isEnabled()); // OK button should be disabled ndo.btCancel().push(); //cancel the dialog }
Example #9
Source File: CreateTestTest.java From netbeans with Apache License 2.0 | 6 votes |
/** * Test creation accessed from wizard */ public void testCreateTestByWizard() { //necessary to delete created tests previous Utilities.takeANap(Utilities.ACTION_TIMEOUT); Utilities.deleteNode(Utilities.TEST_PACKAGES_PATH + "|" + TEST_PACKAGE_NAME); Utilities.takeANap(Utilities.ACTION_TIMEOUT); NewFileWizardOperator op = NewFileWizardOperator.invoke(); op.selectCategory(Bundle.getString(Utilities.JUNIT_BUNDLE, "Templates/UnitTests")); op.selectFileType(Bundle.getString(Utilities.JUNIT_BUNDLE, "Templates/UnitTests/SimpleJUnitTest.java")); op.next(); new JTextFieldOperator(op,0). setText("org.netbeans.test.junit.testcreation.test.TestClass"); op.finish(); Utilities.takeANap(Utilities.ACTION_TIMEOUT); ref(filter.filter(new EditorOperator(Utilities.TEST_CLASS_NAME + "Test.java").getText())); compareReferenceFiles(); //For some resaon, this couses test to fail // Utilities.deleteNode(Utilities.TEST_PACKAGES_PATH + // "|" + TEST_PACKAGE_NAME); }
Example #10
Source File: CommonUtilities.java From netbeans with Apache License 2.0 | 6 votes |
/** * 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(); } }
Example #11
Source File: SpinnerDemoTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private void changeValues(JFrameOperator jfo, int spinnerIndex) throws Exception { JSpinnerOperator spinner = new JSpinnerOperator(jfo, spinnerIndex); JTextFieldOperator jtfo = new JTextFieldOperator(spinner); float originalFieldValue = decimalFormat.parse(jtfo.getText()).floatValue(); float finalFieldValue; // increment by one the value via spinner spinner.getIncreaseOperator().push(); finalFieldValue = decimalFormat.parse(jtfo.getText()).floatValue(); // check that the value was increased assertTrue("Increment Spinner " + spinner + " (originalFieldValue, actual value: " + originalFieldValue + " " + "< finalFieldValue, actual value = " + finalFieldValue + ")", originalFieldValue < finalFieldValue); // decrease value via spinner spinner.getDecreaseOperator().push(); finalFieldValue = decimalFormat.parse(jtfo.getText()).floatValue(); // check that the value was decrimented assertTrue("Decrement Spinner " + spinner + " (originalFieldValue, actual value: " + originalFieldValue + " " + ">= finalFieldValue, actual value = " + finalFieldValue + ")", originalFieldValue >= finalFieldValue); }
Example #12
Source File: DTDActionsTest.java From netbeans with Apache License 2.0 | 6 votes |
public void testGenerateDocumentation() throws Exception{ final String docName = "dokumentace"; final String fileName = docName+".html"; final String generated = "Generated.*\n"; //dissable showing browser setSwingBrowser(); Node node = WebPagesNode.getInstance(projectName).getChild(dtdfileName, Node.class); new ActionNoBlock(null, Bundle.getString(TOOLS_DOCLET_BUNDLE, "NAME_Generate_Documentation")).perform(node); JDialogOperator op = new JDialogOperator(Bundle.getString(TOOLS_GENERATOR_BUNDLE, "PROP_fileNameTitle")); new JTextFieldOperator(op, 0).setText(docName); new JButtonOperator(op, "OK").push(); Node docNode = WebPagesNode.getInstance(projectName).getChild(fileName, Node.class); new ActionNoBlock(null, "Open").performPopup(docNode); Thread.sleep(5000);//wait opening the window String text = new EditorOperator(fileName).getText(); text = text.replaceFirst(generated, generated); ref(text); ending(); }
Example #13
Source File: AddMethodTest.java From netbeans with Apache License 2.0 | 6 votes |
protected void fillExceptions(NbDialogOperator dialog) { if (exceptions != null) { new JTabbedPaneOperator(dialog).selectPage("Exceptions"); for (int i = 0; i < exceptions.length; i++) { new JButtonOperator(dialog, "Add").pushNoBlock(); NbDialogOperator findTypeOper = new NbDialogOperator("Find Type"); new JTextFieldOperator(findTypeOper).setText(exceptions[i]); // wait for list populated JListOperator typesListOper = new JListOperator(findTypeOper); if (exceptions[i].equals("Exception")) { // need to select correct item between other matches typesListOper.selectItem("Exception (java.lang)"); } else { typesListOper.selectItem(exceptions[i]); } findTypeOper.ok(); } } }
Example #14
Source File: OutputOperatorTest.java From netbeans with Apache License 2.0 | 6 votes |
/** * Test of find method */ public void testFind() throws Exception { outputOperator.find(); // "Find" String findTitle = Bundle.getString("org.netbeans.core.output2.Bundle", "LBL_Find_Title"); NbDialogOperator findDialog = new NbDialogOperator(findTitle); // assuming debug string is printed in output at least twice new JTextFieldOperator(findDialog).setText("b"); // NOI18N // "Find" String findButtonLabel = Bundle.getStringTrimmed("org.netbeans.core.output2.Bundle", "BTN_Find"); new JButtonOperator(findDialog, findButtonLabel).push(); // wait a little until "b" is selected new EventTool().waitNoEvent(500); // verify "b" is selected outputOperator.copy(); if (!getClipboardText().equals("b")) { // repeat because find action was not executed outputOperator.find(); findDialog = new NbDialogOperator(findTitle); new JTextFieldOperator(findDialog).setText("b"); // NOI18N new JButtonOperator(findDialog, findButtonLabel).push(); } }
Example #15
Source File: TestBasic.java From netbeans with Apache License 2.0 | 6 votes |
public void testNewCSS() throws Exception { File projectFile = new File (getDataDir(), projectName); openProjects(projectFile.getAbsolutePath()); System.out.println("running testNewCSS + " + projectFile); NewFileWizardOperator nfwo = NewFileWizardOperator.invoke(wizardTitle); nfwo.selectProject(projectName); nfwo.selectCategory("Other"); nfwo.selectFileType("Cascading Style Sheet"); nfwo.next(); WizardOperator newCSSFile = new WizardOperator("New Cascading Style Sheet"); new JTextFieldOperator(newCSSFile, 0).setText(newFileName);//FileName new JTextFieldOperator(newCSSFile, 2).setText("web/css");//Folder newCSSFile.finish(); String text = new EditorOperator(newFileName).getText(); assertTrue(text.contains("root")); assertTrue(text.contains("display:")); assertTrue(text.contains("block")); }
Example #16
Source File: TestKit.java From netbeans with Apache License 2.0 | 6 votes |
public static File prepareProject(String prj_category, String prj_type, String prj_name) throws Exception { //create temporary folder for test String folder = "work" + File.separator + "w" + System.currentTimeMillis(); File file = new File("/tmp", folder); // NOI18N file.mkdirs(); RepositoryMaintenance.deleteFolder(file); file.mkdirs(); //PseudoVersioned project NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke(); npwo.selectCategory(prj_category); npwo.selectProject(prj_type); npwo.next(); NewJavaProjectNameLocationStepOperator npnlso = new NewJavaProjectNameLocationStepOperator(); new JTextFieldOperator(npnlso, 1).setText(file.getAbsolutePath()); new JTextFieldOperator(npnlso, 0).setText(prj_name); new NewProjectWizardOperator().finish(); ProjectSupport.waitScanFinished();//AndQueueEmpty(); // test fails if there is waitForScanAndQueueEmpty()... return file; }
Example #17
Source File: ImportAppRunParams.java From netbeans with Apache License 2.0 | 6 votes |
private void validateProjectJavaVMParams(String projectName) { NbDialogOperator propsDialog = invokeProjectPropertiesDialog(projectName,"Run"); JTextFieldOperator runClass = new JTextFieldOperator(propsDialog, 0); if(!runClass.getText().toString().equals("c.s.t2.SecondRunClass")) { fail("No expected main class set"); } JTextFieldOperator runParams = new JTextFieldOperator(propsDialog, 1); if(!runParams.getText().toString().equals("param1 param2 param3")) { fail("No run parameters passed"); } JTextFieldOperator JVMParams = new JTextFieldOperator(propsDialog, 3); if(!JVMParams.getText().toString().equals("-Xms25m")) { fail("No JVM parameters passed"); } propsDialog.close(); }
Example #18
Source File: IDEValidation.java From netbeans with Apache License 2.0 | 6 votes |
/** Test Options * - open Options window from main menu Tools|Options * - select Editor category * - select Fonts & Colors category * - select Keymap category * - select General category * - pick Manual Proxy Setting * - set Proxy Host to emea-proxy.uk.oracle.com * - set Proxy Port to 80 * - click OK to confirm and close Options window */ public void testOptions() { OptionsOperator optionsOper = OptionsOperator.invoke(); optionsOper.selectEditor(); optionsOper.selectFontAndColors(); optionsOper.selectKeymap(); optionsOper.selectGeneral(); // "Manual Proxy Setting" String hTTPProxyLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Use_HTTP_Proxy"); new JRadioButtonOperator(optionsOper, hTTPProxyLabel).push(); // "HTTP Proxy:" String proxyHostLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Proxy_Host"); JLabelOperator jloHost = new JLabelOperator(optionsOper, proxyHostLabel); new JTextFieldOperator((JTextField) jloHost.getLabelFor()).setText("emea-proxy.uk.oracle.com"); // NOI18N // "Port:" String proxyPortLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Proxy_Port"); JLabelOperator jloPort = new JLabelOperator(optionsOper, proxyPortLabel); new JTextFieldOperator((JTextField) jloPort.getLabelFor()).setText("80"); // NOI18N optionsOper.ok(); }
Example #19
Source File: NewFileWizardsTest.java From netbeans with Apache License 2.0 | 6 votes |
private void puTest(String prjRoot, String name) throws Exception { Project p = J2eeProjectSupport.getProject(new File(projectLocation), prjRoot); NewFileWizardOperator nfwo = WizardUtils.createNewFile(p, "Persistence", "Persistence Unit"); JTextFieldOperator jtfo = new JTextFieldOperator(nfwo, 0); jtfo.clearText(); jtfo.typeText(name); JComboBoxOperator jcbo = new JComboBoxOperator(nfwo, 1); jcbo.selectItem("jdbc/sample"); nfwo.finish(); nfwo.waitClosed(); List<File> files = new ArrayList<File>(); File prjDir = new File(new File(projectLocation), prjRoot).getCanonicalFile(); files.add(new File(prjDir, "src/conf/persistence.xml")); checkFiles(files); }
Example #20
Source File: UseDatabaseTest.java From netbeans with Apache License 2.0 | 6 votes |
protected void addMethod() throws IOException { EditorOperator editor = EditorWindowOperator.getEditor(beanName + "Bean.java"); editor.select("private javax.ejb.SessionContext context;"); GenerateCodeOperator.openDialog(editorPopup, editor); NbDialogOperator chooseDatabaseOper = new NbDialogOperator(dialogTitle); new JButtonOperator(chooseDatabaseOper, "Add...").pushNoBlock(); NbDialogOperator addReferenceOper = new NbDialogOperator("Add Data Source Reference"); new JTextFieldOperator((JTextField) new JLabelOperator(addReferenceOper, "Reference Name:").getLabelFor()).typeText(name); new JButtonOperator(addReferenceOper, "Add...").pushNoBlock(); NbDialogOperator createDataSourceOper = new NbDialogOperator("Create Data Source"); new JTextFieldOperator((JTextField) new JLabelOperator(createDataSourceOper, "JNDI Name:").getLabelFor()).typeText(name); new JComboBoxOperator(createDataSourceOper).selectItem("/sample"); createDataSourceOper.ok(); addReferenceOper.ok(); chooseDatabaseOper.ok(); editor.txtEditorPane().waitText(toSearchInEditor); if (saveFile) { editor.save(); } compareFiles(); }
Example #21
Source File: TestKit.java From netbeans with Apache License 2.0 | 6 votes |
public static File prepareProject(String prj_category, String prj_type, String prj_name) throws Exception { //create temporary folder for test String folder = "work" + File.separator + "w" + System.currentTimeMillis(); File file = new File("/tmp", folder); // NOI18N file.mkdirs(); //PseudoVersioned project NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke(); npwo.selectCategory(prj_category); npwo.selectProject(prj_type); npwo.next(); NewJavaProjectNameLocationStepOperator npnlso = new NewJavaProjectNameLocationStepOperator(); new JTextFieldOperator(npnlso, 1).setText(file.getAbsolutePath()); new JTextFieldOperator(npnlso, 0).setText(prj_name); new NewProjectWizardOperator().finish(); ProjectSupport.waitScanFinished();//AndQueueEmpty(); // test fails if there is waitForScanAndQueueEmpty()... return file; }
Example #22
Source File: PerfIDEValidation.java From netbeans with Apache License 2.0 | 6 votes |
/** Test Options * - open Options window from main menu Tools|Options * - select Editor category * - select Fonts & Colors category * - select Keymap category * - select General category * - pick Manual Proxy Setting * - set Proxy Host to emea-proxy.uk.oracle.com * - set Proxy Port to 80 * - click OK to confirm and close Options window */ public void testOptions() { OptionsOperator optionsOper = OptionsOperator.invoke(); optionsOper.selectEditor(); optionsOper.selectFontAndColors(); optionsOper.selectKeymap(); optionsOper.selectGeneral(); // "Manual Proxy Setting" String hTTPProxyLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Use_HTTP_Proxy"); new JRadioButtonOperator(optionsOper, hTTPProxyLabel).push(); // "HTTP Proxy:" String proxyHostLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Proxy_Host"); JLabelOperator jloHost = new JLabelOperator(optionsOper, proxyHostLabel); new JTextFieldOperator((JTextField) jloHost.getLabelFor()).setText("www-proxy.uk.oracle.com"); // NOI18N // "Port:" String proxyPortLabel = Bundle.getStringTrimmed( "org.netbeans.core.ui.options.general.Bundle", "CTL_Proxy_Port"); JLabelOperator jloPort = new JLabelOperator(optionsOper, proxyPortLabel); new JTextFieldOperator((JTextField) jloPort.getLabelFor()).setText("80"); // NOI18N optionsOper.ok(); }
Example #23
Source File: InternationalizationTestCase.java From netbeans with Apache License 2.0 | 5 votes |
public void createNewPropertiesFile(Node node, String packageName, String fileName) { try { NewFileWizardOperator newWizard = NewFileWizardOperator.invoke(node, "Other", "Properties File"); NewFileNameLocationStepOperator nfnlso = new NewFileNameLocationStepOperator(); nfnlso.setObjectName(fileName); JTextFieldOperator jtfo = new JTextFieldOperator(nfnlso, 2); jtfo.setText(DEF_DIR + SEP + packageName); newWizard.finish(); log("Properties file was correctly created"); } catch (TimeoutExpiredException ex) { log("Creating of new properties file failed !!!"); } }
Example #24
Source File: BlankLinesOperatror.java From netbeans with Apache License 2.0 | 5 votes |
public JTextFieldOperator getBeforeClassClosingBrace() { if(beforeClassClosingBrace==null) { beforeClassClosingBrace = formattingOperator.getTextFieldByLabel("Before Class Closing Brace:"); storeDefaultValue(Settings.BEFORE_CLASS_CLOSING_BRACE); } return beforeClassClosingBrace; }
Example #25
Source File: BlankLinesOperatror.java From netbeans with Apache License 2.0 | 5 votes |
public JTextFieldOperator getAfterMethod() { if(afterMethod==null) { afterMethod = formattingOperator.getTextFieldByLabel("After Method:"); storeDefaultValue(Settings.AFTER_METHOD); } return afterMethod; }
Example #26
Source File: BlankLinesOperatror.java From netbeans with Apache License 2.0 | 5 votes |
public JTextFieldOperator getBeforeMethod() { if(beforeMethod==null) { beforeMethod = formattingOperator.getTextFieldByLabel("Before Method:"); storeDefaultValue(Settings.BEFORE_METHOD); } return beforeMethod; }
Example #27
Source File: SetUpDerbyDatabaseTest.java From netbeans with Apache License 2.0 | 5 votes |
/** Sets db server path and database folder path */ public void testSetupDbPaths() { String derbyHomeDirPath = null; String dbDirPath = null; try { derbyHomeDirPath = getDerbyHomeDir(); dbDirPath = getTempDerbyDbDir(); } catch (Exception e){ fail(e.getMessage()); } if (derbyHomeDirPath != null && dbDirPath != null) { // invoke and catch db settings dialog new ActionNoBlock(DB_SETTINGS_MENU, null).perform(); // NOI18N DialogOperator op = new DialogOperator(DB_SETTINGS_DIALOG_TITLE); // setup derby db home JTextFieldOperator derbyHomeOp = new JTextFieldOperator(op,1); derbyHomeOp.clearText(); derbyHomeOp.typeText(derbyHomeDirPath); // setup database folder JTextFieldOperator dbPathOp = new JTextFieldOperator(op,0); dbPathOp.clearText(); dbPathOp.typeText(dbDirPath); // close settings dialog new JButtonOperator(op,"OK").clickMouse(); // NOI18N } }
Example #28
Source File: BlankLinesOperatror.java From netbeans with Apache License 2.0 | 5 votes |
public JTextFieldOperator getAfterClass() { if(afterClass==null) { afterClass = formattingOperator.getTextFieldByLabel("After Class:"); storeDefaultValue(Settings.AFTER_CLASS); } return afterClass; }
Example #29
Source File: BlankLinesOperatror.java From netbeans with Apache License 2.0 | 5 votes |
public JTextFieldOperator getAfterClassHeader() { if(afterClassHeader==null) { afterClassHeader = formattingOperator.getTextFieldByLabel("After Class Header:"); storeDefaultValue(Settings.AFTER_CLASSHEADER); } return afterClassHeader; }
Example #30
Source File: BlankLinesOperatror.java From netbeans with Apache License 2.0 | 5 votes |
public JTextFieldOperator getAfterField() { if(afterField==null) { afterField = formattingOperator.getTextFieldByLabel("After Field:"); storeDefaultValue(Settings.AFTER_FIELD); } return afterField; }