Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1936 Upgrade JavaProjectWizard parts
Signed-off-by: Ondrej Dockal <odockal@redhat.com> modified: plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/m2e/core/ui/wizard/MavenProjectWizardArtifactPage.java
- Loading branch information
Showing
14 changed files
with
386 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...r.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageTwo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2018 Red Hat, Inc and others. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat, Inc - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.reddeer.eclipse.jdt.ui.wizards; | ||
|
||
import org.eclipse.reddeer.core.reference.ReferencedComposite; | ||
import org.eclipse.reddeer.jface.wizard.WizardPage; | ||
import org.eclipse.reddeer.swt.impl.button.CheckBox; | ||
import org.eclipse.reddeer.swt.impl.text.LabeledText; | ||
|
||
/** | ||
* New Java Project wizard page number two | ||
* @author odockal | ||
* | ||
*/ | ||
public class NewJavaProjectWizardPageTwo extends WizardPage { | ||
|
||
public NewJavaProjectWizardPageTwo(ReferencedComposite referencedComposite) { | ||
super(referencedComposite); | ||
} | ||
|
||
/** | ||
* Sets whether to create module-info.java file | ||
* @param check | ||
* Indicates whether to create module-info.java file | ||
* @return | ||
*/ | ||
public NewJavaProjectWizardPageTwo createModuleInfoFile(boolean check) { | ||
CheckBox box = new CheckBox(this, "Create module-info.java file"); | ||
log.debug("Setting 'Create module-info.java file' to " + check); | ||
box.toggle(check); | ||
return this; | ||
} | ||
|
||
/** | ||
* Sets whether to allow output folder for source folders | ||
* @param check | ||
* Indicates whether to allow output folder for source folders | ||
* @return | ||
* this object | ||
*/ | ||
public NewJavaProjectWizardPageTwo allowOutputFoldersForSourceFolders(boolean check) { | ||
CheckBox box = new CheckBox(this, "Allow output folders for source folders"); | ||
log.debug("Setting 'Allow output folders for source folders' to " + check); | ||
box.toggle(check); | ||
return this; | ||
} | ||
|
||
/** | ||
* Sets default output folder location | ||
* @param location | ||
* Default output folder location | ||
* @return | ||
* this object | ||
*/ | ||
public NewJavaProjectWizardPageTwo setDefaultOutputFolder(String location) { | ||
log.debug("Setting 'Default output folder' to '" + location + "'"); | ||
LabeledText text = new LabeledText(this, "Default output folder:"); | ||
text.setText(location); | ||
return this; | ||
} | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
...e.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/jdt/ui/wizards/NewModuleInfoDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.eclipse.reddeer.eclipse.jdt.ui.wizards; | ||
|
||
import org.eclipse.reddeer.jface.dialogs.TitleAreaDialog; | ||
import org.eclipse.reddeer.swt.api.Shell; | ||
import org.eclipse.reddeer.swt.impl.button.PushButton; | ||
import org.eclipse.reddeer.swt.impl.text.LabeledText; | ||
import org.hamcrest.Matcher; | ||
|
||
/** | ||
* New Module info java file dialog | ||
* @author odockal | ||
* | ||
*/ | ||
public class NewModuleInfoDialog extends TitleAreaDialog { | ||
|
||
public NewModuleInfoDialog(Shell shell) { | ||
super(shell); | ||
} | ||
|
||
public NewModuleInfoDialog(String text) { | ||
super(text); | ||
} | ||
|
||
public NewModuleInfoDialog(Matcher<?>... matchers) { | ||
super(matchers); | ||
} | ||
|
||
public void setModuleName(String name) { | ||
log.debug("Setting module name to '" + name + "'"); | ||
new LabeledText("Module name:").setText(name); | ||
} | ||
|
||
public void dontCreate() { | ||
log.debug("Don't create module-info.java file"); | ||
new PushButton("Don't Create").click(); | ||
} | ||
|
||
public void create() { | ||
log.debug("Creating module-info.java file"); | ||
new PushButton("Create").click(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.