void (Artifact artifact, final boolean showContent) { final ArtifactEditorSettings settings; if (showContent) { settings = new ArtifactEditorSettings(false, Arrays.asList(PackagingElementFactory.getInstance().getComplexElementTypes())); } else { settings = new ArtifactEditorSettings(false, Collections.emptyList()); } myArtifactEditor = new ArtifactEditorImpl(new MockArtifactsStructureConfigurableContext(), artifact, settings) { @Override protected ArtifactEditorContextImpl createArtifactEditorContext(ArtifactsStructureConfigurableContext parentContext) { return new MockPackagingEditorContext(parentContext, this); } }; myArtifactEditor.createMainComponent(); disposeOnTearDown(myArtifactEditor); }