Skip to content

Commit

Permalink
[#1191] "Import Licenses" wizard should support import from archive
Browse files Browse the repository at this point in the history
ImportLicenseDialog is extended with proper hooks
  • Loading branch information
eparovyshnaya committed Feb 18, 2024
1 parent 7d6be71 commit 302bb55
Show file tree
Hide file tree
Showing 13 changed files with 420 additions and 271 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021, 2022 ArSysOp
* Copyright (c) 2021, 2024 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,6 +9,7 @@
*
* Contributors:
* ArSysOp - initial API and implementation
* ArSysOp - further support
*******************************************************************************/
package org.eclipse.passage.lic.internal.base.conditions;

Expand Down Expand Up @@ -43,12 +44,12 @@ public final class LicenseConditions implements Supplier<ServiceInvocationResult

private final Path file;
private final Supplier<ServiceInvocationResult<LicenseReadingService>> owner;
private final Libraries libraries;
private final Optional<Libraries> libraries;

public LicenseConditions(//
Path file, //
Supplier<ServiceInvocationResult<LicenseReadingService>> provider, //
Libraries libraries) {
Optional<Libraries> libraries) {
this.file = file;
this.owner = provider;
this.libraries = libraries;
Expand All @@ -68,7 +69,8 @@ private ServiceInvocationResult<Collection<ConditionPack>> fromProduct() {
}

private ServiceInvocationResult<Collection<ConditionPack>> fromLibraries() {
Optional<ServiceInvocationResult<List<LicenseReadingService>>> request = libraries.licenseReadingServices();
Optional<ServiceInvocationResult<List<LicenseReadingService>>> request = libraries
.flatMap(Libraries::licenseReadingServices);

Check warning on line 73 in bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/conditions/LicenseConditions.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/conditions/LicenseConditions.java#L72-L73

Added lines #L72 - L73 were not covered by tests
if (!request.isPresent()) {
return new BaseServiceInvocationResult<>(Collections.emptyList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.eclipse.passage.lic.jface.EquinoxPassageUI;
import org.eclipse.swt.widgets.Shell;

@SuppressWarnings("restriction")
public final class InspectLicenseHandler {

@Execute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2022 ArSysOp
* Copyright (c) 2022, 2024 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,13 +9,15 @@
*
* Contributors:
* ArSysOp - initial API and implementation
* ArSysOp - further support
*******************************************************************************/
package org.eclipse.passage.lic.internal.jface.dialogs.licensing;

import java.nio.file.Path;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.function.Supplier;

import org.eclipse.passage.lic.api.ServiceInvocationResult;
Expand All @@ -30,10 +32,10 @@
final class AllConditionsFromLicenses implements Supplier<ServiceInvocationResult<Collection<ConditionPack>>> {

private final List<Path> licenses;
private final Libraries libraries;
private final Optional<Libraries> libraries;
private final LicenseReadingServiceRequest product;

AllConditionsFromLicenses(List<Path> licenses, Libraries libraries) {
AllConditionsFromLicenses(List<Path> licenses, Optional<Libraries> libraries) {
this.licenses = licenses;

Check warning on line 39 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/AllConditionsFromLicenses.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/AllConditionsFromLicenses.java#L38-L39

Added lines #L38 - L39 were not covered by tests
this.libraries = libraries;
this.product = new LicenseReadingServiceRequest();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
/*******************************************************************************
* Copyright (c) 2020, 2024 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
* ArSysOp - further support
*******************************************************************************/
package org.eclipse.passage.lic.internal.jface.dialogs.licensing;

import java.util.Collection;
import java.util.stream.Collectors;

import org.eclipse.passage.lic.api.agreements.AgreementToAccept;
import org.eclipse.passage.lic.api.diagnostic.Diagnostic;
import org.eclipse.passage.lic.api.restrictions.ExaminationCertificate;
import org.eclipse.passage.lic.base.diagnostic.DiagnosticExplained;
import org.eclipse.passage.lic.base.diagnostic.NoErrors;
import org.eclipse.passage.lic.base.diagnostic.RequirementStatus;
import org.eclipse.passage.lic.base.diagnostic.RequirementsCoverage;
import org.eclipse.passage.lic.base.restrictions.ExaminationExplained;
import org.eclipse.passage.lic.equinox.ProductContacts;
import org.eclipse.passage.lic.internal.jface.i18n.LicenseStatusDialogMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

public abstract class BaseLicenseStatusDialog extends NotificationDialog {

protected final ExaminationCertificate certificate;
protected final Diagnostic diagnostic;
private GoodIntention intention = new GoodIntention.Nope(); // truly mutable ^:(
private StyledText notice;

protected BaseLicenseStatusDialog(Shell shell, ExaminationCertificate certificate, Diagnostic diagnostic) {
super(shell);
this.certificate = certificate;
this.diagnostic = diagnostic;
}

Check warning on line 46 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L43-L46

Added lines #L43 - L46 were not covered by tests

public final GoodIntention goodIntention() {
return intention;

Check warning on line 49 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L49

Added line #L49 was not covered by tests
}

@Override
protected final void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(LicenseStatusDialogMessages.LicenseStatusDialog_title);
shell.setImage(getDefaultImage());
shell.setSize(840, 600);
}

Check warning on line 58 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L54-L58

Added lines #L54 - L58 were not covered by tests

@Override
protected final void buildUI(Composite parent) {
viewer = new HereTable<RequirementStatus>(parent, RequirementStatus.class) //
.withColumn(LicenseStatusDialogMessages.LicenseStatusDialog_column_id, //
600, RequirementStatus::feature)
.withColumn(LicenseStatusDialogMessages.LicenseStatusDialog_column_status, //
200, RequirementStatus::status)
.viewer();
notice = new StyledText(parent, SWT.BORDER | SWT.READ_ONLY);
notice.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
}

Check warning on line 70 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L62-L70

Added lines #L62 - L70 were not covered by tests

@Override
protected final void inplaceData() {
viewer.setInput(new RequirementsCoverage(certificate).get());
notice.setText(new ProductContacts().get());
}

Check warning on line 76 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L74-L76

Added lines #L74 - L76 were not covered by tests

@Override
protected final void initButtons() {
int button = 1;
new ButtonConfig(button++, this::requestLicense, //
LicenseStatusDialogMessages.LicenseStatusDialog_intention_request, //
LicenseStatusDialogMessages.LicenseStatusDialog_intention_request_tooltip, "")//$NON-NLS-1$
.reside(buttons);
new ButtonConfig(button++, this::importLicense, //
LicenseStatusDialogMessages.LicenseStatusDialog_intention_import, //
LicenseStatusDialogMessages.LicenseStatusDialog_intention_import_tooltip, "") //$NON-NLS-1$
.reside(buttons);
new ButtonConfig(button++, copy(), //
LicenseStatusDialogMessages.LicenseStatusDialog_intention_copy,
LicenseStatusDialogMessages.LicenseStatusDialog_intention_copy_tooltip, "") //$NON-NLS-1$
.reside(buttons);

Check warning on line 92 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L80-L92

Added lines #L80 - L92 were not covered by tests
if (haveUnacceptedAgreements()) {
new ButtonConfig(button++, this::exposeAgreements, //
LicenseStatusDialogMessages.LicenseStatusDialog_intention_accept,
LicenseStatusDialogMessages.LicenseStatusDialog_intention_accept_tooltip, "") //$NON-NLS-1$
.reside(buttons);

Check warning on line 97 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L94-L97

Added lines #L94 - L97 were not covered by tests
}
if (!new NoErrors().test(diagnostic)) {
new ButtonConfig(button++, this::diagnose, //
LicenseStatusDialogMessages.LicenseStatusDialog_intention_diagnose,
LicenseStatusDialogMessages.LicenseStatusDialog_intention_diagnose_tooltip, "") //$NON-NLS-1$
.reside(buttons);

Check warning on line 103 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L100-L103

Added lines #L100 - L103 were not covered by tests
}
}

Check warning on line 105 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L105

Added line #L105 was not covered by tests

@Override
protected final void updateButtonsEnablement() {
// do nothing
}

Check warning on line 110 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L110

Added line #L110 was not covered by tests

@Override
protected final void initMessage() {
new CertificateSummary(certificate).accept(this);
}

Check warning on line 115 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L114-L115

Added lines #L114 - L115 were not covered by tests

protected abstract GoodIntention requestLicenseIntention();

protected abstract GoodIntention importLicenseIntention();

protected abstract GoodIntention diagnoseIntention();

protected abstract GoodIntention exposeLicenseAgreementsIntention(Collection<AgreementToAccept> collection);

private void requestLicense() {
intention = requestLicenseIntention();
super.okPressed();
}

Check warning on line 128 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L126-L128

Added lines #L126 - L128 were not covered by tests

private void importLicense() {
intention = importLicenseIntention();
super.okPressed();
}

Check warning on line 133 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L131-L133

Added lines #L131 - L133 were not covered by tests

private void diagnose() {
intention = diagnoseIntention();
super.okPressed();
}

Check warning on line 138 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L136-L138

Added lines #L136 - L138 were not covered by tests

private void exposeAgreements() {
intention = exposeLicenseAgreementsIntention(toExpose(certificate.agreements()));
super.okPressed();
}

Check warning on line 143 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L141-L143

Added lines #L141 - L143 were not covered by tests

private Collection<AgreementToAccept> toExpose(Collection<AgreementToAccept> agreements) {
return agreements.stream()//
.filter(this::toExpose)//
.collect(Collectors.toList());

Check warning on line 148 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L146-L148

Added lines #L146 - L148 were not covered by tests
}

private boolean toExpose(AgreementToAccept agreement) {
return !agreement.acceptance().accepted() && !agreement.acceptance().error().isPresent();
}

private boolean haveUnacceptedAgreements() {
return certificate.agreements().stream()//
.filter(this::toExpose)//
.findAny()//
.isPresent();

Check warning on line 159 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L156-L159

Added lines #L156 - L159 were not covered by tests
}

private Runnable copy() {
return new CopyToClipboard(this::getShell, //
new ExaminationExplained(certificate), //
new DiagnosticExplained(diagnostic));

Check warning on line 165 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/BaseLicenseStatusDialog.java#L163-L165

Added lines #L163 - L165 were not covered by tests
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package org.eclipse.passage.lic.internal.jface.dialogs.licensing;

import java.nio.file.Path;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;

import org.eclipse.passage.lic.internal.jface.i18n.ImportLicenseDialogMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

public final class FromLocalFileSystem implements LicenseFilesControl {

Check warning on line 18 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java#L18

Added line #L18 was not covered by tests

private Text path;

@Override
public void install(Composite parent, Consumer<List<Path>> onLicenses) {
Composite composite = row(parent, 3);
new Label(composite, SWT.NONE).setText(ImportLicenseDialogMessages.ImportLicenseDialog_path_label);
path = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
path.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
Button browse = new Button(composite, SWT.PUSH);
browse.setText(ImportLicenseDialogMessages.ImportLicenseDialog_browse);
browse.addListener(SWT.Selection, e -> browseAndLoad(onLicenses));
}

Check warning on line 31 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java#L24-L31

Added lines #L24 - L31 were not covered by tests

private void browseAndLoad(Consumer<List<Path>> onLicenses) {
onLicenses.accept(browse());
}

Check warning on line 35 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java#L34-L35

Added lines #L34 - L35 were not covered by tests

private Composite row(Composite parent, int columns) {
Composite row = new Composite(parent, SWT.NONE);
row.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
row.setLayout(new GridLayout(columns, false));
return row;

Check warning on line 41 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java#L38-L41

Added lines #L38 - L41 were not covered by tests
}

private List<Path> browse() {
DirectoryDialog dialog = new DirectoryDialog(path.getShell(), SWT.OPEN | SWT.SHEET);
dialog.setText(ImportLicenseDialogMessages.ImportLicenseDialog_browse_dialog_title);
String folder = dialog.open();

Check warning on line 47 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java#L45-L47

Added lines #L45 - L47 were not covered by tests
if (folder == null) {
return Collections.emptyList();

Check warning on line 49 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java#L49

Added line #L49 was not covered by tests
}
path.setText(folder);
List<Path> licenses = new AllLicensesFromFolder(folder).get();
path.setData(licenses);
return licenses;

Check warning on line 54 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/FromLocalFileSystem.java#L51-L54

Added lines #L51 - L54 were not covered by tests
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2021 ArSysOp
* Copyright (c) 2020, 2024 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -9,6 +9,7 @@
*
* Contributors:
* ArSysOp - initial API and implementation
* ArSysOp - further support
*******************************************************************************/
package org.eclipse.passage.lic.internal.jface.dialogs.licensing;

Expand All @@ -27,7 +28,7 @@ public abstract class GoodIntention {
*/
public abstract boolean paveTheWay();

final static class Nope extends GoodIntention {
public final static class Nope extends GoodIntention {

Check warning on line 31 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java#L31

Added line #L31 was not covered by tests

@Override
public boolean paveTheWay() {
Expand All @@ -36,11 +37,11 @@ public boolean paveTheWay() {

}

final static class ImportLicense extends GoodIntention {
public final static class ImportLicense extends GoodIntention {

private final Supplier<Shell> shell;

ImportLicense(Supplier<Shell> shell) {
public ImportLicense(Supplier<Shell> shell) {

Check warning on line 44 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java#L44

Added line #L44 was not covered by tests
this.shell = shell;
}

Expand All @@ -50,11 +51,11 @@ public boolean paveTheWay() {
}
}

final static class RequestLicense extends GoodIntention {
public final static class RequestLicense extends GoodIntention {

private final Supplier<Shell> shell;

RequestLicense(Supplier<Shell> shell) {
public RequestLicense(Supplier<Shell> shell) {

Check warning on line 58 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java#L58

Added line #L58 was not covered by tests
this.shell = shell;
}

Expand All @@ -65,12 +66,12 @@ public boolean paveTheWay() {
}
}

final static class Diagnose extends GoodIntention {
public final static class Diagnose extends GoodIntention {

private final Supplier<Shell> shell;
private final Diagnostic diagnostic;

Diagnose(Supplier<Shell> shell, Diagnostic diagnostic) {
public Diagnose(Supplier<Shell> shell, Diagnostic diagnostic) {

Check warning on line 74 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java#L74

Added line #L74 was not covered by tests
this.shell = shell;
this.diagnostic = diagnostic;
}
Expand All @@ -82,12 +83,12 @@ public boolean paveTheWay() {
}
}

final static class ExposeLicenseAgreements extends GoodIntention {
public final static class ExposeLicenseAgreements extends GoodIntention {

private final Supplier<Shell> shell;
private final Collection<AgreementToAccept> agreements;

ExposeLicenseAgreements(Supplier<Shell> shell, Collection<AgreementToAccept> agreements) {
public ExposeLicenseAgreements(Supplier<Shell> shell, Collection<AgreementToAccept> agreements) {

Check warning on line 91 in bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java

View check run for this annotation

Codecov / codecov/patch

bundles/org.eclipse.passage.lic.jface/src/org/eclipse/passage/lic/internal/jface/dialogs/licensing/GoodIntention.java#L91

Added line #L91 was not covered by tests
this.shell = shell;
this.agreements = agreements;
}
Expand Down
Loading

0 comments on commit 302bb55

Please sign in to comment.