-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
impl TestNGContainerWizardPage so that users can add "TestNG Library"
via "Build Path -> Add Libraries... -> TestNG"
- Loading branch information
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
49 changes: 49 additions & 0 deletions
49
src/main/org/testng/eclipse/ui/buildpath/TestNGContainerWizardPage.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,49 @@ | ||
package org.testng.eclipse.ui.buildpath; | ||
|
||
import org.eclipse.jdt.core.IClasspathEntry; | ||
import org.eclipse.jdt.core.JavaCore; | ||
import org.eclipse.jdt.ui.wizards.IClasspathContainerPage; | ||
import org.eclipse.jface.dialogs.Dialog; | ||
import org.eclipse.jface.wizard.WizardPage; | ||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.layout.GridLayout; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.swt.widgets.Label; | ||
import org.testng.eclipse.TestNGPlugin; | ||
import org.testng.eclipse.buildpath.TestNGContainerInitializer; | ||
import org.testng.eclipse.util.ResourceUtil; | ||
|
||
public class TestNGContainerWizardPage extends WizardPage implements IClasspathContainerPage { | ||
|
||
public TestNGContainerWizardPage() { | ||
super("TestNGContainerWizardPage"); //$NON-NLS-1$ | ||
setTitle(ResourceUtil.getString("TestNGContainerWizardPage.title")); //$NON-NLS-1$ | ||
setDescription(ResourceUtil.getString("TestNGContainerWizardPage.description")); //$NON-NLS-1$ | ||
setImageDescriptor(TestNGPlugin.getImageDescriptor("wizban/addlibrary_wiz.png")); //$NON-NLS-1$ | ||
} | ||
|
||
public void createControl(Composite parent) { | ||
Composite container = new Composite(parent, SWT.NONE); | ||
GridLayout layout = new GridLayout(); | ||
layout.marginHeight = 0; | ||
layout.marginWidth = 0; | ||
container.setLayout(layout); | ||
|
||
new Label(container, SWT.NONE).setText(ResourceUtil.getString("TestNGContainerWizardPage.message")); //$NON-NLS-1$ | ||
|
||
setControl(container); | ||
Dialog.applyDialogFont(container); | ||
} | ||
|
||
public boolean finish() { | ||
return true; | ||
} | ||
|
||
public IClasspathEntry getSelection() { | ||
return JavaCore.newContainerEntry(TestNGContainerInitializer.TESTNG_PATH); | ||
} | ||
|
||
public void setSelection(IClasspathEntry containerEntry) { | ||
} | ||
|
||
} |