Skip to content

Commit

Permalink
[abapGit]Folder Logic support while linking a repository (#210)
Browse files Browse the repository at this point in the history
* [abapGit]Folder Logic support while linking a repository

* update the visibility logic of folder logic controls

* Display some folder logic information in wizard during selection
  • Loading branch information
abinbaby-sap authored Aug 26, 2021
1 parent 4d16da6 commit e1ea8ce
Show file tree
Hide file tree
Showing 16 changed files with 478 additions and 165 deletions.
16 changes: 16 additions & 0 deletions org.abapgit.adt.backend/model/abapgitrepositories.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
<details key="name" value="package"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="folderLogic" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="namespace" value="##targetNamespace"/>
<details key="name" value="folderLogic"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="url" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
Expand Down Expand Up @@ -138,6 +145,15 @@
<details key="name" value="repository"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
eType="ecore:EClass ../../com.sap.adt.tools.core.base/model/atom.ecore#//AtomLink"
containment="true" resolveProxies="false">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="namespace" value="http://www.w3.org/2005/Atom"/>
<details key="name" value="link"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
Expand Down
2 changes: 2 additions & 0 deletions org.abapgit.adt.backend/model/abapgitrepositories.genmodel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference abapgitrepositories.ecore#//Repository/links"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute abapgitrepositories.ecore#//Repository/key"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute abapgitrepositories.ecore#//Repository/package"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute abapgitrepositories.ecore#//Repository/folderLogic"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute abapgitrepositories.ecore#//Repository/url"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute abapgitrepositories.ecore#//Repository/branchName"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute abapgitrepositories.ecore#//Repository/createdBy"/>
Expand All @@ -28,6 +29,7 @@
</genClasses>
<genClasses ecoreClass="abapgitrepositories.ecore#//Repositories">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference abapgitrepositories.ecore#//Repositories/repositories"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference abapgitrepositories.ecore#//Repositories/links"/>
</genClasses>
<genClasses ecoreClass="abapgitrepositories.ecore#//DocumentRoot">
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute abapgitrepositories.ecore#//DocumentRoot/mixed"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ public interface IRepositoryService {
String RELATION_PUSH = "http://www.sap.com/adt/abapgit/relations/push"; //$NON-NLS-1$
String RELATION_CHECK = "http://www.sap.com/adt/abapgit/relations/check"; //$NON-NLS-1$
String RELATION_MODIFIED_OBJECTS = "http://www.sap.com/adt/abapgit/relations/pull/modifiedobjects"; //$NON-NLS-1$
String RELATION_FOLDER_LOGIC = "http://www.sap.com/adt/abapgit/relations/folderlogic"; //$NON-NLS-1$

IRepositories getRepositories(IProgressMonitor monitor);

IAbapObjects cloneRepository(String url, String branch, String targetPackage, String transportRequest, String user, String password,
IAbapObjects cloneRepository(String url, String branch, String targetPackage, String folderLogic, String transportRequest, String user,
String password,
IProgressMonitor monitor);

void cloneRepositories(IRepositories repositories, IProgressMonitor monitor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ public IRepositories getRepositories(IProgressMonitor monitor) {
}

@Override
public IAbapObjects cloneRepository(String url, String branch, String targetPackage, String transportRequest, String user,
String password, IProgressMonitor monitor) {
public IAbapObjects cloneRepository(String url, String branch, String targetPackage, String folderLogic, String transportRequest,
String user, String password, IProgressMonitor monitor) {

IRepository repository = AbapgitrepositoriesFactoryImpl.eINSTANCE.createRepository();
repository.setUrl(url);
repository.setPackage(targetPackage);
repository.setFolderLogic(folderLogic);
repository.setBranchName(branch);
if (user != null && !user.isEmpty()) {
repository.setRemoteUser(user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,23 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
*/
int REPOSITORY__PACKAGE = 2;

/**
* The feature id for the '<em><b>Folder Logic</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPOSITORY__FOLDER_LOGIC = 3;

/**
* The feature id for the '<em><b>Url</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPOSITORY__URL = 3;
int REPOSITORY__URL = 4;

/**
* The feature id for the '<em><b>Branch Name</b></em>' attribute.
Expand All @@ -201,7 +210,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__BRANCH_NAME = 4;
int REPOSITORY__BRANCH_NAME = 5;

/**
* The feature id for the '<em><b>Created By</b></em>' attribute.
Expand All @@ -210,7 +219,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__CREATED_BY = 5;
int REPOSITORY__CREATED_BY = 6;

/**
* The feature id for the '<em><b>Created Email</b></em>' attribute.
Expand All @@ -219,7 +228,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__CREATED_EMAIL = 6;
int REPOSITORY__CREATED_EMAIL = 7;

/**
* The feature id for the '<em><b>Created At</b></em>' attribute.
Expand All @@ -228,7 +237,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__CREATED_AT = 7;
int REPOSITORY__CREATED_AT = 8;

/**
* The feature id for the '<em><b>Deserialized At</b></em>' attribute.
Expand All @@ -237,7 +246,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__DESERIALIZED_AT = 8;
int REPOSITORY__DESERIALIZED_AT = 9;

/**
* The feature id for the '<em><b>Deserialized Email</b></em>' attribute.
Expand All @@ -246,7 +255,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__DESERIALIZED_EMAIL = 9;
int REPOSITORY__DESERIALIZED_EMAIL = 10;

/**
* The feature id for the '<em><b>Deserialized By</b></em>' attribute.
Expand All @@ -255,7 +264,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__DESERIALIZED_BY = 10;
int REPOSITORY__DESERIALIZED_BY = 11;

/**
* The feature id for the '<em><b>Status</b></em>' attribute.
Expand All @@ -264,7 +273,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__STATUS = 11;
int REPOSITORY__STATUS = 12;

/**
* The feature id for the '<em><b>Status Text</b></em>' attribute.
Expand All @@ -273,7 +282,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__STATUS_TEXT = 12;
int REPOSITORY__STATUS_TEXT = 13;

/**
* The feature id for the '<em><b>Remote User</b></em>' attribute.
Expand All @@ -282,7 +291,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__REMOTE_USER = 13;
int REPOSITORY__REMOTE_USER = 14;

/**
* The feature id for the '<em><b>Remote Password</b></em>' attribute.
Expand All @@ -291,7 +300,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__REMOTE_PASSWORD = 14;
int REPOSITORY__REMOTE_PASSWORD = 15;

/**
* The feature id for the '<em><b>Transport Request</b></em>' attribute.
Expand All @@ -300,7 +309,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY__TRANSPORT_REQUEST = 15;
int REPOSITORY__TRANSPORT_REQUEST = 16;

/**
* The number of structural features of the '<em>Repository</em>' class.
Expand All @@ -309,7 +318,7 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
* @generated
* @ordered
*/
int REPOSITORY_FEATURE_COUNT = 16;
int REPOSITORY_FEATURE_COUNT = 17;

/**
* The number of operations of the '<em>Repository</em>' class.
Expand Down Expand Up @@ -339,14 +348,23 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
*/
int REPOSITORIES__REPOSITORIES = 0;

/**
* The feature id for the '<em><b>Links</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPOSITORIES__LINKS = 1;

/**
* The number of structural features of the '<em>Repositories</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int REPOSITORIES_FEATURE_COUNT = 1;
int REPOSITORIES_FEATURE_COUNT = 2;

/**
* The number of operations of the '<em>Repositories</em>' class.
Expand Down Expand Up @@ -474,6 +492,17 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
*/
EAttribute getRepository_Package();

/**
* Returns the meta object for the attribute '{@link org.abapgit.adt.backend.model.abapgitrepositories.IRepository#getFolderLogic <em>Folder Logic</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Folder Logic</em>'.
* @see org.abapgit.adt.backend.model.abapgitrepositories.IRepository#getFolderLogic()
* @see #getRepository()
* @generated
*/
EAttribute getRepository_FolderLogic();

/**
* Returns the meta object for the attribute '{@link org.abapgit.adt.backend.model.abapgitrepositories.IRepository#getUrl <em>Url</em>}'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -638,6 +667,17 @@ public interface IAbapgitrepositoriesPackage extends EPackage {
*/
EReference getRepositories_Repositories();

/**
* Returns the meta object for the containment reference list '{@link org.abapgit.adt.backend.model.abapgitrepositories.IRepositories#getLinks <em>Links</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Links</em>'.
* @see org.abapgit.adt.backend.model.abapgitrepositories.IRepositories#getLinks()
* @see #getRepositories()
* @generated
*/
EReference getRepositories_Links();

/**
* Returns the meta object for class '{@link org.abapgit.adt.backend.model.abapgitrepositories.IDocumentRoot <em>Document Root</em>}'.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -760,6 +800,14 @@ interface Literals {
*/
EAttribute REPOSITORY__PACKAGE = eINSTANCE.getRepository_Package();

/**
* The meta object literal for the '<em><b>Folder Logic</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute REPOSITORY__FOLDER_LOGIC = eINSTANCE.getRepository_FolderLogic();

/**
* The meta object literal for the '<em><b>Url</b></em>' attribute feature.
* <!-- begin-user-doc -->
Expand Down Expand Up @@ -882,6 +930,14 @@ interface Literals {
*/
EReference REPOSITORIES__REPOSITORIES = eINSTANCE.getRepositories_Repositories();

/**
* The meta object literal for the '<em><b>Links</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference REPOSITORIES__LINKS = eINSTANCE.getRepositories_Links();

/**
* The meta object literal for the '{@link org.abapgit.adt.backend.model.abapgitrepositories.impl.DocumentRootImpl <em>Document Root</em>}' class.
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*/
package org.abapgit.adt.backend.model.abapgitrepositories;

import com.sap.adt.tools.core.model.atom.IAtomLink;
import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;
Expand All @@ -16,6 +17,7 @@
* </p>
* <ul>
* <li>{@link org.abapgit.adt.backend.model.abapgitrepositories.IRepositories#getRepositories <em>Repositories</em>}</li>
* <li>{@link org.abapgit.adt.backend.model.abapgitrepositories.IRepositories#getLinks <em>Links</em>}</li>
* </ul>
*
* @see org.abapgit.adt.backend.model.abapgitrepositories.IAbapgitrepositoriesPackage#getRepositories()
Expand All @@ -36,4 +38,17 @@ public interface IRepositories extends EObject {
*/
EList<IRepository> getRepositories();

/**
* Returns the value of the '<em><b>Links</b></em>' containment reference list.
* The list contents are of type {@link com.sap.adt.tools.core.model.atom.IAtomLink}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Links</em>' containment reference list.
* @see org.abapgit.adt.backend.model.abapgitrepositories.IAbapgitrepositoriesPackage#getRepositories_Links()
* @model containment="true"
* extendedMetaData="kind='element' namespace='http://www.w3.org/2005/Atom' name='link'"
* @generated
*/
EList<IAtomLink> getLinks();

} // IRepositories
Loading

0 comments on commit e1ea8ce

Please sign in to comment.