Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1050 Operator: lic agreement file cannot be located by Agreement editor #1051

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.eclipse.passage.lic.licenses.edit.LicensesEditPlugin;
import org.eclipse.passage.lic.licenses.model.api.FeatureRef;
import org.eclipse.passage.lic.licenses.model.api.LicensePlanFeature;
import org.eclipse.passage.lic.licenses.model.api.VersionMatch;
import org.eclipse.passage.lic.licenses.model.meta.LicensesFactory;
import org.eclipse.passage.lic.licenses.model.meta.LicensesPackage;

Expand Down Expand Up @@ -192,9 +193,13 @@ public String getText(Object object) {
if (identifier == null || identifier.length() == 0) {
identifier = getString("_UI_LicensePlanFeature_type"); //$NON-NLS-1$
}
String version = feature.getVersionMatch().getVersion();
if (version == null || version.length() == 0) {
return identifier;
VersionMatch match = feature.getVersionMatch();
String version = ""; //$NON-NLS-1$
if (match != null) {
version = match.getVersion();
if (version == null || version.length() == 0) {
return identifier;
}
}
return getString("_UI_LicensePlanFeature_text_pattern", new Object[] { identifier, version }); //$NON-NLS-1$
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: org.eclipse.passage.loc.agreements.emfforms
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.passage.loc.agreements.emfforms;singleton:=true
Bundle-Version: 0.8.1.qualifier
Bundle-Version: 0.9.0.qualifier
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static class Supported implements Supplier<List<AgreementFormat>> {
// TODO: get rid of the code in constructor: use CashingFunction from
// ru.arsysop.lang
private final List<AgreementFormat> supported = Arrays.asList(//
new AgreementFormat(".txt", "Text file (*.txt)", "text/plain") //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
new AgreementFormat(".txt", "*.txt", "text/plain") //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
);

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Optional<File> get() {
FileDialog dialog = new FileDialog(shell);
List<AgreementFormat> formats = new AgreementFormat.Supported().get();
dialog.setText("Point an agreement content file"); //$NON-NLS-1$
dialog.setFilterExtensions(filters(formats, AgreementFormat::extention));
dialog.setFilterExtensions(filters(formats, AgreementFormat::description));
dialog.setFilterNames(filters(formats, AgreementFormat::description));
return file(Optional.ofNullable(dialog.open()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class LocDomainRegistryAccess implements EditingDomainRegistryAccess {

@Reference(cardinality = ReferenceCardinality.MULTIPLE)
public void registerEditingDomainRegistry(EditingDomainRegistry<?> instance, Map<String, Object> properties) {
System.out.println("LocDomainRegistryAccess.registerEditingDomainRegistry()"); //$NON-NLS-1$
ruspl-afed marked this conversation as resolved.
Show resolved Hide resolved
String domain = String.valueOf(properties.get(PROPERTY_DOMAIN_NAME));
registerEntry(domainRegistries, domain, instance);
String extension = String.valueOf(properties.get(PROPERTY_FILE_EXTENSION));
Expand Down