-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #784 from eclipse-passage/572560-8
Bug 572650 - [Passage] upgrade `licenses` domain model
- Loading branch information
Showing
70 changed files
with
1,060 additions
and
1,043 deletions.
There are no files selected for viewing
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
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
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
28 changes: 28 additions & 0 deletions
28
...rg.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/migration/EReferenceRoute.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,28 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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 | ||
*******************************************************************************/ | ||
package org.eclipse.passage.lic.emf.migration; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.emf.ecore.EReference; | ||
|
||
/** | ||
* @since 2.0 | ||
*/ | ||
public interface EReferenceRoute { | ||
|
||
EReference destination(); | ||
|
||
List<EReference> path(); | ||
|
||
} |
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
30 changes: 30 additions & 0 deletions
30
...eclipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/migration/MigrationException.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,30 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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 | ||
*******************************************************************************/ | ||
package org.eclipse.passage.lic.emf.migration; | ||
|
||
import org.eclipse.emf.ecore.util.FeatureMap.Entry; | ||
|
||
/** | ||
* Indicates failure to recognize and migrate the data entry | ||
* | ||
* @since 2.0 | ||
*/ | ||
public class MigrationException extends Exception { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public MigrationException(Entry entry) { | ||
super(entry.toString()); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...rg.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/migration/MigrationRoutes.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,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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 | ||
*******************************************************************************/ | ||
package org.eclipse.passage.lic.emf.migration; | ||
|
||
import java.util.Optional; | ||
|
||
import org.eclipse.emf.ecore.EClass; | ||
|
||
/** | ||
* @since 2.0 | ||
*/ | ||
public interface MigrationRoutes { | ||
|
||
void define(String found, EAttributeRoute path); | ||
|
||
void define(String found, EReferenceRoute path); | ||
|
||
void ignore(String found, EClass location); | ||
|
||
Optional<EAttributeRoute> attribute(String found, EClass scope); | ||
|
||
Optional<EReferenceRoute> reference(String found, EClass scope); | ||
|
||
boolean ignored(String found, EClass location); | ||
|
||
} |
59 changes: 59 additions & 0 deletions
59
...lipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/migration/SimpleAttributeRoute.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,59 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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 | ||
*******************************************************************************/ | ||
package org.eclipse.passage.lic.emf.migration; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
import org.eclipse.emf.ecore.EAttribute; | ||
import org.eclipse.emf.ecore.EReference; | ||
|
||
/** | ||
* | ||
* @since 2.0 | ||
* | ||
*/ | ||
public final class SimpleAttributeRoute implements EAttributeRoute { | ||
|
||
private final EAttribute destination; | ||
private final List<EReference> path; | ||
|
||
public SimpleAttributeRoute(EAttribute destination) { | ||
this(destination, Collections.emptyList()); | ||
} | ||
|
||
public SimpleAttributeRoute(EAttribute destination, EReference... path) { | ||
this(destination, Arrays.asList(path)); | ||
} | ||
|
||
public SimpleAttributeRoute(EAttribute destination, List<EReference> path) { | ||
Objects.requireNonNull(destination, "SimpleAttributePath::destination"); //$NON-NLS-1$ | ||
Objects.requireNonNull(path, "SimpleAttributePath::path"); //$NON-NLS-1$ | ||
this.destination = destination; | ||
this.path = new ArrayList<>(path); | ||
} | ||
|
||
@Override | ||
public EAttribute destination() { | ||
return destination; | ||
} | ||
|
||
@Override | ||
public List<EReference> path() { | ||
return new ArrayList<>(path); | ||
} | ||
|
||
} |
59 changes: 0 additions & 59 deletions
59
...clipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/migration/SimpleFeatureRoutes.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.