Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

AbtractExplorer is relying on having a Tree which is no more the case when there is no project #2003

Closed
apupier opened this issue Mar 12, 2019 · 0 comments
Assignees
Milestone

Comments

@apupier
Copy link
Contributor

apupier commented Mar 12, 2019

Due to this new feature, https://www.eclipse.org/eclipse/news/4.11/platform.php#onboarding-text
Trying to retrieve the list of projects is failing with latest Eclipse version.
The code is still making the assumption that there is always a Tree available https://github.com/eclipse/reddeer/blob/36c8d1287bfde604606e50bd7ac2945f9171c714/plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/ui/navigator/resources/AbstractExplorer.java#L109

example of error stack:

class org.eclipse.swt.widgets.Composite[shell: 'data']
	class org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1[shell: 'data']
		class org.eclipse.swt.widgets.Composite[shell: 'data']
			class org.eclipse.swt.widgets.Composite[shell: 'data']
				class org.eclipse.swt.widgets.Tree[shell: 'data']
				class org.eclipse.swt.widgets.Composite[shell: 'data']
					class org.eclipse.swt.widgets.Composite[shell: 'data']
						class org.eclipse.swt.widgets.Link[shell: 'data'] with text 'There are no projects in your workspace.
To add a project:'
						class org.eclipse.swt.widgets.Composite[shell: 'data']
							class org.eclipse.swt.widgets.Label[shell: 'data'] with text ''
							class org.eclipse.ui.forms.widgets.Hyperlink[shell: 'data'] with text 'Create a Java project'
							class org.eclipse.swt.widgets.Label[shell: 'data'] with text ''
							class org.eclipse.ui.forms.widgets.Hyperlink[shell: 'data'] with text 'Create a project...'
							class org.eclipse.swt.widgets.Label[shell: 'data'] with text ''
							class org.eclipse.ui.forms.widgets.Hyperlink[shell: 'data'] with text 'Import projects...'

	at org.eclipse.reddeer.core.lookup.WidgetLookup.activeWidget(WidgetLookup.java:114)
	at org.eclipse.reddeer.core.lookup.WidgetLookup.activeWidget(WidgetLookup.java:87)
	at org.eclipse.reddeer.swt.widgets.AbstractWidget.<init>(AbstractWidget.java:76)
	at org.eclipse.reddeer.swt.widgets.AbstractControl.<init>(AbstractControl.java:38)
	at org.eclipse.reddeer.swt.impl.tree.AbstractTree.<init>(AbstractTree.java:34)
	at org.eclipse.reddeer.swt.impl.tree.DefaultTree.<init>(DefaultTree.java:81)
	at org.eclipse.reddeer.swt.impl.tree.DefaultTree.<init>(DefaultTree.java:41)
	at org.eclipse.reddeer.eclipse.ui.navigator.resources.AbstractExplorer.getTree(AbstractExplorer.java:171)
	at org.eclipse.reddeer.eclipse.ui.navigator.resources.AbstractExplorer.getProjects(AbstractExplorer.java:109)
	at org.eclipse.reddeer.eclipse.ui.navigator.resources.AbstractExplorer.deleteAllProjects(AbstractExplorer.java:157)
	at org.eclipse.reddeer.eclipse.ui.navigator.resources.AbstractExplorer.deleteAllProjects(AbstractExplorer.java:145)
	at org.eclipse.reddeer.eclipse.ui.navigator.resources.AbstractExplorer.deleteAllProjects(AbstractExplorer.java:136)
	at org.eclipse.reddeer.requirements.cleanworkspace.CleanWorkspaceRequirement.fulfill(CleanWorkspaceRequirement.java:73)
	at org.eclipse.reddeer.junit.internal.requirement.Requirements.runSafely(Requirements.java:110)
	at org.eclipse.reddeer.junit.internal.requirement.Requirements.lambda$6(Requirements.java:105)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.eclipse.reddeer.junit.internal.requirement.Requirements.runSafely(Requirements.java:105)
	at org.eclipse.reddeer.junit.internal.requirement.Requirements.fulfill(Requirements.java:76)
	at org.eclipse.reddeer.junit.internal.runner.statement.FulfillRequirementsStatement.evaluate(FulfillRequirementsStatement.java:45)
	at org.eclipse.reddeer.junit.internal.runner.statement.RunIBeforeClassExtensions.evaluate(RunIBeforeClassExtensions.java:72)
	at org.eclipse.reddeer.junit.internal.runner.statement.RunAfterClasses.evaluate(RunAfterClasses.java:68)
	at org.eclipse.reddeer.junit.internal.runner.statement.CleanUpRequirementStatement.evaluate(CleanUpRequirementStatement.java:45)
	at org.eclipse.reddeer.junit.internal.runner.statement.RunIAfterClassExtensions.evaluate(RunIAfterClassExtensions.java:57)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)```
odockal added a commit to odockal/reddeer that referenced this issue Mar 12, 2019
@odockal odockal self-assigned this Mar 12, 2019
@odockal odockal added this to the 2.5.0 milestone Mar 12, 2019
odockal added a commit to odockal/reddeer that referenced this issue Mar 12, 2019
odockal added a commit to odockal/reddeer that referenced this issue Mar 12, 2019
odockal added a commit to odockal/reddeer that referenced this issue Mar 13, 2019
odockal added a commit to odockal/reddeer that referenced this issue Mar 13, 2019
zcervink pushed a commit to zcervink/reddeer that referenced this issue Apr 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants