├── .gitignore ├── .reuse └── dep5 ├── .travis.yml ├── DEV-GUIDELINES.md ├── LICENSE ├── LICENSES └── MIT.txt ├── README.md ├── org.abapgit.adt.backend ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.core.runtime.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.jdt.ui.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── model │ ├── abapgitabapobject.ecore │ ├── abapgitabapobject.genmodel │ ├── abapgitexternalrepo.ecore │ ├── abapgitexternalrepo.genmodel │ ├── abapgitpullrequest.ecore │ ├── abapgitpullrequest.genmodel │ ├── abapgitrepositories.ecore │ ├── abapgitrepositories.genmodel │ ├── abapgitstaging.ecore │ ├── abapgitstaging.genmodel │ ├── abapgitstagingobjectgrouping.ecore │ ├── abapgitstagingobjectgrouping.genmodel │ ├── agitpullmodifiedobjects.ecore │ └── agitpullmodifiedobjects.genmodel ├── plugin.properties ├── plugin.xml ├── pom.xml └── src │ └── org │ └── abapgit │ └── adt │ └── backend │ ├── ApackServiceFactory.java │ ├── EApackRepositoryType.java │ ├── FileServiceFactory.java │ ├── IApackGitManifestService.java │ ├── IApackManifest.java │ ├── IExternalRepositoryInfoService.java │ ├── IFileService.java │ ├── IRepositoryService.java │ ├── RepositoryServiceFactory.java │ ├── internal │ ├── AbapGitDiscovery.java │ ├── AbapGitPullModifiedObjectsContentHandlerV1.java │ ├── AbapGitPullRequestContentHandler.java │ ├── AbapGitStagingContentHandler.java │ ├── AbapObjectContentHandlerV1.java │ ├── ApackDependency.java │ ├── ApackDiscovery.java │ ├── ApackGitManifestDeserializer.java │ ├── ApackGitManifestRequest.java │ ├── ApackGitManifestRequestContentHandlerV1.java │ ├── ApackGitManifestRequestSerializer.java │ ├── ApackGitManifestResponseContentHandlerV1.java │ ├── ApackGitManifestService.java │ ├── ApackManifest.java │ ├── ApackManifestDescriptor.java │ ├── ApackVersionDependency.java │ ├── ExternalRepositoryInfoRequestContentHandlerV1.java │ ├── ExternalRepositoryInfoResponseContentHandlerV1.java │ ├── ExternalRepositoryInfoService.java │ ├── FileService.java │ ├── IApackGitManifestRequest.java │ ├── RepositoriesContentHandlerV1.java │ ├── RepositoryContentHandlerV1.java │ ├── RepositoryContentHandlerV2.java │ └── RepositoryService.java │ └── model │ ├── abapObjects │ ├── IAbapObject.java │ ├── IAbapObjects.java │ ├── IAbapObjectsFactory.java │ ├── IAbapObjectsPackage.java │ ├── IDocumentRoot.java │ ├── impl │ │ ├── AbapObjectImpl.java │ │ ├── AbapObjectsFactoryImpl.java │ │ ├── AbapObjectsImpl.java │ │ ├── AbapObjectsPackageImpl.java │ │ └── DocumentRootImpl.java │ └── util │ │ ├── AbapObjectsAdapterFactory.java │ │ ├── AbapObjectsResourceFactoryImpl.java │ │ ├── AbapObjectsResourceImpl.java │ │ ├── AbapObjectsSwitch.java │ │ └── AbapObjectsXMLProcessor.java │ ├── abapgitexternalrepo │ ├── AccessMode.java │ ├── IAbapgitexternalrepoFactory.java │ ├── IAbapgitexternalrepoPackage.java │ ├── IBranch.java │ ├── IDocumentRoot.java │ ├── IExternalRepositoryInfo.java │ ├── IExternalRepositoryInfoRequest.java │ ├── impl │ │ ├── AbapgitexternalrepoFactoryImpl.java │ │ ├── AbapgitexternalrepoPackageImpl.java │ │ ├── BranchImpl.java │ │ ├── DocumentRootImpl.java │ │ ├── ExternalRepositoryInfoImpl.java │ │ └── ExternalRepositoryInfoRequestImpl.java │ └── util │ │ ├── AbapgitexternalrepoAdapterFactory.java │ │ ├── AbapgitexternalrepoResourceFactoryImpl.java │ │ ├── AbapgitexternalrepoResourceImpl.java │ │ ├── AbapgitexternalrepoSwitch.java │ │ └── AbapgitexternalrepoXMLProcessor.java │ ├── abapgitpullrequest │ ├── IAbapGitPullRequest.java │ ├── IAbapgitpullrequestFactory.java │ ├── IAbapgitpullrequestPackage.java │ ├── IDocumentRoot.java │ ├── impl │ │ ├── AbapGitPullRequestImpl.java │ │ ├── AbapgitpullrequestFactoryImpl.java │ │ ├── AbapgitpullrequestPackageImpl.java │ │ └── DocumentRootImpl.java │ └── util │ │ ├── AbapgitpullrequestAdapterFactory.java │ │ ├── AbapgitpullrequestResourceFactoryImpl.java │ │ ├── AbapgitpullrequestResourceImpl.java │ │ ├── AbapgitpullrequestSwitch.java │ │ └── AbapgitpullrequestXMLProcessor.java │ ├── abapgitrepositories │ ├── IAbapgitrepositoriesFactory.java │ ├── IAbapgitrepositoriesPackage.java │ ├── IDocumentRoot.java │ ├── IRepositories.java │ ├── IRepository.java │ ├── impl │ │ ├── AbapgitrepositoriesFactoryImpl.java │ │ ├── AbapgitrepositoriesPackageImpl.java │ │ ├── DocumentRootImpl.java │ │ ├── RepositoriesImpl.java │ │ └── RepositoryImpl.java │ └── util │ │ ├── AbapgitrepositoriesAdapterFactory.java │ │ ├── AbapgitrepositoriesResourceFactoryImpl.java │ │ ├── AbapgitrepositoriesResourceImpl.java │ │ ├── AbapgitrepositoriesSwitch.java │ │ └── AbapgitrepositoriesXMLProcessor.java │ ├── abapgitstaging │ ├── IAbapGitCommitMessage.java │ ├── IAbapGitFile.java │ ├── IAbapGitObject.java │ ├── IAbapGitStaging.java │ ├── IAbapgitstagingFactory.java │ ├── IAbapgitstagingPackage.java │ ├── IAuthor.java │ ├── ICommitter.java │ ├── IDocumentRoot.java │ ├── IIgnoredObjects.java │ ├── IStagedObjects.java │ ├── ITransport.java │ ├── IUnstagedObjects.java │ ├── impl │ │ ├── AbapGitCommitMessageImpl.java │ │ ├── AbapGitFileImpl.java │ │ ├── AbapGitObjectImpl.java │ │ ├── AbapGitStagingImpl.java │ │ ├── AbapgitstagingFactoryImpl.java │ │ ├── AbapgitstagingPackageImpl.java │ │ ├── AuthorImpl.java │ │ ├── CommitterImpl.java │ │ ├── DocumentRootImpl.java │ │ ├── IgnoredObjectsImpl.java │ │ ├── StagedObjectsImpl.java │ │ ├── TransportImpl.java │ │ └── UnstagedObjectsImpl.java │ └── util │ │ ├── AbapgitstagingAdapterFactory.java │ │ ├── AbapgitstagingResourceFactoryImpl.java │ │ ├── AbapgitstagingResourceImpl.java │ │ ├── AbapgitstagingSwitch.java │ │ └── AbapgitstagingXMLProcessor.java │ ├── abapgitstagingobjectgrouping │ ├── IAbapGitStagingGroupNode.java │ ├── IAbapgitstagingobjectgroupingFactory.java │ ├── IAbapgitstagingobjectgroupingPackage.java │ ├── IDocumentRoot.java │ ├── impl │ │ ├── AbapGitStagingGroupNodeImpl.java │ │ ├── AbapgitstagingobjectgroupingFactoryImpl.java │ │ ├── AbapgitstagingobjectgroupingPackageImpl.java │ │ └── DocumentRootImpl.java │ └── util │ │ ├── AbapgitstagingobjectgroupingAdapterFactory.java │ │ ├── AbapgitstagingobjectgroupingResourceFactoryImpl.java │ │ ├── AbapgitstagingobjectgroupingResourceImpl.java │ │ ├── AbapgitstagingobjectgroupingSwitch.java │ │ └── AbapgitstagingobjectgroupingXMLProcessor.java │ └── agitpullmodifiedobjects │ ├── IAbapGitPullModifiedObjects.java │ ├── IAgitpullmodifiedobjectsFactory.java │ ├── IAgitpullmodifiedobjectsPackage.java │ ├── IDocumentRoot.java │ ├── IOverwriteObject.java │ ├── IOverwriteObjects.java │ ├── IPackageWarningObjects.java │ ├── impl │ ├── AbapGitPullModifiedObjectsImpl.java │ ├── AgitpullmodifiedobjectsFactoryImpl.java │ ├── AgitpullmodifiedobjectsPackageImpl.java │ ├── DocumentRootImpl.java │ ├── OverwriteObjectImpl.java │ ├── OverwriteObjectsImpl.java │ └── PackageWarningObjectsImpl.java │ └── util │ ├── AgitpullmodifiedobjectsAdapterFactory.java │ ├── AgitpullmodifiedobjectsResourceFactoryImpl.java │ ├── AgitpullmodifiedobjectsResourceImpl.java │ ├── AgitpullmodifiedobjectsSwitch.java │ └── AgitpullmodifiedobjectsXMLProcessor.java ├── org.abapgit.adt.feature ├── .project ├── build.properties ├── feature.xml └── pom.xml ├── org.abapgit.adt.ui ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.core.runtime.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.jdt.ui.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── icons │ ├── etool │ │ ├── compare_view.png │ │ ├── compare_view@2x.png │ │ ├── external_browser.png │ │ ├── external_browser@2x.png │ │ ├── refresh.png │ │ ├── refresh@2x.png │ │ ├── unstage.png │ │ └── unstage@2x.png │ ├── obj │ │ ├── repository.png │ │ └── repository@2x.png │ ├── ovr │ │ ├── added_ovr.png │ │ ├── added_ovr@2x.png │ │ ├── delete_ovr.png │ │ ├── delete_ovr@2x.png │ │ ├── dirty_ovr.png │ │ └── dirty_ovr@2x.png │ ├── view │ │ ├── abapgit.png │ │ ├── abapgit@2x.png │ │ ├── abapgit_staging.png │ │ └── abapgit_staging@2x.png │ └── wizban │ │ ├── abapGit_import_wizban.png │ │ └── abapGit_import_wizban@2x.png ├── plugin.properties ├── plugin.xml ├── pom.xml ├── src │ └── org │ │ └── abapgit │ │ └── adt │ │ └── ui │ │ ├── AbapGitUIPlugin.java │ │ └── internal │ │ ├── dialogs │ │ ├── AbapGitDialogObjLog.java │ │ └── AbapGitStagingCredentialsDialog.java │ │ ├── i18n │ │ ├── Messages.java │ │ └── messages.properties │ │ ├── repositories │ │ ├── AbapGitView.java │ │ ├── IAbapGitRepositoriesView.java │ │ ├── IRepositoryModifiedObjects.java │ │ ├── RepositoryModifiedObjects.java │ │ └── actions │ │ │ └── OpenRepositoryAction.java │ │ ├── staging │ │ ├── AbapGitStagingContentProvider.java │ │ ├── AbapGitStagingGrouping.java │ │ ├── AbapGitStagingLabelProvider.java │ │ ├── AbapGitStagingObjectMenuFactory.java │ │ ├── AbapGitStagingView.java │ │ ├── IAbapGitStagingGrouping.java │ │ ├── IAbapGitStagingView.java │ │ ├── actions │ │ │ ├── CompareAction.java │ │ │ ├── CopyNameAction.java │ │ │ ├── OpenObjectAction.java │ │ │ └── OpenPackageAction.java │ │ ├── compare │ │ │ ├── AbapGitCompareInput.java │ │ │ └── AbapGitCompareItem.java │ │ └── util │ │ │ ├── AbapGitFileEditorInput.java │ │ │ ├── AbapGitStagingGroupingUtil.java │ │ │ ├── AbapGitStagingService.java │ │ │ ├── AbapGitStagingTreeComparator.java │ │ │ ├── AbapGitStagingTreeFilter.java │ │ │ ├── FileStagingModeUtil.java │ │ │ ├── FileStagingModeUtilForGroupNode.java │ │ │ ├── IAbapGitStagingService.java │ │ │ ├── ObjectStagingModeUtil.java │ │ │ ├── ProjectChangeListener.java │ │ │ ├── StagingDragListener.java │ │ │ ├── StagingDragSelection.java │ │ │ └── SwitchRepositoryMenuCreator.java │ │ ├── util │ │ ├── AbapGitObjLogService.java │ │ ├── AbapGitPullService.java │ │ ├── AbapGitService.java │ │ ├── AbapGitUIServiceFactory.java │ │ ├── ErrorHandlingService.java │ │ ├── GitCredentialsService.java │ │ ├── IAbapGitObjLogService.java │ │ ├── IAbapGitPullService.java │ │ ├── IAbapGitService.java │ │ └── RepositoryUtil.java │ │ └── wizards │ │ ├── AbapGitWizard.java │ │ ├── AbapGitWizardPageApack.java │ │ ├── AbapGitWizardPageBranchAndPackage.java │ │ ├── AbapGitWizardPageFolderLogic.java │ │ ├── AbapGitWizardPageObjectsSelectionForPull.java │ │ ├── AbapGitWizardPageRepositoryAndCredentials.java │ │ ├── AbapGitWizardPull.java │ │ └── AbapGitWizardSelectivePullAfterLink.java └── svg │ ├── etool │ └── refresh.svg │ ├── view │ ├── abapGit.svg │ └── abapgit_staging.svg │ └── wizban │ └── abapGit_import_wizban.svg ├── org.abapgit.adt.updatesite ├── .project ├── category.xml └── pom.xml ├── pom.xml ├── spotbugs-exclude.xml └── test ├── org.abapgit.adt.backend.test ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── pom.xml └── src │ └── org │ └── abapgit │ └── adt │ └── backend │ └── internal │ ├── TestsUnitApackDependency.java │ ├── TestsUnitApackVersionDependency.java │ ├── TestsUnitExternalRepoInfoService.java │ └── TestsUnitPullModifiedObjectsContentHandler.java ├── org.abapgit.adt.ui.test ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── pom.xml └── src │ └── org │ └── abapgit │ └── adt │ └── ui │ ├── internal │ ├── dialogs │ │ └── TestsPdeAbapGitStagingCredentialsDialog.java │ ├── repositories │ │ ├── TestsIntegrationRepositoriesView.java │ │ ├── TestsPdeAbapGitRepositories.java │ │ ├── TestsPdeAbapGitRepositoriesUtil.java │ │ └── actions │ │ │ └── TestUnitAbapGitRepositoriesOpenAction.java │ ├── staging │ │ ├── TestsIntegrationStagingView.java │ │ ├── TestsPdeAbapGitStaging.java │ │ └── TestsPdeAbapGitStagingUtil.java │ └── util │ │ ├── TestsUnitAbapGitPullService.java │ │ ├── TestsUnitAbapGitService.java │ │ └── TestsUnitRepositoryUtil.java │ └── test │ └── suite │ ├── AllIntegrationTests.java │ ├── AllPdeTests.java │ └── AllUnitTests.java └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.orig 5 | *.log 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.vi 10 | *.pyc 11 | *~ 12 | ~* 13 | *.bak 14 | *.tmp 15 | *~.nib 16 | mvnw* 17 | .DS_Store 18 | .pmd 19 | 20 | # java specifica 21 | *target* 22 | *.jar 23 | *.war 24 | *.ear 25 | *.class 26 | 27 | # eclipse specific git ignore 28 | .metadata 29 | bin/ 30 | target/ 31 | tmp/ 32 | *.swp 33 | *~.nib 34 | local.properties 35 | .loadpath 36 | 37 | 38 | # External tool builders 39 | .externalToolBuilders/ 40 | 41 | # Locally stored "Eclipse launch configurations" 42 | *.launch 43 | -------------------------------------------------------------------------------- /.reuse/dep5: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: ABAP development tools plug-in for abapGit 3 | Upstream-Contact: Andre Becker 4 | Source: https://github.com/abapGit/abapGit-ADT-plugin 5 | 6 | Files: * 7 | Copyright: 2020 abapGit 8 | License: MIT -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | -------------------------------------------------------------------------------- /DEV-GUIDELINES.md: -------------------------------------------------------------------------------- 1 | # Development Guidelines 2 | 3 | ## Prerequsites 4 | * Java 8 5 | * [Eclipse for RCP and RAP Developers](https://www.eclipse.org/downloads/packages/release/2020-09/r/eclipse-ide-rcp-and-rap-developers) 6 | * Latest [ADT Plugins](https://tools.hana.ondemand.com/#abap) installed in Eclipse for RCP and RAP Developers 7 | * Latest [ADT_Backend](https://github.com/abapGit/ADT_Backend) or [odense-z](https://github.com/abapGit/odense-z) for Z-Namespace or [Project Odense](https://github.com/SAP/project-odense) for SAP Namespace installed via [abapGit](https://github.com/abapGit/abapGit) ([documentation](https://docs.abapgit.org/guide-online-install.html)) on your ABAP system 8 | 9 | ## Import 10 | * Clone git repository on disk 11 | * Import via Eclipse: 12 | * `File` -> `Import` -> `Existing Projects into Workspace` 13 | * Select root directory: `` 14 | * Select All 15 | * Finish 16 | 17 | ## Quality Tools 18 | The below-mentioned tools are used to verify the quality of the source code during submitting a Pull Request: 19 | 20 | * [Spotbugs](https://spotbugs.github.io/) 21 | * Run locally via maven: `mvn clean verify` 22 | 23 | ## Guides 24 | [SAP NetWeaver How-To Guide: SDK for the ABAP Development Tools](https://www.sap.com/documents/2013/04/12289ce1-527c-0010-82c7-eda71af511fa.html) 25 | 26 | ## Troubleshooting 27 | Error `Unrecognized option: --add-modules=ALL-SYSTEM` [Stack Overflow](https://stackoverflow.com/questions/46807468/eclipse-wont-open-in-linux-mint-and-java-wont-open-in-different-directories) 28 | 29 | ## Create new release 30 | New releases will only be accepted by project maintainers. 31 | 32 | ### Versioning 33 | * We stick to the concepts of [Semantic Versioning](https://semver.org/) 34 | * Create a new version 35 | * `mvn tycho-versions:set-version -DnewVersion=` 36 | * Create a "raise version" Pull Request with the updated files. 37 | * After it was merged, create a new git tag with the same version. 38 | 39 | ### Build update site content 40 | * Run `mvn clean verify` 41 | * Open a new Pull Request on https://github.com/abapGit/eclipse.abapgit.org 42 | * Upload binaries and create a release tag -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 abapGit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is furnished 10 | to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 18 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 20 | OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ABAP development tools plug-in for abapGit 2 | [![Build Status](https://travis-ci.com/abapGit/ADT_Frontend.svg?branch=master)](https://travis-ci.com/abapGit/ADT_Frontend) 3 | 4 | The ABAP development tools plug-in for abapGit is a Eclipse plug-in for the control of abapGit functionality via ABAP development tools. 5 | 6 | ## Requirements 7 | * Eclipse with [ABAP Development Tools Plugin](https://tools.hana.ondemand.com/#abap) 8 | * SAP Cloud Platform ABAP Environment aka Steampunk System 9 | * On-Premise ABAP System with 10 | * [abapGit ADT REST](https://github.com/abapGit/ADT_Backend) repository or 11 | * [odense-z](https://github.com/abapGit/odense-z) (experimental) repository installed 12 | 13 | ## Download and Installation 14 | ### Eclipse update site 15 | The latest released version is available via a [Eclipse Update Site](https://eclipse.abapgit.org/updatesite/). 16 | If you add the update site to your Eclipse installation you'll receice always the latest version. 17 | 18 | **Adding the Update Site to your Eclipse installation**: 19 | 20 | In Eclipse, choose in the menu bar `Help` > `Install New Software` and add the URL https://eclipse.abapgit.org/updatesite/ 21 | 22 | ## Limitations 23 | Not all abapGit functionality is available with this plugin! 24 | 25 | ## How to obtain support 26 | Report Bugs via GitHub's bug tracking system. 27 | 28 | A bug is a **demonstrable problem** that is caused by the code in the repository. Good bug reports are extremely helpful - thank you! 29 | 30 | Guidelines for bug reports: 31 | 32 | 1. **Use the GitHub issue search** — check if the issue has already been 33 | reported. 34 | 35 | 2. **Check if the issue has been fixed** — try to reproduce it using the 36 | latest `master` or development branch in the repository. 37 | 38 | 3. **Demonstrate the problem** — provide clear steps that can be reproduced. 39 | 40 | A good bug report should not leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What would you expect to be the outcome? All these details will help to fix any potential bugs. 41 | 42 | ## Contributing & Development Guidelines 43 | See [DEV-GUIDELINES](DEV-GUIDELINES.md) -------------------------------------------------------------------------------- /org.abapgit.adt.backend/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.abapgit.adt.backend 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.pde.PluginNature 26 | org.eclipse.jdt.core.javanature 27 | 28 | 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/.settings/org.eclipse.core.runtime.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | line.separator=\n 3 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | #Mon May 25 12:36:55 CEST 2009 2 | eclipse.preferences.version=1 3 | editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true 4 | formatter_settings_version=11 5 | org.eclipse.jdt.ui.text.custom_code_templates= 6 | sp_cleanup.add_default_serial_version_id=true 7 | sp_cleanup.add_generated_serial_version_id=false 8 | sp_cleanup.add_missing_annotations=false 9 | sp_cleanup.add_missing_deprecated_annotations=true 10 | sp_cleanup.add_missing_methods=false 11 | sp_cleanup.add_missing_nls_tags=false 12 | sp_cleanup.add_missing_override_annotations=true 13 | sp_cleanup.add_serial_version_id=false 14 | sp_cleanup.always_use_blocks=true 15 | sp_cleanup.always_use_parentheses_in_expressions=false 16 | sp_cleanup.always_use_this_for_non_static_field_access=true 17 | sp_cleanup.always_use_this_for_non_static_method_access=false 18 | sp_cleanup.convert_to_enhanced_for_loop=true 19 | sp_cleanup.correct_indentation=false 20 | sp_cleanup.format_source_code=true 21 | sp_cleanup.format_source_code_changes_only=true 22 | sp_cleanup.make_local_variable_final=false 23 | sp_cleanup.make_parameters_final=false 24 | sp_cleanup.make_private_fields_final=true 25 | sp_cleanup.make_type_abstract_if_missing_method=false 26 | sp_cleanup.make_variable_declarations_final=true 27 | sp_cleanup.never_use_blocks=false 28 | sp_cleanup.never_use_parentheses_in_expressions=true 29 | sp_cleanup.on_save_use_additional_actions=true 30 | sp_cleanup.organize_imports=true 31 | sp_cleanup.qualify_static_field_accesses_with_declaring_class=false 32 | sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true 33 | sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true 34 | sp_cleanup.qualify_static_member_accesses_with_declaring_class=false 35 | sp_cleanup.qualify_static_method_accesses_with_declaring_class=false 36 | sp_cleanup.remove_private_constructors=true 37 | sp_cleanup.remove_trailing_whitespaces=true 38 | sp_cleanup.remove_trailing_whitespaces_all=true 39 | sp_cleanup.remove_trailing_whitespaces_ignore_empty=false 40 | sp_cleanup.remove_unnecessary_casts=false 41 | sp_cleanup.remove_unnecessary_nls_tags=false 42 | sp_cleanup.remove_unused_imports=false 43 | sp_cleanup.remove_unused_local_variables=false 44 | sp_cleanup.remove_unused_private_fields=true 45 | sp_cleanup.remove_unused_private_members=false 46 | sp_cleanup.remove_unused_private_methods=true 47 | sp_cleanup.remove_unused_private_types=true 48 | sp_cleanup.sort_members=false 49 | sp_cleanup.sort_members_all=false 50 | sp_cleanup.use_blocks=true 51 | sp_cleanup.use_blocks_only_for_return_and_throw=false 52 | sp_cleanup.use_parentheses_in_expressions=false 53 | sp_cleanup.use_this_for_non_static_field_access=true 54 | sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false 55 | sp_cleanup.use_this_for_non_static_method_access=false 56 | sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true 57 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: %Bundle-Name 4 | Bundle-SymbolicName: org.abapgit.adt.backend;singleton:=true 5 | Bundle-Version: 1.7.12 6 | Bundle-ClassPath: . 7 | Bundle-Vendor: %providerName 8 | Bundle-Localization: plugin 9 | Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)", 10 | org.eclipse.emf.ecore;visibility:=reexport, 11 | org.eclipse.emf.ecore.xmi;visibility:=reexport, 12 | org.abapgit.adt.backend;visibility:=reexport, 13 | com.sap.adt.tools.core.base;visibility:=reexport, 14 | org.eclipse.core.resources;bundle-version="[3.12.0,4.0.0)", 15 | com.sap.adt.compatibility;bundle-version="[2.106.1,4.0.0)", 16 | com.sap.adt.communication;bundle-version="[2.106.1,4.0.0)", 17 | com.sap.adt.tools.core;bundle-version="[2.106.1,4.0.0)", 18 | com.sap.adt.destinations;bundle-version="[2.106.1,4.0.0)", 19 | com.sap.adt.transport;bundle-version="[2.106.1,4.0.0)", 20 | com.sap.adt.communication;bundle-version="[2.106.1,4.0.0)" 21 | Automatic-Module-Name: org.abapgit.adt.backend 22 | Bundle-RequiredExecutionEnvironment: JavaSE-11 23 | Bundle-ActivationPolicy: lazy 24 | Eclipse-ExtensibleAPI: true 25 | Export-Package: org.abapgit.adt.backend; 26 | x-friends:="org.abapgit.adt.ui", 27 | org.abapgit.adt.backend.model.abapgitstaging, 28 | org.abapgit.adt.backend.model.abapgitstaging.impl, 29 | org.abapgit.adt.backend.model.abapgitstaging.util, 30 | org.abapgit.adt.backend.model.abapgitrepositories, 31 | org.abapgit.adt.backend.model.abapgitrepositories.impl, 32 | org.abapgit.adt.backend.model.abapgitrepositories.util, 33 | org.abapgit.adt.backend.model.abapgitexternalrepo, 34 | org.abapgit.adt.backend.model.abapgitexternalrepo.impl, 35 | org.abapgit.adt.backend.model.abapgitexternalrepo.util, 36 | org.abapgit.adt.backend.model.abapObjects, 37 | org.abapgit.adt.backend.model.abapObjects.impl, 38 | org.abapgit.adt.backend.model.abapObjects.util, 39 | org.abapgit.adt.backend.model.abapgitpullrequest, 40 | org.abapgit.adt.backend.model.abapgitpullrequest.impl, 41 | org.abapgit.adt.backend.model.abapgitpullrequest.util, 42 | org.abapgit.adt.backend.model.agitpullmodifiedobjects, 43 | org.abapgit.adt.backend.model.agitpullmodifiedobjects.impl, 44 | org.abapgit.adt.backend.model.agitpullmodifiedobjects.util, 45 | org.abapgit.adt.backend.model.abapgitstagingobjectgrouping, 46 | org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.impl, 47 | org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.util 48 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | 3 | bin.includes = .,\ 4 | model/,\ 5 | META-INF/,\ 6 | plugin.xml,\ 7 | plugin.properties 8 | jars.compile.order = . 9 | source.. = src/ 10 | output.. = bin/ 11 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/model/abapgitabapobject.genmodel: -------------------------------------------------------------------------------- 1 | 2 | 7 | abapgitabapobject.ecore 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/plugin.properties: -------------------------------------------------------------------------------- 1 | #Properties file for org.abapgit.adt.backend 2 | Bundle-Name = abapGit ADT Back End Plug-In 3 | pluginName = abapGit ADT Back End Plug-In 4 | providerName = www.example.org 5 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | org.abapgit.adt.backend 5 | org.abapgit.adt 6 | 1.7.12 7 | org.abapgit.adt.backend 8 | eclipse-plugin 9 | 10 | 11 | org.abapgit.adt.parent 12 | org.abapgit.adt 13 | 1.7.12 14 | ../ 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/ApackServiceFactory.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | import java.net.URI; 4 | 5 | import org.abapgit.adt.backend.internal.ApackDiscovery; 6 | import org.abapgit.adt.backend.internal.ApackGitManifestService; 7 | import org.eclipse.core.runtime.IProgressMonitor; 8 | 9 | public class ApackServiceFactory { 10 | 11 | private ApackServiceFactory() { 12 | // Service class with static methods only... 13 | } 14 | 15 | public static IApackGitManifestService createApackGitManifestService(String destinationId, IProgressMonitor monitor) { 16 | URI uri = new ApackDiscovery().getGitManifestsUri(destinationId, monitor); 17 | if (uri == null) { 18 | return null; 19 | } else { 20 | return new ApackGitManifestService(destinationId, uri); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/EApackRepositoryType.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | public enum EApackRepositoryType { 4 | abapGit; 5 | 6 | public static EApackRepositoryType fromString(String rawString) { 7 | // There is only one possibility at this time... 8 | return EApackRepositoryType.abapGit; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/FileServiceFactory.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | import org.abapgit.adt.backend.internal.FileService; 4 | 5 | public class FileServiceFactory { 6 | private static IFileService instance; 7 | 8 | //singleton 9 | private FileServiceFactory() { 10 | } 11 | 12 | public static IFileService createFileService() { 13 | if (instance == null) { 14 | instance = new FileService(); 15 | } 16 | return instance; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/IApackGitManifestService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | import org.eclipse.core.runtime.IProgressMonitor; 4 | 5 | public interface IApackGitManifestService { 6 | 7 | IApackManifest getManifest(String url, String branch, String user, String password, IProgressMonitor monitor); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/IApackManifest.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | import java.util.List; 4 | 5 | import com.sap.adt.tools.core.model.adtcore.IAdtObjectReference; 6 | 7 | public interface IApackManifest { 8 | 9 | public static final String MASTER_BRANCH = "refs/heads/master"; //$NON-NLS-1$ 10 | 11 | public enum EApackVersionDependencyClassifier { 12 | inclusive, exclusive; 13 | } 14 | 15 | public interface IApackVersionDependency { 16 | String getMinimum(); 17 | 18 | EApackVersionDependencyClassifier getMinimumClassifier(); 19 | 20 | String getMaximum(); 21 | 22 | EApackVersionDependencyClassifier getMaximumClassifier(); 23 | 24 | boolean isVersionCompatible(String version); 25 | 26 | int getMinimumMajor(); 27 | 28 | int getMinimumMinor(); 29 | 30 | int getMinimumPatch(); 31 | 32 | int getMaximumMajor(); 33 | 34 | int getMaximumMinor(); 35 | 36 | int getMaximumPatch(); 37 | 38 | boolean hasRange(); 39 | 40 | boolean isValid(); 41 | } 42 | 43 | public interface IApackDependency { 44 | 45 | String getGroupId(); 46 | 47 | String getArtifactId(); 48 | 49 | IApackVersionDependency getVersion(); 50 | 51 | String getGitUrl(); 52 | 53 | boolean isEmpty(); 54 | 55 | void setTargetPackage(IAdtObjectReference targetPackage); 56 | 57 | IAdtObjectReference getTargetPackage(); 58 | 59 | boolean requiresSynchronization(); 60 | 61 | void setRequiresSynchronization(boolean requiresSynchronization); 62 | 63 | } 64 | 65 | interface IApackManifestDescriptor { 66 | 67 | String getGroupId(); 68 | 69 | String getPackageId(); 70 | 71 | String getVersion(); 72 | 73 | EApackRepositoryType getRepositoryType(); 74 | 75 | String getGitUrl(); 76 | 77 | List getDependencies(); 78 | 79 | void setDependencies(List dependencies); 80 | 81 | void addDependency(IApackDependency dependency); 82 | 83 | } 84 | 85 | IApackManifestDescriptor getDescriptor(); 86 | 87 | boolean hasDependencies(); 88 | 89 | } 90 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/IExternalRepositoryInfoService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | import java.net.URI; 4 | 5 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IBranch; 6 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo; 7 | import org.eclipse.core.runtime.IProgressMonitor; 8 | 9 | public interface IExternalRepositoryInfoService { 10 | 11 | String RELATION_BRANCH_INFO = "http://www.sap.com/adt/abapgit/relations/branchinfo"; //$NON-NLS-1$ 12 | 13 | IExternalRepositoryInfo getExternalRepositoryInfo(String url, String user, String password, IProgressMonitor monitor); 14 | 15 | IBranch getBranchInfo(IExternalRepositoryInfo externalRepositoryInfo, String url, String user, String password, String branch, 16 | String packageName); 17 | 18 | URI getURIForBranchInfo(IExternalRepositoryInfo externalRepoInfo, String branch); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/IFileService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | import java.io.IOException; 4 | import java.util.List; 5 | 6 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfoRequest; 7 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitFile; 8 | 9 | public interface IFileService { 10 | 11 | public final static String RELATION_FILE_FETCH_LOCAL = "http://www.sap.com/adt/abapgit/file/relations/fetch/localversion"; //$NON-NLS-1$ 12 | public final static String RELATION_FILE_FETCH_REMOTE = "http://www.sap.com/adt/abapgit/file/relations/fetch/remoteversion"; //$NON-NLS-1$ 13 | public final static String LOCAL_VERSION = "local"; //$NON-NLS-1$ 14 | public final static String REMOTE_VERSION = "remote"; //$NON-NLS-1$ 15 | public final static String MIME_TEXT_PLAIN = "text/plain"; //$NON-NLS-1$ 16 | 17 | /** 18 | * Fetches the remote file contents of the given abapgit file from the 19 | * backend 20 | * 21 | * @param file 22 | * File whose remote version to be read 23 | * @param credentials 24 | * Repository credentials 25 | * @param destinationId 26 | * Destination ID of the abap project 27 | * 28 | * @return 29 | * @throws IOException 30 | */ 31 | String readRemoteFileContents(IAbapGitFile file, IExternalRepositoryInfoRequest credentials, String destinationId) throws IOException; 32 | 33 | /** 34 | * Fetches the local file contents of the given abapgit file from the 35 | * backend 36 | * 37 | * @param file 38 | * File whose local version to be read 39 | * @param destinationId 40 | * Destination ID of the abap project 41 | * 42 | * @return 43 | * @throws IOException 44 | */ 45 | String readLocalFileContents(IAbapGitFile file, String destinationId) 46 | throws IOException; 47 | 48 | /** 49 | * Fetches the contents of the local and remote versions of the specified 50 | * abapgit file 51 | * 52 | * @param file 53 | * File whose contents are to be read 54 | * @param credentials 55 | * Repository credentials 56 | * @param destinationId 57 | * Destination ID of the abap project 58 | * @return 59 | * @throws IOException 60 | */ 61 | List readFileContentsBatch(IAbapGitFile file, IExternalRepositoryInfoRequest credentials, String destinationId) 62 | throws IOException; 63 | 64 | } 65 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/RepositoryServiceFactory.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend; 2 | 3 | import java.net.URI; 4 | 5 | import org.abapgit.adt.backend.internal.AbapGitDiscovery; 6 | import org.abapgit.adt.backend.internal.ExternalRepositoryInfoService; 7 | import org.abapgit.adt.backend.internal.RepositoryService; 8 | import org.eclipse.core.runtime.IProgressMonitor; 9 | 10 | public class RepositoryServiceFactory { 11 | private RepositoryServiceFactory() { 12 | } 13 | 14 | public static IRepositoryService createRepositoryService(String destinationId, IProgressMonitor monitor) { 15 | URI uri = new AbapGitDiscovery().getReposUri(destinationId, monitor); 16 | if (uri == null) { 17 | return null; 18 | } else { 19 | return new RepositoryService(destinationId, uri); 20 | } 21 | } 22 | 23 | public static IExternalRepositoryInfoService createExternalRepositoryInfoService(String destinationId, 24 | IProgressMonitor monitor) { 25 | URI uri = new AbapGitDiscovery().getExternalRepoInfoUri(destinationId, monitor); 26 | if (uri == null) { 27 | return null; 28 | } else { 29 | return new ExternalRepositoryInfoService(destinationId, uri); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/AbapGitDiscovery.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.net.URI; 4 | 5 | import org.eclipse.core.runtime.IProgressMonitor; 6 | 7 | import com.sap.adt.compatibility.discovery.AdtDiscoveryFactory; 8 | import com.sap.adt.compatibility.discovery.IAdtDiscovery; 9 | import com.sap.adt.compatibility.discovery.IAdtDiscoveryCollectionMember; 10 | 11 | public class AbapGitDiscovery { 12 | 13 | private static final String SCHEME = "http://www.sap.com/adt/categories/abapgit"; //$NON-NLS-1$ 14 | private static final String TERM_REPOS = "repos"; //$NON-NLS-1$ 15 | private static final String TERM_EXTERNAL_REPO_INFO = "externalrepoinfo"; //$NON-NLS-1$ 16 | 17 | public URI getReposUri(String destination, IProgressMonitor monitor) { 18 | return getUri(destination, monitor, SCHEME, TERM_REPOS); 19 | } 20 | 21 | public URI getExternalRepoInfoUri(String destination, IProgressMonitor monitor) { 22 | return getUri(destination, monitor, SCHEME, TERM_EXTERNAL_REPO_INFO); 23 | } 24 | 25 | private URI getUri(String destination, IProgressMonitor monitor, String scheme, String term) { 26 | IAdtDiscovery discovery = AdtDiscoveryFactory.createDiscovery(destination, AdtDiscoveryFactory.RESOURCE_URI); 27 | 28 | IAdtDiscoveryCollectionMember repoMember = discovery.getCollectionMember(scheme, term, monitor); 29 | if (repoMember == null) { 30 | return null; 31 | } 32 | 33 | return repoMember.getUri(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/AbapGitPullModifiedObjectsContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.nio.charset.Charset; 6 | 7 | import org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAbapGitPullModifiedObjects; 8 | import org.abapgit.adt.backend.model.agitpullmodifiedobjects.util.AgitpullmodifiedobjectsResourceFactoryImpl; 9 | import org.eclipse.emf.ecore.EObject; 10 | import org.eclipse.emf.ecore.resource.Resource; 11 | 12 | import com.sap.adt.communication.content.ContentHandlerException; 13 | import com.sap.adt.communication.content.IContentHandler; 14 | import com.sap.adt.communication.message.IMessageBody; 15 | 16 | public class AbapGitPullModifiedObjectsContentHandlerV1 implements IContentHandler { 17 | 18 | private static final String CONTENT_TYPE = "application/abapgit.adt.repo.pull.modified.objs.v1+xml"; //$NON-NLS-1$ 19 | private static final String RESOURCE_NAME = "resource.agitpullmodifiedobjects"; //$NON-NLS-1$ 20 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 21 | 22 | @Override 23 | public IAbapGitPullModifiedObjects deserialize(IMessageBody body, Class dataType) { 24 | try { 25 | InputStream content = body.getContent(); 26 | Resource resource = new AgitpullmodifiedobjectsResourceFactoryImpl().createResource(this.virtualResourceUri); 27 | resource.load(content, null); 28 | IAbapGitPullModifiedObjects objs = loadEmf(resource); 29 | return objs; 30 | 31 | } catch (IOException e) { 32 | throw new ContentHandlerException("Error parsing abapgit pull modified objects", e); //$NON-NLS-1$ 33 | } 34 | } 35 | 36 | public IAbapGitPullModifiedObjects loadEmf(Resource resource) { 37 | //use some virtual resource name 38 | EObject documentRoot = resource.getContents().get(0); 39 | if (documentRoot != null) { 40 | for (EObject element : documentRoot.eContents()) { 41 | if (element instanceof IAbapGitPullModifiedObjects) { 42 | return (IAbapGitPullModifiedObjects) element; 43 | } 44 | } 45 | } 46 | throw new IllegalArgumentException("Invalid XML content - root model entity not found"); //$NON-NLS-1$ 47 | 48 | } 49 | 50 | @Override 51 | public IMessageBody serialize(IAbapGitPullModifiedObjects dataObject, Charset charset) { 52 | return null; 53 | } 54 | 55 | @Override 56 | public String getSupportedContentType() { 57 | return CONTENT_TYPE; 58 | } 59 | 60 | @Override 61 | public Class getSupportedDataType() { 62 | return IAbapGitPullModifiedObjects.class; 63 | 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/AbapGitPullRequestContentHandler.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.nio.charset.Charset; 8 | 9 | import org.abapgit.adt.backend.model.abapgitpullrequest.IAbapGitPullRequest; 10 | import org.abapgit.adt.backend.model.abapgitpullrequest.util.AbapgitpullrequestResourceFactoryImpl; 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import com.sap.adt.communication.content.ContentHandlerException; 14 | import com.sap.adt.communication.content.IContentHandler; 15 | import com.sap.adt.communication.message.AbstractMessageBody; 16 | import com.sap.adt.communication.message.IMessageBody; 17 | import com.sap.adt.communication.util.FileUtils; 18 | 19 | public class AbapGitPullRequestContentHandler implements IContentHandler { 20 | private static final String CONTENT_TYPE = "application/abapgit.adt.repo.pull.req.v1+xml"; //$NON-NLS-1$ 21 | private static final String RESOURCE_NAME = "resource.abapgitpullreq"; //$NON-NLS-1$ 22 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 23 | 24 | @Override 25 | public IAbapGitPullRequest deserialize(IMessageBody body, Class dataType) { 26 | throw new UnsupportedOperationException(); 27 | } 28 | 29 | @Override 30 | public IMessageBody serialize(IAbapGitPullRequest dataObject, Charset charset) { 31 | Resource resource = new AbapgitpullrequestResourceFactoryImpl().createResource(this.virtualResourceUri); 32 | resource.getContents().add(dataObject); 33 | 34 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(FileUtils.DEFAULT_BUF_SIZE); 35 | 36 | try { 37 | resource.save(outputStream, null); 38 | } catch (IOException e) { 39 | throw new ContentHandlerException("Error during serialization of EMF model for Pull request during POST call", e); //$NON-NLS-1$ 40 | } 41 | return new MessageBody(outputStream); 42 | } 43 | 44 | @Override 45 | public String getSupportedContentType() { 46 | return CONTENT_TYPE; 47 | } 48 | 49 | @Override 50 | public Class getSupportedDataType() { 51 | return IAbapGitPullRequest.class; 52 | } 53 | 54 | private static class MessageBody extends AbstractMessageBody { 55 | ByteArrayInputStream stream = null; 56 | 57 | protected MessageBody(ByteArrayOutputStream outputStream) { 58 | super(CONTENT_TYPE); 59 | this.stream = new ByteArrayInputStream(outputStream.toByteArray(), 0, outputStream.size()); 60 | } 61 | 62 | @Override 63 | public InputStream getContent() throws IOException { 64 | return this.stream; 65 | } 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/AbapObjectContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.nio.charset.Charset; 6 | 7 | import org.abapgit.adt.backend.model.abapObjects.IAbapObjects; 8 | import org.abapgit.adt.backend.model.abapObjects.util.AbapObjectsResourceFactoryImpl; 9 | import org.eclipse.emf.ecore.EObject; 10 | import org.eclipse.emf.ecore.resource.Resource; 11 | 12 | import com.sap.adt.communication.content.ContentHandlerException; 13 | import com.sap.adt.communication.content.IContentHandler; 14 | import com.sap.adt.communication.message.IMessageBody; 15 | 16 | public class AbapObjectContentHandlerV1 implements IContentHandler { 17 | private static final String CONTENT_TYPE = "application/abapgit.adt.repo.object.v2+xml"; //$NON-NLS-1$ 18 | private static final String RESOURCE_NAME = "resource.logObject"; //$NON-NLS-1$ 19 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 20 | 21 | @Override 22 | public IAbapObjects deserialize(IMessageBody body, Class dataType) { 23 | try { 24 | InputStream content = body.getContent(); 25 | Resource resource = new AbapObjectsResourceFactoryImpl().createResource(this.virtualResourceUri); 26 | resource.load(content, null); 27 | IAbapObjects objs = loadEmf(resource); 28 | return objs; 29 | 30 | } catch (IOException e) { 31 | throw new ContentHandlerException("Error parsing abapObject Log", e); //$NON-NLS-1$ 32 | } 33 | } 34 | 35 | public IAbapObjects loadEmf(Resource resource) { 36 | //use some virtual resource name 37 | EObject documentRoot = resource.getContents().get(0); 38 | if (documentRoot != null) { 39 | for (EObject element : documentRoot.eContents()) { 40 | if (element instanceof IAbapObjects) { 41 | return (IAbapObjects) element; 42 | } 43 | } 44 | } 45 | throw new IllegalArgumentException("Invalid XML content - root model entity not found"); //$NON-NLS-1$ 46 | 47 | } 48 | 49 | @Override 50 | public String getSupportedContentType() { 51 | return CONTENT_TYPE; 52 | } 53 | 54 | @Override 55 | public Class getSupportedDataType() { 56 | return IAbapObjects.class; 57 | } 58 | 59 | @Override 60 | public IMessageBody serialize(IAbapObjects arg0, Charset arg1) { 61 | return null; 62 | } 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ApackDiscovery.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.net.URI; 4 | 5 | import org.eclipse.core.runtime.IProgressMonitor; 6 | 7 | import com.sap.adt.compatibility.discovery.AdtDiscoveryFactory; 8 | import com.sap.adt.compatibility.discovery.IAdtDiscovery; 9 | import com.sap.adt.compatibility.discovery.IAdtDiscoveryCollectionMember; 10 | 11 | public class ApackDiscovery { 12 | 13 | private static final String SCHEME = "http://www.sap.com/adt/categories/apack"; //$NON-NLS-1$ 14 | private static final String TERM_GIT_MANIFESTS = "gitmanifests"; //$NON-NLS-1$ 15 | 16 | public URI getGitManifestsUri(String destination, IProgressMonitor progressMonitor) { 17 | return getUri(destination, progressMonitor, SCHEME, TERM_GIT_MANIFESTS); 18 | } 19 | 20 | private URI getUri(String destination, IProgressMonitor monitor, String scheme, String term) { 21 | IAdtDiscovery discovery = AdtDiscoveryFactory.createDiscovery(destination, AdtDiscoveryFactory.RESOURCE_URI); 22 | 23 | IAdtDiscoveryCollectionMember collectionMember = discovery.getCollectionMember(scheme, term, monitor); 24 | if (collectionMember == null) { 25 | return null; 26 | } 27 | 28 | return collectionMember.getUri(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ApackGitManifestRequest.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | public class ApackGitManifestRequest implements IApackGitManifestRequest { 4 | 5 | private String url; 6 | private String branch; 7 | private String user; 8 | private String password; 9 | 10 | @Override 11 | public String getUrl() { 12 | return this.url; 13 | } 14 | 15 | @Override 16 | public String getBranch() { 17 | return this.branch; 18 | } 19 | 20 | @Override 21 | public String getUser() { 22 | return this.user; 23 | } 24 | 25 | @Override 26 | public String getPassword() { 27 | return this.password; 28 | } 29 | 30 | public void setUrl(String url) { 31 | this.url = url; 32 | } 33 | 34 | public void setBranch(String branch) { 35 | this.branch = branch; 36 | } 37 | 38 | public void setUser(String user) { 39 | this.user = user; 40 | } 41 | 42 | public void setPassword(String password) { 43 | this.password = password; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ApackGitManifestRequestContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.ByteArrayOutputStream; 4 | import java.nio.charset.Charset; 5 | 6 | import javax.xml.stream.XMLOutputFactory; 7 | import javax.xml.stream.XMLStreamException; 8 | import javax.xml.stream.XMLStreamWriter; 9 | 10 | import com.sap.adt.communication.content.ContentHandlerException; 11 | import com.sap.adt.communication.content.IContentHandler; 12 | import com.sap.adt.communication.message.ByteArrayMessageBody; 13 | import com.sap.adt.communication.message.IMessageBody; 14 | 15 | public class ApackGitManifestRequestContentHandlerV1 implements IContentHandler { 16 | 17 | private static final String CONTENT_TYPE_V1 = "application/apack.adt.gitmanifest.request.v1+xml"; //$NON-NLS-1$ 18 | 19 | @Override 20 | public IApackGitManifestRequest deserialize(IMessageBody body, Class dataType) { 21 | throw new UnsupportedOperationException(); 22 | } 23 | 24 | @Override 25 | public IMessageBody serialize(IApackGitManifestRequest gitManifestRequest, Charset charset) { 26 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 27 | XMLStreamWriter xmlStreamWriter = null; 28 | try { 29 | String encoding = charset == null ? null : charset.name(); 30 | xmlStreamWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(outputStream, encoding); 31 | xmlStreamWriter.writeStartDocument(null, encoding); 32 | new ApackGitManifestRequestSerializer().serializeGitManifestRequest(gitManifestRequest, xmlStreamWriter, 33 | getSupportedContentType()); 34 | xmlStreamWriter.writeEndDocument(); 35 | xmlStreamWriter.flush(); 36 | return new ByteArrayMessageBody(getSupportedContentType(), outputStream.toByteArray()); 37 | } catch (XMLStreamException e) { 38 | throw new ContentHandlerException("Error serializing Git manifest request", e); //$NON-NLS-1$ 39 | } finally { 40 | if (xmlStreamWriter != null) { 41 | try { 42 | xmlStreamWriter.close(); 43 | } catch (XMLStreamException e) { 44 | // ignore 45 | } 46 | } 47 | } 48 | } 49 | 50 | @Override 51 | public String getSupportedContentType() { 52 | return CONTENT_TYPE_V1; 53 | } 54 | 55 | @Override 56 | public Class getSupportedDataType() { 57 | return IApackGitManifestRequest.class; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ApackGitManifestRequestSerializer.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import javax.xml.stream.XMLStreamException; 4 | import javax.xml.stream.XMLStreamWriter; 5 | 6 | public class ApackGitManifestRequestSerializer { 7 | 8 | public void serializeGitManifestRequest(IApackGitManifestRequest gitManifestRequest, 9 | XMLStreamWriter xmlStreamWriter, String supportedContentType) throws XMLStreamException { 10 | xmlStreamWriter.writeStartElement("git_manifest"); //$NON-NLS-1$ 11 | writeElementIfNonEmpty(xmlStreamWriter, "url", gitManifestRequest.getUrl()); //$NON-NLS-1$ 12 | writeElementIfNonEmpty(xmlStreamWriter, "branch", gitManifestRequest.getBranch()); //$NON-NLS-1$ 13 | writeElementIfNonEmpty(xmlStreamWriter, "user", gitManifestRequest.getUser()); //$NON-NLS-1$ 14 | writeElementIfNonEmpty(xmlStreamWriter, "password", gitManifestRequest.getPassword()); //$NON-NLS-1$ 15 | xmlStreamWriter.writeEndElement(); 16 | } 17 | 18 | private void writeElementIfNonEmpty(XMLStreamWriter xmlStreamWriter, String elementName, String content) 19 | throws XMLStreamException { 20 | if (content != null && !content.isEmpty()) { 21 | xmlStreamWriter.writeStartElement(elementName); 22 | xmlStreamWriter.writeCharacters(content); 23 | xmlStreamWriter.writeEndElement(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ApackGitManifestResponseContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.IOException; 4 | import java.nio.charset.Charset; 5 | 6 | import javax.xml.stream.XMLInputFactory; 7 | import javax.xml.stream.XMLStreamException; 8 | import javax.xml.stream.XMLStreamReader; 9 | 10 | import org.abapgit.adt.backend.IApackManifest; 11 | 12 | import com.sap.adt.communication.content.ContentHandlerException; 13 | import com.sap.adt.communication.content.IContentHandler; 14 | import com.sap.adt.communication.message.IMessageBody; 15 | 16 | public class ApackGitManifestResponseContentHandlerV1 implements IContentHandler { 17 | private static final String CONTENT_TYPE_V1 = "application/apack.adt.gitmanifest.response.v1+xml"; //$NON-NLS-1$ 18 | 19 | @Override 20 | public IApackManifest deserialize(IMessageBody body, Class dataType) { 21 | XMLStreamReader xmlStreamReader = null; 22 | try { 23 | xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(body.getContent()); 24 | return new ApackGitManifestDeserializer().deserializeApackManifest(xmlStreamReader); 25 | } catch (IOException | XMLStreamException e) { 26 | throw new ContentHandlerException("Error parsing external repository info", e); //$NON-NLS-1$ 27 | } finally { 28 | if (xmlStreamReader != null) { 29 | try { 30 | xmlStreamReader.close(); 31 | } catch (XMLStreamException e) { 32 | // ignore 33 | } 34 | } 35 | } 36 | } 37 | 38 | @Override 39 | public String getSupportedContentType() { 40 | return CONTENT_TYPE_V1; 41 | } 42 | 43 | @Override 44 | public Class getSupportedDataType() { 45 | return IApackManifest.class; 46 | } 47 | 48 | @Override 49 | public IMessageBody serialize(IApackManifest dataObject, Charset charset) { 50 | throw new UnsupportedOperationException(); 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ApackGitManifestService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.net.URI; 4 | 5 | import org.abapgit.adt.backend.IApackGitManifestService; 6 | import org.abapgit.adt.backend.IApackManifest; 7 | import org.eclipse.core.runtime.IProgressMonitor; 8 | 9 | import com.sap.adt.communication.content.IContentHandler; 10 | import com.sap.adt.communication.resources.AdtRestResourceFactory; 11 | import com.sap.adt.communication.resources.IRestResource; 12 | import com.sap.adt.compatibility.filter.AdtCompatibleRestResourceFilterFactory; 13 | import com.sap.adt.compatibility.filter.IAdtCompatibleRestResourceFilter; 14 | 15 | public class ApackGitManifestService implements IApackGitManifestService { 16 | 17 | private final String destinationId; 18 | private final URI uri; 19 | 20 | public ApackGitManifestService(String destinationId, URI uri) { 21 | this.destinationId = destinationId; 22 | this.uri = uri; 23 | } 24 | 25 | @Override 26 | public IApackManifest getManifest(String url, String branch, String user, String password, IProgressMonitor monitor) { 27 | ApackGitManifestRequest gitManifestRequest = new ApackGitManifestRequest(); 28 | gitManifestRequest.setUrl(url); 29 | gitManifestRequest.setBranch(branch); 30 | gitManifestRequest.setUser(user); 31 | gitManifestRequest.setPassword(password); 32 | 33 | IRestResource restResource = AdtRestResourceFactory.createRestResourceFactory() 34 | .createResourceWithStatelessSession(this.uri, this.destinationId); 35 | 36 | IContentHandler requestContentHandlerV1 = new ApackGitManifestRequestContentHandlerV1(); 37 | restResource.addContentHandler(requestContentHandlerV1); 38 | IContentHandler responseContentHandlerV1 = new ApackGitManifestResponseContentHandlerV1(); 39 | restResource.addContentHandler(responseContentHandlerV1); 40 | 41 | IAdtCompatibleRestResourceFilter compatibilityFilter = AdtCompatibleRestResourceFilterFactory 42 | .createFilter(responseContentHandlerV1); 43 | restResource.addRequestFilter(compatibilityFilter); 44 | restResource.addResponseFilter(compatibilityFilter); 45 | 46 | IApackManifest apackManifest = restResource.post(monitor, IApackManifest.class, gitManifestRequest); 47 | if (apackManifest == null) { 48 | apackManifest = new ApackManifest(); 49 | } 50 | return apackManifest; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ApackManifest.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import org.abapgit.adt.backend.IApackManifest; 4 | 5 | public class ApackManifest implements IApackManifest { 6 | 7 | private IApackManifestDescriptor descriptor; 8 | 9 | @Override 10 | public IApackManifestDescriptor getDescriptor() { 11 | return this.descriptor; 12 | } 13 | 14 | public void setDescriptor(IApackManifestDescriptor descriptor) { 15 | this.descriptor = descriptor; 16 | } 17 | 18 | @Override 19 | public String toString() { 20 | StringBuilder builder = new StringBuilder(); 21 | builder.append("APACK Manifest [descriptor="); //$NON-NLS-1$ 22 | builder.append(this.descriptor); 23 | builder.append("]"); //$NON-NLS-1$ 24 | return builder.toString(); 25 | } 26 | 27 | @Override 28 | public int hashCode() { // NOPMD 29 | final int prime = 31; 30 | int result = 1; 31 | result = prime * result + ((this.descriptor == null) ? 0 : this.descriptor.hashCode()); 32 | return result; 33 | } 34 | 35 | @Override 36 | public boolean equals(Object obj) { // NOPMD 37 | if (this == obj) { 38 | return true; 39 | } 40 | if (obj == null) { 41 | return false; 42 | } 43 | if (getClass() != obj.getClass()) { 44 | return false; 45 | } 46 | ApackManifest other = (ApackManifest) obj; 47 | if (this.descriptor == null) { 48 | if (other.descriptor != null) { 49 | return false; 50 | } 51 | } else if (!this.descriptor.equals(other.descriptor)) { 52 | return false; 53 | } 54 | return true; 55 | } 56 | 57 | @Override 58 | public boolean hasDependencies() { 59 | if (this.descriptor != null && this.descriptor.getDependencies() != null) { 60 | return this.descriptor.getDependencies().size() > 0; 61 | } 62 | return false; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ExternalRepositoryInfoRequestContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.nio.charset.Charset; 8 | 9 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfoRequest; 10 | import org.abapgit.adt.backend.model.abapgitexternalrepo.util.AbapgitexternalrepoResourceFactoryImpl; 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import com.sap.adt.communication.content.ContentHandlerException; 14 | import com.sap.adt.communication.content.IContentHandler; 15 | import com.sap.adt.communication.message.AbstractMessageBody; 16 | import com.sap.adt.communication.message.IMessageBody; 17 | import com.sap.adt.communication.util.FileUtils; 18 | 19 | public class ExternalRepositoryInfoRequestContentHandlerV1 implements IContentHandler { 20 | private static final String CONTENT_TYPE = "application/abapgit.adt.repo.info.ext.request.v2+xml"; //$NON-NLS-1$ 21 | private static final String RESOURCE_NAME = "agit.extRepoReq"; //$NON-NLS-1$ 22 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 23 | 24 | @Override 25 | public IExternalRepositoryInfoRequest deserialize(IMessageBody arg0, Class arg1) { 26 | throw new UnsupportedOperationException(); 27 | } 28 | 29 | @Override 30 | public String getSupportedContentType() { 31 | return CONTENT_TYPE; 32 | } 33 | 34 | @Override 35 | public Class getSupportedDataType() { 36 | return IExternalRepositoryInfoRequest.class; 37 | } 38 | 39 | @Override 40 | public IMessageBody serialize(IExternalRepositoryInfoRequest externalRepositoryInfoRequest, Charset charset) { 41 | 42 | Resource resource = new AbapgitexternalrepoResourceFactoryImpl().createResource(this.virtualResourceUri); 43 | resource.getContents().add(externalRepositoryInfoRequest); 44 | 45 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(FileUtils.DEFAULT_BUF_SIZE); 46 | 47 | try { 48 | resource.save(outputStream, null); 49 | } catch (IOException e) { 50 | throw new ContentHandlerException("Error while serializing external Repository Request ", e); 51 | } 52 | return new MessageBody(outputStream); 53 | 54 | } 55 | 56 | private static class MessageBody extends AbstractMessageBody { 57 | ByteArrayInputStream stream = null; 58 | 59 | protected MessageBody(ByteArrayOutputStream outputStream) { 60 | super(CONTENT_TYPE); 61 | this.stream = new ByteArrayInputStream(outputStream.toByteArray(), 0, outputStream.size()); 62 | } 63 | 64 | @Override 65 | public InputStream getContent() throws IOException { 66 | return this.stream; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/ExternalRepositoryInfoResponseContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.IOException; 4 | import java.nio.charset.Charset; 5 | 6 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo; 7 | import org.abapgit.adt.backend.model.abapgitexternalrepo.util.AbapgitexternalrepoResourceFactoryImpl; 8 | import org.eclipse.emf.ecore.EObject; 9 | import org.eclipse.emf.ecore.resource.Resource; 10 | 11 | import com.sap.adt.communication.content.ContentHandlerException; 12 | import com.sap.adt.communication.content.IContentHandler; 13 | import com.sap.adt.communication.message.IMessageBody; 14 | 15 | public class ExternalRepositoryInfoResponseContentHandlerV1 implements IContentHandler { 16 | private static final String CONTENT_TYPE = "application/abapgit.adt.repo.info.ext.response.v2+xml"; //$NON-NLS-1$ 17 | private static final String RESOURCE_NAME = "resource.agitextRepo"; //$NON-NLS-1$ 18 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 19 | 20 | @Override 21 | public IExternalRepositoryInfo deserialize(IMessageBody body, Class dataType) { 22 | try { 23 | Resource resource = new AbapgitexternalrepoResourceFactoryImpl().createResource(this.virtualResourceUri); 24 | resource.load(body.getContent(), null); 25 | IExternalRepositoryInfo extRepoInfo = loadEmf(resource); 26 | return extRepoInfo; 27 | } catch (IOException e) { 28 | throw new ContentHandlerException("Error while parsing external repository info ", e); //$NON-NLS-1$ 29 | } 30 | } 31 | 32 | @Override 33 | public String getSupportedContentType() { 34 | return CONTENT_TYPE; 35 | } 36 | 37 | @Override 38 | public Class getSupportedDataType() { 39 | return IExternalRepositoryInfo.class; 40 | } 41 | 42 | @Override 43 | public IMessageBody serialize(IExternalRepositoryInfo externalRepositoryInfoRequest, Charset charset) { 44 | throw new UnsupportedOperationException(); 45 | } 46 | 47 | public IExternalRepositoryInfo loadEmf(Resource resource) { 48 | //use some virtual resource name 49 | EObject documentRoot = resource.getContents().get(0); 50 | if (documentRoot != null) { 51 | for (EObject element : documentRoot.eContents()) { 52 | if (element instanceof IExternalRepositoryInfo) { 53 | return (IExternalRepositoryInfo) element; 54 | } 55 | } 56 | } 57 | throw new IllegalArgumentException("Invalid XML content - root model entity not found"); //$NON-NLS-1$ 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/IApackGitManifestRequest.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | public interface IApackGitManifestRequest { 4 | 5 | String getUrl(); 6 | 7 | String getBranch(); 8 | 9 | String getUser(); 10 | 11 | String getPassword(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/RepositoriesContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.nio.charset.Charset; 6 | 7 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepositories; 8 | import org.abapgit.adt.backend.model.abapgitrepositories.util.AbapgitrepositoriesResourceFactoryImpl; 9 | import org.eclipse.emf.ecore.EObject; 10 | import org.eclipse.emf.ecore.resource.Resource; 11 | 12 | import com.sap.adt.communication.content.ContentHandlerException; 13 | import com.sap.adt.communication.content.IContentHandler; 14 | import com.sap.adt.communication.message.IMessageBody; 15 | 16 | public class RepositoriesContentHandlerV1 implements IContentHandler { 17 | private static final String CONTENT_TYPE = "application/abapgit.adt.repos.v2+xml"; //$NON-NLS-1$ 18 | private static final String RESOURCE_NAME = "resource.repos"; //$NON-NLS-1$ 19 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 20 | 21 | @Override 22 | public IRepositories deserialize(IMessageBody body, Class dataType) { 23 | try { 24 | InputStream content = body.getContent(); 25 | Resource resource = new AbapgitrepositoriesResourceFactoryImpl().createResource(this.virtualResourceUri); 26 | resource.load(content, null); 27 | IRepositories repos = loadEmf(resource); 28 | return repos; 29 | } catch (IOException e) { 30 | throw new ContentHandlerException("Error parsing repositories", e); //$NON-NLS-1$ 31 | } 32 | } 33 | 34 | public IRepositories loadEmf(Resource resource) { 35 | //use some virtual resource name 36 | EObject documentRoot = resource.getContents().get(0); 37 | if (documentRoot != null) { 38 | for (EObject element : documentRoot.eContents()) { 39 | if (element instanceof IRepositories) { 40 | return (IRepositories) element; 41 | } 42 | } 43 | } 44 | throw new IllegalArgumentException("Invalid XML content - root model entity not found"); //$NON-NLS-1$ 45 | 46 | } 47 | 48 | @Override 49 | public String getSupportedContentType() { 50 | return CONTENT_TYPE; 51 | } 52 | 53 | @Override 54 | public Class getSupportedDataType() { 55 | return IRepositories.class; 56 | } 57 | 58 | 59 | @Override 60 | public IMessageBody serialize(IRepositories dataObject, Charset charset) { 61 | // TODO Auto-generated method stub 62 | return null; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/RepositoryContentHandlerV1.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.nio.charset.Charset; 8 | 9 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepository; 10 | import org.abapgit.adt.backend.model.abapgitrepositories.util.AbapgitrepositoriesResourceFactoryImpl; 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import com.sap.adt.communication.content.ContentHandlerException; 14 | import com.sap.adt.communication.content.IContentHandler; 15 | import com.sap.adt.communication.message.AbstractMessageBody; 16 | import com.sap.adt.communication.message.IMessageBody; 17 | import com.sap.adt.communication.util.FileUtils; 18 | 19 | public class RepositoryContentHandlerV1 implements IContentHandler { 20 | private static final String CONTENT_TYPE_V3 = "application/abapgit.adt.repo.v3+xml"; //$NON-NLS-1$ 21 | private static final String RESOURCE_NAME = "agit.repo"; //$NON-NLS-1$ 22 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 23 | 24 | @Override 25 | public IRepository deserialize(IMessageBody arg0, Class arg1) { 26 | return null; 27 | } 28 | 29 | @Override 30 | public String getSupportedContentType() { 31 | return CONTENT_TYPE_V3; 32 | } 33 | 34 | @Override 35 | public Class getSupportedDataType() { 36 | return IRepository.class; 37 | } 38 | 39 | @Override 40 | public IMessageBody serialize(IRepository repository, Charset charset) { 41 | 42 | Resource resource = new AbapgitrepositoriesResourceFactoryImpl().createResource(this.virtualResourceUri); 43 | resource.getContents().add(repository); 44 | 45 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(FileUtils.DEFAULT_BUF_SIZE); 46 | 47 | try { 48 | resource.save(outputStream, null); 49 | } catch (IOException e) { 50 | throw new ContentHandlerException("Error while serializing repo ", e); //$NON-NLS-1$ 51 | } 52 | return new MessageBody(outputStream); 53 | 54 | } 55 | 56 | private static class MessageBody extends AbstractMessageBody { 57 | ByteArrayInputStream stream = null; 58 | 59 | protected MessageBody(ByteArrayOutputStream outputStream) { 60 | super(CONTENT_TYPE_V3); 61 | this.stream = new ByteArrayInputStream(outputStream.toByteArray(), 0, outputStream.size()); 62 | } 63 | 64 | @Override 65 | public InputStream getContent() throws IOException { 66 | return this.stream; 67 | } 68 | } 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/internal/RepositoryContentHandlerV2.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.nio.charset.Charset; 8 | 9 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepositories; 10 | import org.abapgit.adt.backend.model.abapgitrepositories.util.AbapgitrepositoriesResourceFactoryImpl; 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import com.sap.adt.communication.content.ContentHandlerException; 14 | import com.sap.adt.communication.content.IContentHandler; 15 | import com.sap.adt.communication.message.AbstractMessageBody; 16 | import com.sap.adt.communication.message.IMessageBody; 17 | import com.sap.adt.communication.util.FileUtils; 18 | 19 | public class RepositoryContentHandlerV2 implements IContentHandler { 20 | private static final String CONTENT_TYPE_V4 = "application/abapgit.adt.repo.v4+xml"; //$NON-NLS-1$ 21 | private static final String RESOURCE_NAME = "agit.repos"; //$NON-NLS-1$ 22 | private final org.eclipse.emf.common.util.URI virtualResourceUri = org.eclipse.emf.common.util.URI.createURI(RESOURCE_NAME); 23 | 24 | @Override 25 | public IRepositories deserialize(IMessageBody arg0, Class arg1) { 26 | return null; 27 | } 28 | 29 | @Override 30 | public String getSupportedContentType() { 31 | return CONTENT_TYPE_V4; 32 | } 33 | 34 | @Override 35 | public Class getSupportedDataType() { 36 | return IRepositories.class; 37 | } 38 | 39 | @Override 40 | public IMessageBody serialize(IRepositories repositories, Charset charset) { 41 | 42 | Resource resource = new AbapgitrepositoriesResourceFactoryImpl().createResource(this.virtualResourceUri); 43 | resource.getContents().add(repositories); 44 | 45 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(FileUtils.DEFAULT_BUF_SIZE); 46 | 47 | try { 48 | resource.save(outputStream, null); 49 | } catch (IOException e) { 50 | throw new ContentHandlerException("Error while serializing repositories ", e); //$NON-NLS-1$ 51 | } 52 | return new MessageBody(outputStream); 53 | } 54 | 55 | private static class MessageBody extends AbstractMessageBody { 56 | ByteArrayInputStream stream = null; 57 | 58 | protected MessageBody(ByteArrayOutputStream outputStream) { 59 | super(CONTENT_TYPE_V4); 60 | this.stream = new ByteArrayInputStream(outputStream.toByteArray(), 0, outputStream.size()); 61 | } 62 | 63 | @Override 64 | public InputStream getContent() throws IOException { 65 | return this.stream; 66 | } 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapObjects/IAbapObjects.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapObjects; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'Abap Objects'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link org.abapgit.adt.backend.model.abapObjects.IAbapObjects#getAbapObjects Abap Objects}
  • 19 | *
20 | * 21 | * @see org.abapgit.adt.backend.model.abapObjects.IAbapObjectsPackage#getAbapObjects() 22 | * @model extendedMetaData="kind='elementOnly' name='abapObjects'" 23 | * @generated 24 | */ 25 | public interface IAbapObjects extends EObject { 26 | /** 27 | * Returns the value of the 'Abap Objects' containment reference list. 28 | * The list contents are of type {@link org.abapgit.adt.backend.model.abapObjects.IAbapObject}. 29 | * 30 | * 31 | * @return the value of the 'Abap Objects' containment reference list. 32 | * @see org.abapgit.adt.backend.model.abapObjects.IAbapObjectsPackage#getAbapObjects_AbapObjects() 33 | * @model containment="true" 34 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='abapObject'" 35 | * @generated 36 | */ 37 | EList getAbapObjects(); 38 | 39 | } // IAbapObjects 40 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapObjects/IAbapObjectsFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapObjects; 4 | 5 | import org.eclipse.emf.ecore.EFactory; 6 | 7 | /** 8 | * 9 | * The Factory for the model. 10 | * It provides a create method for each non-abstract class of the model. 11 | * 12 | * @see org.abapgit.adt.backend.model.abapObjects.IAbapObjectsPackage 13 | * @generated 14 | */ 15 | public interface IAbapObjectsFactory extends EFactory { 16 | /** 17 | * The singleton instance of the factory. 18 | * 19 | * 20 | * @generated 21 | */ 22 | IAbapObjectsFactory eINSTANCE = org.abapgit.adt.backend.model.abapObjects.impl.AbapObjectsFactoryImpl.init(); 23 | 24 | /** 25 | * Returns a new object of class 'Abap Object'. 26 | * 27 | * 28 | * @return a new object of class 'Abap Object'. 29 | * @generated 30 | */ 31 | IAbapObject createAbapObject(); 32 | 33 | /** 34 | * Returns a new object of class 'Abap Objects'. 35 | * 36 | * 37 | * @return a new object of class 'Abap Objects'. 38 | * @generated 39 | */ 40 | IAbapObjects createAbapObjects(); 41 | 42 | /** 43 | * Returns a new object of class 'Document Root'. 44 | * 45 | * 46 | * @return a new object of class 'Document Root'. 47 | * @generated 48 | */ 49 | IDocumentRoot createDocumentRoot(); 50 | 51 | /** 52 | * Returns the package supported by this factory. 53 | * 54 | * 55 | * @return the package supported by this factory. 56 | * @generated 57 | */ 58 | IAbapObjectsPackage getAbapObjectsPackage(); 59 | 60 | } //IAbapObjectsFactory 61 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapObjects/util/AbapObjectsResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapObjects.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 8 | import org.eclipse.emf.ecore.xmi.XMLResource; 9 | 10 | /** 11 | * 12 | * The Resource Factory associated with the package. 13 | * 14 | * @see org.abapgit.adt.backend.model.abapObjects.util.AbapObjectsResourceImpl 15 | * @generated 16 | */ 17 | public class AbapObjectsResourceFactoryImpl extends ResourceFactoryImpl { 18 | /** 19 | * Creates an instance of the resource factory. 20 | * 21 | * 22 | * @generated 23 | */ 24 | public AbapObjectsResourceFactoryImpl() { 25 | super(); 26 | } 27 | 28 | /** 29 | * Creates an instance of the resource. 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | public Resource createResource(URI uri) { 36 | XMLResource result = new AbapObjectsResourceImpl(uri); 37 | result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 38 | result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 39 | 40 | result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); 41 | 42 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 43 | result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 44 | 45 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); 46 | result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE); 47 | 48 | return result; 49 | } 50 | 51 | } //AbapObjectsResourceFactoryImpl 52 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapObjects/util/AbapObjectsResourceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapObjects.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; 8 | 9 | /** 10 | * 11 | * The Resource associated with the package. 12 | * 13 | * @see org.abapgit.adt.backend.model.abapObjects.util.AbapObjectsResourceFactoryImpl 14 | * @generated 15 | */ 16 | public class AbapObjectsResourceImpl extends XMLResourceImpl { 17 | /** 18 | * Creates an instance of the resource. 19 | * 20 | * 21 | * @param uri the URI of the new resource. 22 | * @generated 23 | */ 24 | public AbapObjectsResourceImpl(URI uri) { 25 | super(uri); 26 | } 27 | 28 | } //AbapObjectsResourceImpl 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapObjects/util/AbapObjectsXMLProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapObjects.util; 4 | 5 | import java.util.Map; 6 | 7 | import org.abapgit.adt.backend.model.abapObjects.IAbapObjectsPackage; 8 | 9 | import org.eclipse.emf.ecore.EPackage; 10 | 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; 14 | 15 | /** 16 | * This class contains helper methods to serialize and deserialize XML documents 17 | * 18 | * 19 | * @generated 20 | */ 21 | public class AbapObjectsXMLProcessor extends XMLProcessor { 22 | 23 | /** 24 | * Public constructor to instantiate the helper. 25 | * 26 | * 27 | * @generated 28 | */ 29 | public AbapObjectsXMLProcessor() { 30 | super((EPackage.Registry.INSTANCE)); 31 | IAbapObjectsPackage.eINSTANCE.eClass(); 32 | } 33 | 34 | /** 35 | * Register for "*" and "xml" file extensions the AbapObjectsResourceFactoryImpl factory. 36 | * 37 | * 38 | * @generated 39 | */ 40 | @Override 41 | protected Map getRegistrations() { 42 | if (registrations == null) { 43 | super.getRegistrations(); 44 | registrations.put(XML_EXTENSION, new AbapObjectsResourceFactoryImpl()); 45 | registrations.put(STAR_EXTENSION, new AbapObjectsResourceFactoryImpl()); 46 | } 47 | return registrations; 48 | } 49 | 50 | } //AbapObjectsXMLProcessor 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitexternalrepo/IAbapgitexternalrepoFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitexternalrepo; 4 | 5 | import org.eclipse.emf.ecore.EFactory; 6 | 7 | /** 8 | * 9 | * The Factory for the model. 10 | * It provides a create method for each non-abstract class of the model. 11 | * 12 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.IAbapgitexternalrepoPackage 13 | * @generated 14 | */ 15 | public interface IAbapgitexternalrepoFactory extends EFactory { 16 | /** 17 | * The singleton instance of the factory. 18 | * 19 | * 20 | * @generated 21 | */ 22 | IAbapgitexternalrepoFactory eINSTANCE = org.abapgit.adt.backend.model.abapgitexternalrepo.impl.AbapgitexternalrepoFactoryImpl.init(); 23 | 24 | /** 25 | * Returns a new object of class 'Branch'. 26 | * 27 | * 28 | * @return a new object of class 'Branch'. 29 | * @generated 30 | */ 31 | IBranch createBranch(); 32 | 33 | /** 34 | * Returns a new object of class 'External Repository Info'. 35 | * 36 | * 37 | * @return a new object of class 'External Repository Info'. 38 | * @generated 39 | */ 40 | IExternalRepositoryInfo createExternalRepositoryInfo(); 41 | 42 | /** 43 | * Returns a new object of class 'Document Root'. 44 | * 45 | * 46 | * @return a new object of class 'Document Root'. 47 | * @generated 48 | */ 49 | IDocumentRoot createDocumentRoot(); 50 | 51 | /** 52 | * Returns a new object of class 'External Repository Info Request'. 53 | * 54 | * 55 | * @return a new object of class 'External Repository Info Request'. 56 | * @generated 57 | */ 58 | IExternalRepositoryInfoRequest createExternalRepositoryInfoRequest(); 59 | 60 | /** 61 | * Returns the package supported by this factory. 62 | * 63 | * 64 | * @return the package supported by this factory. 65 | * @generated 66 | */ 67 | IAbapgitexternalrepoPackage getAbapgitexternalrepoPackage(); 68 | 69 | } //IAbapgitexternalrepoFactory 70 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitexternalrepo/IExternalRepositoryInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitexternalrepo; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'External Repository Info'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo#getBranches Branches}
  • 19 | *
  • {@link org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo#getAccessMode Access Mode}
  • 20 | *
21 | * 22 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.IAbapgitexternalrepoPackage#getExternalRepositoryInfo() 23 | * @model extendedMetaData="kind='elementOnly' name='externalRepoInfo'" 24 | * @generated 25 | */ 26 | public interface IExternalRepositoryInfo extends EObject { 27 | /** 28 | * Returns the value of the 'Branches' containment reference list. 29 | * The list contents are of type {@link org.abapgit.adt.backend.model.abapgitexternalrepo.IBranch}. 30 | * 31 | * 32 | * @return the value of the 'Branches' containment reference list. 33 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.IAbapgitexternalrepoPackage#getExternalRepositoryInfo_Branches() 34 | * @model containment="true" 35 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='branch'" 36 | * @generated 37 | */ 38 | EList getBranches(); 39 | 40 | /** 41 | * Returns the value of the 'Access Mode' attribute. 42 | * The literals are from the enumeration {@link org.abapgit.adt.backend.model.abapgitexternalrepo.AccessMode}. 43 | * 44 | * 45 | * @return the value of the 'Access Mode' attribute. 46 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.AccessMode 47 | * @see #setAccessMode(AccessMode) 48 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.IAbapgitexternalrepoPackage#getExternalRepositoryInfo_AccessMode() 49 | * @model extendedMetaData="kind='element' namespace='##targetNamespace'" 50 | * @generated 51 | */ 52 | AccessMode getAccessMode(); 53 | 54 | /** 55 | * Sets the value of the '{@link org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo#getAccessMode Access Mode}' attribute. 56 | * 57 | * 58 | * @param value the new value of the 'Access Mode' attribute. 59 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.AccessMode 60 | * @see #getAccessMode() 61 | * @generated 62 | */ 63 | void setAccessMode(AccessMode value); 64 | 65 | } // IExternalRepositoryInfo 66 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitexternalrepo/util/AbapgitexternalrepoResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitexternalrepo.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 8 | import org.eclipse.emf.ecore.xmi.XMLResource; 9 | 10 | /** 11 | * 12 | * The Resource Factory associated with the package. 13 | * 14 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.util.AbapgitexternalrepoResourceImpl 15 | * @generated 16 | */ 17 | public class AbapgitexternalrepoResourceFactoryImpl extends ResourceFactoryImpl { 18 | /** 19 | * Creates an instance of the resource factory. 20 | * 21 | * 22 | * @generated 23 | */ 24 | public AbapgitexternalrepoResourceFactoryImpl() { 25 | super(); 26 | } 27 | 28 | /** 29 | * Creates an instance of the resource. 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | public Resource createResource(URI uri) { 36 | XMLResource result = new AbapgitexternalrepoResourceImpl(uri); 37 | result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 38 | result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 39 | 40 | result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); 41 | 42 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 43 | result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 44 | 45 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); 46 | result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE); 47 | 48 | return result; 49 | } 50 | 51 | } //AbapgitexternalrepoResourceFactoryImpl 52 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitexternalrepo/util/AbapgitexternalrepoResourceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitexternalrepo.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; 8 | 9 | /** 10 | * 11 | * The Resource associated with the package. 12 | * 13 | * @see org.abapgit.adt.backend.model.abapgitexternalrepo.util.AbapgitexternalrepoResourceFactoryImpl 14 | * @generated 15 | */ 16 | public class AbapgitexternalrepoResourceImpl extends XMLResourceImpl { 17 | /** 18 | * Creates an instance of the resource. 19 | * 20 | * 21 | * @param uri the URI of the new resource. 22 | * @generated 23 | */ 24 | public AbapgitexternalrepoResourceImpl(URI uri) { 25 | super(uri); 26 | } 27 | 28 | } //AbapgitexternalrepoResourceImpl 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitexternalrepo/util/AbapgitexternalrepoXMLProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitexternalrepo.util; 4 | 5 | import java.util.Map; 6 | 7 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IAbapgitexternalrepoPackage; 8 | 9 | import org.eclipse.emf.ecore.EPackage; 10 | 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; 14 | 15 | /** 16 | * This class contains helper methods to serialize and deserialize XML documents 17 | * 18 | * 19 | * @generated 20 | */ 21 | public class AbapgitexternalrepoXMLProcessor extends XMLProcessor { 22 | 23 | /** 24 | * Public constructor to instantiate the helper. 25 | * 26 | * 27 | * @generated 28 | */ 29 | public AbapgitexternalrepoXMLProcessor() { 30 | super((EPackage.Registry.INSTANCE)); 31 | IAbapgitexternalrepoPackage.eINSTANCE.eClass(); 32 | } 33 | 34 | /** 35 | * Register for "*" and "xml" file extensions the AbapgitexternalrepoResourceFactoryImpl factory. 36 | * 37 | * 38 | * @generated 39 | */ 40 | @Override 41 | protected Map getRegistrations() { 42 | if (registrations == null) { 43 | super.getRegistrations(); 44 | registrations.put(XML_EXTENSION, new AbapgitexternalrepoResourceFactoryImpl()); 45 | registrations.put(STAR_EXTENSION, new AbapgitexternalrepoResourceFactoryImpl()); 46 | } 47 | return registrations; 48 | } 49 | 50 | } //AbapgitexternalrepoXMLProcessor 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitpullrequest/IAbapgitpullrequestFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitpullrequest; 4 | 5 | import org.eclipse.emf.ecore.EFactory; 6 | 7 | /** 8 | * 9 | * The Factory for the model. 10 | * It provides a create method for each non-abstract class of the model. 11 | * 12 | * @see org.abapgit.adt.backend.model.abapgitpullrequest.IAbapgitpullrequestPackage 13 | * @generated 14 | */ 15 | public interface IAbapgitpullrequestFactory extends EFactory { 16 | /** 17 | * The singleton instance of the factory. 18 | * 19 | * 20 | * @generated 21 | */ 22 | IAbapgitpullrequestFactory eINSTANCE = org.abapgit.adt.backend.model.abapgitpullrequest.impl.AbapgitpullrequestFactoryImpl.init(); 23 | 24 | /** 25 | * Returns a new object of class 'Document Root'. 26 | * 27 | * 28 | * @return a new object of class 'Document Root'. 29 | * @generated 30 | */ 31 | IDocumentRoot createDocumentRoot(); 32 | 33 | /** 34 | * Returns a new object of class 'Abap Git Pull Request'. 35 | * 36 | * 37 | * @return a new object of class 'Abap Git Pull Request'. 38 | * @generated 39 | */ 40 | IAbapGitPullRequest createAbapGitPullRequest(); 41 | 42 | /** 43 | * Returns the package supported by this factory. 44 | * 45 | * 46 | * @return the package supported by this factory. 47 | * @generated 48 | */ 49 | IAbapgitpullrequestPackage getAbapgitpullrequestPackage(); 50 | 51 | } //IAbapgitpullrequestFactory 52 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitpullrequest/util/AbapgitpullrequestResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitpullrequest.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 8 | import org.eclipse.emf.ecore.xmi.XMLResource; 9 | 10 | /** 11 | * 12 | * The Resource Factory associated with the package. 13 | * 14 | * @see org.abapgit.adt.backend.model.abapgitpullrequest.util.AbapgitpullrequestResourceImpl 15 | * @generated 16 | */ 17 | public class AbapgitpullrequestResourceFactoryImpl extends ResourceFactoryImpl { 18 | /** 19 | * Creates an instance of the resource factory. 20 | * 21 | * 22 | * @generated 23 | */ 24 | public AbapgitpullrequestResourceFactoryImpl() { 25 | super(); 26 | } 27 | 28 | /** 29 | * Creates an instance of the resource. 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | public Resource createResource(URI uri) { 36 | XMLResource result = new AbapgitpullrequestResourceImpl(uri); 37 | result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 38 | result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 39 | 40 | result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); 41 | 42 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 43 | result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 44 | 45 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); 46 | result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE); 47 | return result; 48 | } 49 | 50 | } //AbapgitpullrequestResourceFactoryImpl 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitpullrequest/util/AbapgitpullrequestResourceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitpullrequest.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; 8 | 9 | /** 10 | * 11 | * The Resource associated with the package. 12 | * 13 | * @see org.abapgit.adt.backend.model.abapgitpullrequest.util.AbapgitpullrequestResourceFactoryImpl 14 | * @generated 15 | */ 16 | public class AbapgitpullrequestResourceImpl extends XMLResourceImpl { 17 | /** 18 | * Creates an instance of the resource. 19 | * 20 | * 21 | * @param uri the URI of the new resource. 22 | * @generated 23 | */ 24 | public AbapgitpullrequestResourceImpl(URI uri) { 25 | super(uri); 26 | } 27 | 28 | } //AbapgitpullrequestResourceImpl 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitpullrequest/util/AbapgitpullrequestXMLProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitpullrequest.util; 4 | 5 | import java.util.Map; 6 | 7 | import org.abapgit.adt.backend.model.abapgitpullrequest.IAbapgitpullrequestPackage; 8 | 9 | import org.eclipse.emf.ecore.EPackage; 10 | 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; 14 | 15 | /** 16 | * This class contains helper methods to serialize and deserialize XML documents 17 | * 18 | * 19 | * @generated 20 | */ 21 | public class AbapgitpullrequestXMLProcessor extends XMLProcessor { 22 | 23 | /** 24 | * Public constructor to instantiate the helper. 25 | * 26 | * 27 | * @generated 28 | */ 29 | public AbapgitpullrequestXMLProcessor() { 30 | super((EPackage.Registry.INSTANCE)); 31 | IAbapgitpullrequestPackage.eINSTANCE.eClass(); 32 | } 33 | 34 | /** 35 | * Register for "*" and "xml" file extensions the AbapgitpullrequestResourceFactoryImpl factory. 36 | * 37 | * 38 | * @generated 39 | */ 40 | @Override 41 | protected Map getRegistrations() { 42 | if (registrations == null) { 43 | super.getRegistrations(); 44 | registrations.put(XML_EXTENSION, new AbapgitpullrequestResourceFactoryImpl()); 45 | registrations.put(STAR_EXTENSION, new AbapgitpullrequestResourceFactoryImpl()); 46 | } 47 | return registrations; 48 | } 49 | 50 | } //AbapgitpullrequestXMLProcessor 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitrepositories/IAbapgitrepositoriesFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitrepositories; 4 | 5 | import org.eclipse.emf.ecore.EFactory; 6 | 7 | /** 8 | * 9 | * The Factory for the model. 10 | * It provides a create method for each non-abstract class of the model. 11 | * 12 | * @see org.abapgit.adt.backend.model.abapgitrepositories.IAbapgitrepositoriesPackage 13 | * @generated 14 | */ 15 | public interface IAbapgitrepositoriesFactory extends EFactory { 16 | /** 17 | * The singleton instance of the factory. 18 | * 19 | * 20 | * @generated 21 | */ 22 | IAbapgitrepositoriesFactory eINSTANCE = org.abapgit.adt.backend.model.abapgitrepositories.impl.AbapgitrepositoriesFactoryImpl.init(); 23 | 24 | /** 25 | * Returns a new object of class 'Repository'. 26 | * 27 | * 28 | * @return a new object of class 'Repository'. 29 | * @generated 30 | */ 31 | IRepository createRepository(); 32 | 33 | /** 34 | * Returns a new object of class 'Repositories'. 35 | * 36 | * 37 | * @return a new object of class 'Repositories'. 38 | * @generated 39 | */ 40 | IRepositories createRepositories(); 41 | 42 | /** 43 | * Returns a new object of class 'Document Root'. 44 | * 45 | * 46 | * @return a new object of class 'Document Root'. 47 | * @generated 48 | */ 49 | IDocumentRoot createDocumentRoot(); 50 | 51 | /** 52 | * Returns the package supported by this factory. 53 | * 54 | * 55 | * @return the package supported by this factory. 56 | * @generated 57 | */ 58 | IAbapgitrepositoriesPackage getAbapgitrepositoriesPackage(); 59 | 60 | } //IAbapgitrepositoriesFactory 61 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitrepositories/IRepositories.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitrepositories; 4 | 5 | import com.sap.adt.tools.core.model.atom.IAtomLink; 6 | import org.eclipse.emf.common.util.EList; 7 | 8 | import org.eclipse.emf.ecore.EObject; 9 | 10 | /** 11 | * 12 | * A representation of the model object 'Repositories'. 13 | * 14 | * 15 | *

16 | * The following features are supported: 17 | *

18 | *
    19 | *
  • {@link org.abapgit.adt.backend.model.abapgitrepositories.IRepositories#getRepositories Repositories}
  • 20 | *
  • {@link org.abapgit.adt.backend.model.abapgitrepositories.IRepositories#getLinks Links}
  • 21 | *
22 | * 23 | * @see org.abapgit.adt.backend.model.abapgitrepositories.IAbapgitrepositoriesPackage#getRepositories() 24 | * @model extendedMetaData="kind='elementOnly' name='repositories'" 25 | * @generated 26 | */ 27 | public interface IRepositories extends EObject { 28 | /** 29 | * Returns the value of the 'Repositories' containment reference list. 30 | * The list contents are of type {@link org.abapgit.adt.backend.model.abapgitrepositories.IRepository}. 31 | * 32 | * 33 | * @return the value of the 'Repositories' containment reference list. 34 | * @see org.abapgit.adt.backend.model.abapgitrepositories.IAbapgitrepositoriesPackage#getRepositories_Repositories() 35 | * @model containment="true" 36 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='repository'" 37 | * @generated 38 | */ 39 | EList getRepositories(); 40 | 41 | /** 42 | * Returns the value of the 'Links' containment reference list. 43 | * The list contents are of type {@link com.sap.adt.tools.core.model.atom.IAtomLink}. 44 | * 45 | * 46 | * @return the value of the 'Links' containment reference list. 47 | * @see org.abapgit.adt.backend.model.abapgitrepositories.IAbapgitrepositoriesPackage#getRepositories_Links() 48 | * @model containment="true" 49 | * extendedMetaData="kind='element' namespace='http://www.w3.org/2005/Atom' name='link'" 50 | * @generated 51 | */ 52 | EList getLinks(); 53 | 54 | } // IRepositories 55 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitrepositories/util/AbapgitrepositoriesResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitrepositories.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 8 | import org.eclipse.emf.ecore.xmi.XMLResource; 9 | 10 | /** 11 | * 12 | * The Resource Factory associated with the package. 13 | * 14 | * @see org.abapgit.adt.backend.model.abapgitrepositories.util.AbapgitrepositoriesResourceImpl 15 | * @generated 16 | */ 17 | public class AbapgitrepositoriesResourceFactoryImpl extends ResourceFactoryImpl { 18 | /** 19 | * Creates an instance of the resource factory. 20 | * 21 | * 22 | * @generated 23 | */ 24 | public AbapgitrepositoriesResourceFactoryImpl() { 25 | super(); 26 | } 27 | 28 | /** 29 | * Creates an instance of the resource. 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | public Resource createResource(URI uri) { 36 | XMLResource result = new AbapgitrepositoriesResourceImpl(uri); 37 | result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 38 | result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 39 | 40 | result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); 41 | 42 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 43 | result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 44 | 45 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); 46 | result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE); 47 | 48 | return result; 49 | } 50 | 51 | } //AbapgitrepositoriesResourceFactoryImpl 52 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitrepositories/util/AbapgitrepositoriesResourceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitrepositories.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; 8 | 9 | /** 10 | * 11 | * The Resource associated with the package. 12 | * 13 | * @see org.abapgit.adt.backend.model.abapgitrepositories.util.AbapgitrepositoriesResourceFactoryImpl 14 | * @generated 15 | */ 16 | public class AbapgitrepositoriesResourceImpl extends XMLResourceImpl { 17 | /** 18 | * Creates an instance of the resource. 19 | * 20 | * 21 | * @param uri the URI of the new resource. 22 | * @generated 23 | */ 24 | public AbapgitrepositoriesResourceImpl(URI uri) { 25 | super(uri); 26 | } 27 | 28 | } //AbapgitrepositoriesResourceImpl 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitrepositories/util/AbapgitrepositoriesXMLProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitrepositories.util; 4 | 5 | import java.util.Map; 6 | 7 | import org.abapgit.adt.backend.model.abapgitrepositories.IAbapgitrepositoriesPackage; 8 | 9 | import org.eclipse.emf.ecore.EPackage; 10 | 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; 14 | 15 | /** 16 | * This class contains helper methods to serialize and deserialize XML documents 17 | * 18 | * 19 | * @generated 20 | */ 21 | public class AbapgitrepositoriesXMLProcessor extends XMLProcessor { 22 | 23 | /** 24 | * Public constructor to instantiate the helper. 25 | * 26 | * 27 | * @generated 28 | */ 29 | public AbapgitrepositoriesXMLProcessor() { 30 | super((EPackage.Registry.INSTANCE)); 31 | IAbapgitrepositoriesPackage.eINSTANCE.eClass(); 32 | } 33 | 34 | /** 35 | * Register for "*" and "xml" file extensions the AbapgitrepositoriesResourceFactoryImpl factory. 36 | * 37 | * 38 | * @generated 39 | */ 40 | @Override 41 | protected Map getRegistrations() { 42 | if (registrations == null) { 43 | super.getRegistrations(); 44 | registrations.put(XML_EXTENSION, new AbapgitrepositoriesResourceFactoryImpl()); 45 | registrations.put(STAR_EXTENSION, new AbapgitrepositoriesResourceFactoryImpl()); 46 | } 47 | return registrations; 48 | } 49 | 50 | } //AbapgitrepositoriesXMLProcessor 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/IAuthor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Author'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.IAuthor#getName Name}
  • 17 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.IAuthor#getEmail Email}
  • 18 | *
19 | * 20 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getAuthor() 21 | * @model extendedMetaData="name='author' kind='elementOnly'" 22 | * @generated 23 | */ 24 | public interface IAuthor extends EObject { 25 | /** 26 | * Returns the value of the 'Name' attribute. 27 | * 28 | * 29 | * @return the value of the 'Name' attribute. 30 | * @see #setName(String) 31 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getAuthor_Name() 32 | * @model dataType="org.eclipse.emf.ecore.xml.type.String" 33 | * extendedMetaData="kind='attribute' namespace='##targetNamespace' name='name'" 34 | * @generated 35 | */ 36 | String getName(); 37 | 38 | /** 39 | * Sets the value of the '{@link org.abapgit.adt.backend.model.abapgitstaging.IAuthor#getName Name}' attribute. 40 | * 41 | * 42 | * @param value the new value of the 'Name' attribute. 43 | * @see #getName() 44 | * @generated 45 | */ 46 | void setName(String value); 47 | 48 | /** 49 | * Returns the value of the 'Email' attribute. 50 | * 51 | * 52 | * @return the value of the 'Email' attribute. 53 | * @see #setEmail(String) 54 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getAuthor_Email() 55 | * @model dataType="org.eclipse.emf.ecore.xml.type.String" 56 | * extendedMetaData="kind='attribute' namespace='##targetNamespace' name='email'" 57 | * @generated 58 | */ 59 | String getEmail(); 60 | 61 | /** 62 | * Sets the value of the '{@link org.abapgit.adt.backend.model.abapgitstaging.IAuthor#getEmail Email}' attribute. 63 | * 64 | * 65 | * @param value the new value of the 'Email' attribute. 66 | * @see #getEmail() 67 | * @generated 68 | */ 69 | void setEmail(String value); 70 | 71 | } // IAuthor 72 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/ICommitter.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Committer'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.ICommitter#getName Name}
  • 17 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.ICommitter#getEmail Email}
  • 18 | *
19 | * 20 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getCommitter() 21 | * @model extendedMetaData="name='committer' kind='elementOnly'" 22 | * @generated 23 | */ 24 | public interface ICommitter extends EObject { 25 | /** 26 | * Returns the value of the 'Name' attribute. 27 | * 28 | * 29 | * @return the value of the 'Name' attribute. 30 | * @see #setName(String) 31 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getCommitter_Name() 32 | * @model dataType="org.eclipse.emf.ecore.xml.type.String" 33 | * extendedMetaData="kind='attribute' namespace='##targetNamespace' name='name'" 34 | * @generated 35 | */ 36 | String getName(); 37 | 38 | /** 39 | * Sets the value of the '{@link org.abapgit.adt.backend.model.abapgitstaging.ICommitter#getName Name}' attribute. 40 | * 41 | * 42 | * @param value the new value of the 'Name' attribute. 43 | * @see #getName() 44 | * @generated 45 | */ 46 | void setName(String value); 47 | 48 | /** 49 | * Returns the value of the 'Email' attribute. 50 | * 51 | * 52 | * @return the value of the 'Email' attribute. 53 | * @see #setEmail(String) 54 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getCommitter_Email() 55 | * @model dataType="org.eclipse.emf.ecore.xml.type.String" 56 | * extendedMetaData="kind='attribute' namespace='##targetNamespace' name='email'" 57 | * @generated 58 | */ 59 | String getEmail(); 60 | 61 | /** 62 | * Sets the value of the '{@link org.abapgit.adt.backend.model.abapgitstaging.ICommitter#getEmail Email}' attribute. 63 | * 64 | * 65 | * @param value the new value of the 'Email' attribute. 66 | * @see #getEmail() 67 | * @generated 68 | */ 69 | void setEmail(String value); 70 | 71 | } // ICommitter 72 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/IIgnoredObjects.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'Ignored Objects'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.IIgnoredObjects#getAbapgitobject Abapgitobject}
  • 19 | *
20 | * 21 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getIgnoredObjects() 22 | * @model extendedMetaData="name='ignored_objects' kind='elementOnly'" 23 | * @generated 24 | */ 25 | public interface IIgnoredObjects extends EObject { 26 | /** 27 | * Returns the value of the 'Abapgitobject' containment reference list. 28 | * The list contents are of type {@link org.abapgit.adt.backend.model.abapgitstaging.IAbapGitObject}. 29 | * 30 | * 31 | * @return the value of the 'Abapgitobject' containment reference list. 32 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getIgnoredObjects_Abapgitobject() 33 | * @model containment="true" 34 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='abapgitobject'" 35 | * @generated 36 | */ 37 | EList getAbapgitobject(); 38 | 39 | } // IIgnoredObjects 40 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/IStagedObjects.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'Staged Objects'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.IStagedObjects#getAbapgitobject Abapgitobject}
  • 19 | *
20 | * 21 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getStagedObjects() 22 | * @model extendedMetaData="name='staged_objects' kind='elementOnly'" 23 | * @generated 24 | */ 25 | public interface IStagedObjects extends EObject { 26 | /** 27 | * Returns the value of the 'Abapgitobject' containment reference list. 28 | * The list contents are of type {@link org.abapgit.adt.backend.model.abapgitstaging.IAbapGitObject}. 29 | * 30 | * 31 | * @return the value of the 'Abapgitobject' containment reference list. 32 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getStagedObjects_Abapgitobject() 33 | * @model containment="true" 34 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='abapgitobject'" 35 | * @generated 36 | */ 37 | EList getAbapgitobject(); 38 | 39 | } // IStagedObjects 40 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/ITransport.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging; 4 | 5 | import com.sap.adt.tools.core.model.atom.IAtomLink; 6 | 7 | import org.eclipse.emf.common.util.EList; 8 | 9 | import org.eclipse.emf.ecore.EObject; 10 | 11 | /** 12 | * 13 | * A representation of the model object 'Transport'. 14 | * 15 | * 16 | *

17 | * The following features are supported: 18 | *

19 | *
    20 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.ITransport#getNumber Number}
  • 21 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.ITransport#getLinks Links}
  • 22 | *
23 | * 24 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getTransport() 25 | * @model extendedMetaData="name='transport' kind='elementOnly'" 26 | * @generated 27 | */ 28 | public interface ITransport extends EObject { 29 | /** 30 | * Returns the value of the 'Number' attribute. 31 | * 32 | * 33 | * @return the value of the 'Number' attribute. 34 | * @see #setNumber(String) 35 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getTransport_Number() 36 | * @model dataType="org.eclipse.emf.ecore.xml.type.String" 37 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='number'" 38 | * @generated 39 | */ 40 | String getNumber(); 41 | 42 | /** 43 | * Sets the value of the '{@link org.abapgit.adt.backend.model.abapgitstaging.ITransport#getNumber Number}' attribute. 44 | * 45 | * 46 | * @param value the new value of the 'Number' attribute. 47 | * @see #getNumber() 48 | * @generated 49 | */ 50 | void setNumber(String value); 51 | 52 | /** 53 | * Returns the value of the 'Links' containment reference list. 54 | * The list contents are of type {@link com.sap.adt.tools.core.model.atom.IAtomLink}. 55 | * 56 | * 57 | * @return the value of the 'Links' containment reference list. 58 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getTransport_Links() 59 | * @model containment="true" 60 | * extendedMetaData="kind='element' name='link' namespace='http://www.w3.org/2005/Atom'" 61 | * @generated 62 | */ 63 | EList getLinks(); 64 | 65 | } // ITransport 66 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/IUnstagedObjects.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'Unstaged Objects'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link org.abapgit.adt.backend.model.abapgitstaging.IUnstagedObjects#getAbapgitobject Abapgitobject}
  • 19 | *
20 | * 21 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getUnstagedObjects() 22 | * @model extendedMetaData="name='unstaged_objects' kind='elementOnly'" 23 | * @generated 24 | */ 25 | public interface IUnstagedObjects extends EObject { 26 | /** 27 | * Returns the value of the 'Abapgitobject' containment reference list. 28 | * The list contents are of type {@link org.abapgit.adt.backend.model.abapgitstaging.IAbapGitObject}. 29 | * 30 | * 31 | * @return the value of the 'Abapgitobject' containment reference list. 32 | * @see org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage#getUnstagedObjects_Abapgitobject() 33 | * @model containment="true" 34 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='abapgitobject'" 35 | * @generated 36 | */ 37 | EList getAbapgitobject(); 38 | 39 | } // IUnstagedObjects 40 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/util/AbapgitstagingResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 8 | import org.eclipse.emf.ecore.xmi.XMLResource; 9 | 10 | /** 11 | * 12 | * The Resource Factory associated with the package. 13 | * 14 | * @see org.abapgit.adt.backend.model.abapgitstaging.util.AbapgitstagingResourceImpl 15 | * @generated 16 | */ 17 | public class AbapgitstagingResourceFactoryImpl extends ResourceFactoryImpl { 18 | /** 19 | * Creates an instance of the resource factory. 20 | * 21 | * 22 | * @generated 23 | */ 24 | public AbapgitstagingResourceFactoryImpl() { 25 | super(); 26 | } 27 | 28 | /** 29 | * Creates an instance of the resource. 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | public Resource createResource(URI uri) { 36 | XMLResource result = new AbapgitstagingResourceImpl(uri); 37 | result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 38 | result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 39 | 40 | result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); 41 | 42 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 43 | result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 44 | 45 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); 46 | return result; 47 | } 48 | 49 | } //AbapgitstagingResourceFactoryImpl 50 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/util/AbapgitstagingResourceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; 8 | 9 | /** 10 | * 11 | * The Resource associated with the package. 12 | * 13 | * @see org.abapgit.adt.backend.model.abapgitstaging.util.AbapgitstagingResourceFactoryImpl 14 | * @generated 15 | */ 16 | public class AbapgitstagingResourceImpl extends XMLResourceImpl { 17 | /** 18 | * Creates an instance of the resource. 19 | * 20 | * 21 | * @param uri the URI of the new resource. 22 | * @generated 23 | */ 24 | public AbapgitstagingResourceImpl(URI uri) { 25 | super(uri); 26 | } 27 | 28 | } //AbapgitstagingResourceImpl 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstaging/util/AbapgitstagingXMLProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstaging.util; 4 | 5 | import java.util.Map; 6 | 7 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapgitstagingPackage; 8 | 9 | import org.eclipse.emf.ecore.EPackage; 10 | 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; 14 | 15 | /** 16 | * This class contains helper methods to serialize and deserialize XML documents 17 | * 18 | * 19 | * @generated 20 | */ 21 | public class AbapgitstagingXMLProcessor extends XMLProcessor { 22 | 23 | /** 24 | * Public constructor to instantiate the helper. 25 | * 26 | * 27 | * @generated 28 | */ 29 | public AbapgitstagingXMLProcessor() { 30 | super((EPackage.Registry.INSTANCE)); 31 | IAbapgitstagingPackage.eINSTANCE.eClass(); 32 | } 33 | 34 | /** 35 | * Register for "*" and "xml" file extensions the AbapgitstagingResourceFactoryImpl factory. 36 | * 37 | * 38 | * @generated 39 | */ 40 | @Override 41 | protected Map getRegistrations() { 42 | if (registrations == null) { 43 | super.getRegistrations(); 44 | registrations.put(XML_EXTENSION, new AbapgitstagingResourceFactoryImpl()); 45 | registrations.put(STAR_EXTENSION, new AbapgitstagingResourceFactoryImpl()); 46 | } 47 | return registrations; 48 | } 49 | 50 | } //AbapgitstagingXMLProcessor 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstagingobjectgrouping/IAbapgitstagingobjectgroupingFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstagingobjectgrouping; 4 | 5 | import org.eclipse.emf.ecore.EFactory; 6 | 7 | /** 8 | * 9 | * The Factory for the model. 10 | * It provides a create method for each non-abstract class of the model. 11 | * 12 | * @see org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapgitstagingobjectgroupingPackage 13 | * @generated 14 | */ 15 | public interface IAbapgitstagingobjectgroupingFactory extends EFactory { 16 | /** 17 | * The singleton instance of the factory. 18 | * 19 | * 20 | * @generated 21 | */ 22 | IAbapgitstagingobjectgroupingFactory eINSTANCE = org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.impl.AbapgitstagingobjectgroupingFactoryImpl.init(); 23 | 24 | /** 25 | * Returns a new object of class 'Abap Git Staging Group Node'. 26 | * 27 | * 28 | * @return a new object of class 'Abap Git Staging Group Node'. 29 | * @generated 30 | */ 31 | IAbapGitStagingGroupNode createAbapGitStagingGroupNode(); 32 | 33 | /** 34 | * Returns a new object of class 'Document Root'. 35 | * 36 | * 37 | * @return a new object of class 'Document Root'. 38 | * @generated 39 | */ 40 | IDocumentRoot createDocumentRoot(); 41 | 42 | /** 43 | * Returns the package supported by this factory. 44 | * 45 | * 46 | * @return the package supported by this factory. 47 | * @generated 48 | */ 49 | IAbapgitstagingobjectgroupingPackage getAbapgitstagingobjectgroupingPackage(); 50 | 51 | } //IAbapgitstagingobjectgroupingFactory 52 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstagingobjectgrouping/util/AbapgitstagingobjectgroupingResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.resource.Resource; 8 | 9 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 10 | 11 | import org.eclipse.emf.ecore.xmi.XMLResource; 12 | 13 | /** 14 | * 15 | * The Resource Factory associated with the package. 16 | * 17 | * @see org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.util.AbapgitstagingobjectgroupingResourceImpl 18 | * @generated 19 | */ 20 | public class AbapgitstagingobjectgroupingResourceFactoryImpl extends ResourceFactoryImpl { 21 | /** 22 | * Creates an instance of the resource factory. 23 | * 24 | * 25 | * @generated 26 | */ 27 | public AbapgitstagingobjectgroupingResourceFactoryImpl() { 28 | super(); 29 | } 30 | 31 | /** 32 | * Creates an instance of the resource. 33 | * 34 | * 35 | * @generated 36 | */ 37 | @Override 38 | public Resource createResource(URI uri) { 39 | XMLResource result = new AbapgitstagingobjectgroupingResourceImpl(uri); 40 | result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 41 | result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 42 | 43 | result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); 44 | 45 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 46 | result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 47 | 48 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); 49 | return result; 50 | } 51 | 52 | } //AbapgitstagingobjectgroupingResourceFactoryImpl 53 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstagingobjectgrouping/util/AbapgitstagingobjectgroupingResourceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; 8 | 9 | /** 10 | * 11 | * The Resource associated with the package. 12 | * 13 | * @see org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.util.AbapgitstagingobjectgroupingResourceFactoryImpl 14 | * @generated 15 | */ 16 | public class AbapgitstagingobjectgroupingResourceImpl extends XMLResourceImpl { 17 | /** 18 | * Creates an instance of the resource. 19 | * 20 | * 21 | * @param uri the URI of the new resource. 22 | * @generated 23 | */ 24 | public AbapgitstagingobjectgroupingResourceImpl(URI uri) { 25 | super(uri); 26 | } 27 | 28 | } //AbapgitstagingobjectgroupingResourceImpl 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/abapgitstagingobjectgrouping/util/AbapgitstagingobjectgroupingXMLProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.util; 4 | 5 | import java.util.Map; 6 | 7 | import org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapgitstagingobjectgroupingPackage; 8 | 9 | import org.eclipse.emf.ecore.EPackage; 10 | 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; 14 | 15 | /** 16 | * This class contains helper methods to serialize and deserialize XML documents 17 | * 18 | * 19 | * @generated 20 | */ 21 | public class AbapgitstagingobjectgroupingXMLProcessor extends XMLProcessor { 22 | 23 | /** 24 | * Public constructor to instantiate the helper. 25 | * 26 | * 27 | * @generated 28 | */ 29 | public AbapgitstagingobjectgroupingXMLProcessor() { 30 | super((EPackage.Registry.INSTANCE)); 31 | IAbapgitstagingobjectgroupingPackage.eINSTANCE.eClass(); 32 | } 33 | 34 | /** 35 | * Register for "*" and "xml" file extensions the AbapgitstagingobjectgroupingResourceFactoryImpl factory. 36 | * 37 | * 38 | * @generated 39 | */ 40 | @Override 41 | protected Map getRegistrations() { 42 | if (registrations == null) { 43 | super.getRegistrations(); 44 | registrations.put(XML_EXTENSION, new AbapgitstagingobjectgroupingResourceFactoryImpl()); 45 | registrations.put(STAR_EXTENSION, new AbapgitstagingobjectgroupingResourceFactoryImpl()); 46 | } 47 | return registrations; 48 | } 49 | 50 | } //AbapgitstagingobjectgroupingXMLProcessor 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/agitpullmodifiedobjects/IAgitpullmodifiedobjectsFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.agitpullmodifiedobjects; 4 | 5 | import org.eclipse.emf.ecore.EFactory; 6 | 7 | /** 8 | * 9 | * The Factory for the model. 10 | * It provides a create method for each non-abstract class of the model. 11 | * 12 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage 13 | * @generated 14 | */ 15 | public interface IAgitpullmodifiedobjectsFactory extends EFactory { 16 | /** 17 | * The singleton instance of the factory. 18 | * 19 | * 20 | * @generated 21 | */ 22 | IAgitpullmodifiedobjectsFactory eINSTANCE = org.abapgit.adt.backend.model.agitpullmodifiedobjects.impl.AgitpullmodifiedobjectsFactoryImpl.init(); 23 | 24 | /** 25 | * Returns a new object of class 'Abap Git Pull Modified Objects'. 26 | * 27 | * 28 | * @return a new object of class 'Abap Git Pull Modified Objects'. 29 | * @generated 30 | */ 31 | IAbapGitPullModifiedObjects createAbapGitPullModifiedObjects(); 32 | 33 | /** 34 | * Returns a new object of class 'Document Root'. 35 | * 36 | * 37 | * @return a new object of class 'Document Root'. 38 | * @generated 39 | */ 40 | IDocumentRoot createDocumentRoot(); 41 | 42 | /** 43 | * Returns a new object of class 'Overwrite Objects'. 44 | * 45 | * 46 | * @return a new object of class 'Overwrite Objects'. 47 | * @generated 48 | */ 49 | IOverwriteObjects createOverwriteObjects(); 50 | 51 | /** 52 | * Returns a new object of class 'Package Warning Objects'. 53 | * 54 | * 55 | * @return a new object of class 'Package Warning Objects'. 56 | * @generated 57 | */ 58 | IPackageWarningObjects createPackageWarningObjects(); 59 | 60 | /** 61 | * Returns a new object of class 'Overwrite Object'. 62 | * 63 | * 64 | * @return a new object of class 'Overwrite Object'. 65 | * @generated 66 | */ 67 | IOverwriteObject createOverwriteObject(); 68 | 69 | /** 70 | * Returns the package supported by this factory. 71 | * 72 | * 73 | * @return the package supported by this factory. 74 | * @generated 75 | */ 76 | IAgitpullmodifiedobjectsPackage getAgitpullmodifiedobjectsPackage(); 77 | 78 | } //IAgitpullmodifiedobjectsFactory 79 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/agitpullmodifiedobjects/IOverwriteObject.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.agitpullmodifiedobjects; 4 | 5 | import com.sap.adt.tools.core.model.adtcore.IAdtObjectReference; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Overwrite Object'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject#getAction Action}
  • 17 | *
  • {@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject#getActionDescription Action Description}
  • 18 | *
19 | * 20 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage#getOverwriteObject() 21 | * @model extendedMetaData="kind='elementOnly' name='overwriteObject'" 22 | * @generated 23 | */ 24 | public interface IOverwriteObject extends IAdtObjectReference { 25 | /** 26 | * Returns the value of the 'Action' attribute. 27 | * 28 | * 29 | * @return the value of the 'Action' attribute. 30 | * @see #setAction(String) 31 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage#getOverwriteObject_Action() 32 | * @model extendedMetaData="kind='attribute' namespace='##targetNamespace'" 33 | * @generated 34 | */ 35 | String getAction(); 36 | 37 | /** 38 | * Sets the value of the '{@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject#getAction Action}' attribute. 39 | * 40 | * 41 | * @param value the new value of the 'Action' attribute. 42 | * @see #getAction() 43 | * @generated 44 | */ 45 | void setAction(String value); 46 | 47 | /** 48 | * Returns the value of the 'Action Description' attribute. 49 | * 50 | * 51 | * @return the value of the 'Action Description' attribute. 52 | * @see #setActionDescription(String) 53 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage#getOverwriteObject_ActionDescription() 54 | * @model extendedMetaData="kind='attribute' namespace='##targetNamespace'" 55 | * @generated 56 | */ 57 | String getActionDescription(); 58 | 59 | /** 60 | * Sets the value of the '{@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject#getActionDescription Action Description}' attribute. 61 | * 62 | * 63 | * @param value the new value of the 'Action Description' attribute. 64 | * @see #getActionDescription() 65 | * @generated 66 | */ 67 | void setActionDescription(String value); 68 | 69 | } // IOverwriteObject 70 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/agitpullmodifiedobjects/IOverwriteObjects.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.agitpullmodifiedobjects; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'Overwrite Objects'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObjects#getAbapgitobjects Abapgitobjects}
  • 19 | *
20 | * 21 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage#getOverwriteObjects() 22 | * @model extendedMetaData="kind='elementOnly' name='overwriteObjects'" 23 | * @generated 24 | */ 25 | public interface IOverwriteObjects extends EObject { 26 | /** 27 | * Returns the value of the 'Abapgitobjects' containment reference list. 28 | * The list contents are of type {@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject}. 29 | * 30 | * 31 | * @return the value of the 'Abapgitobjects' containment reference list. 32 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage#getOverwriteObjects_Abapgitobjects() 33 | * @model containment="true" 34 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='abapgitobjects'" 35 | * @generated 36 | */ 37 | EList getAbapgitobjects(); 38 | 39 | } // IOverwriteObjects 40 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/agitpullmodifiedobjects/IPackageWarningObjects.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.agitpullmodifiedobjects; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'Package Warning Objects'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IPackageWarningObjects#getAbapgitobjects Abapgitobjects}
  • 19 | *
20 | * 21 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage#getPackageWarningObjects() 22 | * @model extendedMetaData="kind='elementOnly' name='packageWarningObjects'" 23 | * @generated 24 | */ 25 | public interface IPackageWarningObjects extends EObject { 26 | /** 27 | * Returns the value of the 'Abapgitobjects' containment reference list. 28 | * The list contents are of type {@link org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject}. 29 | * 30 | * 31 | * @return the value of the 'Abapgitobjects' containment reference list. 32 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage#getPackageWarningObjects_Abapgitobjects() 33 | * @model containment="true" 34 | * extendedMetaData="kind='element' namespace='##targetNamespace' name='abapgitobjects'" 35 | * @generated 36 | */ 37 | EList getAbapgitobjects(); 38 | 39 | } // IPackageWarningObjects 40 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/agitpullmodifiedobjects/util/AgitpullmodifiedobjectsResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.agitpullmodifiedobjects.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 8 | import org.eclipse.emf.ecore.xmi.XMLResource; 9 | 10 | /** 11 | * 12 | * The Resource Factory associated with the package. 13 | * 14 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.util.AgitpullmodifiedobjectsResourceImpl 15 | * @generated 16 | */ 17 | public class AgitpullmodifiedobjectsResourceFactoryImpl extends ResourceFactoryImpl { 18 | /** 19 | * Creates an instance of the resource factory. 20 | * 21 | * 22 | * @generated 23 | */ 24 | public AgitpullmodifiedobjectsResourceFactoryImpl() { 25 | super(); 26 | } 27 | 28 | /** 29 | * Creates an instance of the resource. 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | public Resource createResource(URI uri) { 36 | XMLResource result = new AgitpullmodifiedobjectsResourceImpl(uri); 37 | result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 38 | result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); 39 | 40 | result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); 41 | 42 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 43 | result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); 44 | 45 | result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); 46 | result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE); 47 | return result; 48 | } 49 | 50 | } //AgitpullmodifiedobjectsResourceFactoryImpl 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/agitpullmodifiedobjects/util/AgitpullmodifiedobjectsResourceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.agitpullmodifiedobjects.util; 4 | 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; 8 | 9 | /** 10 | * 11 | * The Resource associated with the package. 12 | * 13 | * @see org.abapgit.adt.backend.model.agitpullmodifiedobjects.util.AgitpullmodifiedobjectsResourceFactoryImpl 14 | * @generated 15 | */ 16 | public class AgitpullmodifiedobjectsResourceImpl extends XMLResourceImpl { 17 | /** 18 | * Creates an instance of the resource. 19 | * 20 | * 21 | * @param uri the URI of the new resource. 22 | * @generated 23 | */ 24 | public AgitpullmodifiedobjectsResourceImpl(URI uri) { 25 | super(uri); 26 | } 27 | 28 | } //AgitpullmodifiedobjectsResourceImpl 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.backend/src/org/abapgit/adt/backend/model/agitpullmodifiedobjects/util/AgitpullmodifiedobjectsXMLProcessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package org.abapgit.adt.backend.model.agitpullmodifiedobjects.util; 4 | 5 | import java.util.Map; 6 | 7 | import org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAgitpullmodifiedobjectsPackage; 8 | 9 | import org.eclipse.emf.ecore.EPackage; 10 | 11 | import org.eclipse.emf.ecore.resource.Resource; 12 | 13 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; 14 | 15 | /** 16 | * This class contains helper methods to serialize and deserialize XML documents 17 | * 18 | * 19 | * @generated 20 | */ 21 | public class AgitpullmodifiedobjectsXMLProcessor extends XMLProcessor { 22 | 23 | /** 24 | * Public constructor to instantiate the helper. 25 | * 26 | * 27 | * @generated 28 | */ 29 | public AgitpullmodifiedobjectsXMLProcessor() { 30 | super((EPackage.Registry.INSTANCE)); 31 | IAgitpullmodifiedobjectsPackage.eINSTANCE.eClass(); 32 | } 33 | 34 | /** 35 | * Register for "*" and "xml" file extensions the AgitpullmodifiedobjectsResourceFactoryImpl factory. 36 | * 37 | * 38 | * @generated 39 | */ 40 | @Override 41 | protected Map getRegistrations() { 42 | if (registrations == null) { 43 | super.getRegistrations(); 44 | registrations.put(XML_EXTENSION, new AgitpullmodifiedobjectsResourceFactoryImpl()); 45 | registrations.put(STAR_EXTENSION, new AgitpullmodifiedobjectsResourceFactoryImpl()); 46 | } 47 | return registrations; 48 | } 49 | 50 | } //AgitpullmodifiedobjectsXMLProcessor 51 | -------------------------------------------------------------------------------- /org.abapgit.adt.feature/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.abapgit.adt.feature 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.FeatureBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.FeatureNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.abapgit.adt.feature/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml 2 | -------------------------------------------------------------------------------- /org.abapgit.adt.feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | abapGit plugin for ABAP Development Tools (ADT) 9 | 10 | 11 | 12 | abapGit Contributors 13 | 14 | 15 | 16 | The MIT License (MIT) 17 | 18 | Copyright (c) 2018 abapGit Contributors 19 | 20 | Permission is hereby granted, free of charge, to any person obtaining a copy 21 | of this software and associated documentation files (the "Software"), to deal 22 | in the Software without restriction, including without limitation the rights 23 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 24 | copies of the Software, and to permit persons to whom the Software is 25 | furnished to do so, subject to the following conditions: 26 | 27 | The above copyright notice and this permission notice shall be included in all 28 | copies or substantial portions of the Software. 29 | 30 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 31 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 32 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 33 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 34 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 35 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 36 | SOFTWARE. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /org.abapgit.adt.feature/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | org.abapgit.adt.feature 5 | org.abapgit.adt 6 | 1.7.12 7 | org.abapgit.adt.feature 8 | eclipse-feature 9 | 10 | 11 | org.abapgit.adt.parent 12 | org.abapgit.adt 13 | 1.7.12 14 | ../ 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.abapgit.adt.ui 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.pde.PluginNature 26 | org.eclipse.jdt.core.javanature 27 | 28 | 29 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/.settings/org.eclipse.core.runtime.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | line.separator=\n 3 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | #Mon May 25 12:36:55 CEST 2009 2 | eclipse.preferences.version=1 3 | editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true 4 | formatter_settings_version=11 5 | org.eclipse.jdt.ui.text.custom_code_templates= 6 | sp_cleanup.add_default_serial_version_id=true 7 | sp_cleanup.add_generated_serial_version_id=false 8 | sp_cleanup.add_missing_annotations=false 9 | sp_cleanup.add_missing_deprecated_annotations=true 10 | sp_cleanup.add_missing_methods=false 11 | sp_cleanup.add_missing_nls_tags=false 12 | sp_cleanup.add_missing_override_annotations=true 13 | sp_cleanup.add_serial_version_id=false 14 | sp_cleanup.always_use_blocks=true 15 | sp_cleanup.always_use_parentheses_in_expressions=false 16 | sp_cleanup.always_use_this_for_non_static_field_access=true 17 | sp_cleanup.always_use_this_for_non_static_method_access=false 18 | sp_cleanup.convert_to_enhanced_for_loop=true 19 | sp_cleanup.correct_indentation=false 20 | sp_cleanup.format_source_code=true 21 | sp_cleanup.format_source_code_changes_only=true 22 | sp_cleanup.make_local_variable_final=false 23 | sp_cleanup.make_parameters_final=false 24 | sp_cleanup.make_private_fields_final=true 25 | sp_cleanup.make_type_abstract_if_missing_method=false 26 | sp_cleanup.make_variable_declarations_final=true 27 | sp_cleanup.never_use_blocks=false 28 | sp_cleanup.never_use_parentheses_in_expressions=true 29 | sp_cleanup.on_save_use_additional_actions=true 30 | sp_cleanup.organize_imports=true 31 | sp_cleanup.qualify_static_field_accesses_with_declaring_class=false 32 | sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true 33 | sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true 34 | sp_cleanup.qualify_static_member_accesses_with_declaring_class=false 35 | sp_cleanup.qualify_static_method_accesses_with_declaring_class=false 36 | sp_cleanup.remove_private_constructors=true 37 | sp_cleanup.remove_trailing_whitespaces=true 38 | sp_cleanup.remove_trailing_whitespaces_all=true 39 | sp_cleanup.remove_trailing_whitespaces_ignore_empty=false 40 | sp_cleanup.remove_unnecessary_casts=false 41 | sp_cleanup.remove_unnecessary_nls_tags=false 42 | sp_cleanup.remove_unused_imports=false 43 | sp_cleanup.remove_unused_local_variables=false 44 | sp_cleanup.remove_unused_private_fields=true 45 | sp_cleanup.remove_unused_private_members=false 46 | sp_cleanup.remove_unused_private_methods=true 47 | sp_cleanup.remove_unused_private_types=true 48 | sp_cleanup.sort_members=false 49 | sp_cleanup.sort_members_all=false 50 | sp_cleanup.use_blocks=true 51 | sp_cleanup.use_blocks_only_for_return_and_throw=false 52 | sp_cleanup.use_parentheses_in_expressions=false 53 | sp_cleanup.use_this_for_non_static_field_access=true 54 | sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false 55 | sp_cleanup.use_this_for_non_static_method_access=false 56 | sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true 57 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: %Bundle-Name 4 | Bundle-SymbolicName: org.abapgit.adt.ui;singleton:=true 5 | Bundle-Version: 1.7.12 6 | Bundle-Activator: org.abapgit.adt.ui.AbapGitUIPlugin 7 | Bundle-ClassPath: . 8 | Bundle-Localization: plugin 9 | Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)", 10 | org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)", 11 | org.eclipse.jface.text;bundle-version="(3.10.0,4.0.0)", 12 | com.sap.adt.util.ui;bundle-version="[2.106.1,4.0.0)", 13 | com.sap.adt.tools.core.ui;bundle-version="[2.106.1,4.0.0)", 14 | com.sap.adt.tools.core;bundle-version="[2.106.1,4.0.0)", 15 | com.sap.adt.destinations.ui;bundle-version="[2.106.1,4.0.0)", 16 | com.sap.adt.destinations;bundle-version="[2.106.1,4.0.0)", 17 | com.sap.adt.project.ui;bundle-version="[2.106.1,4.0.0)", 18 | com.sap.adt.transport;bundle-version="[2.106.1,4.0.0)", 19 | com.sap.adt.transport.ui;bundle-version="[2.106.1,4.0.0)", 20 | org.abapgit.adt.backend;bundle-version="[0.1.0,2.0.0)", 21 | com.sap.adt.communication;bundle-version="[2.106.1,4.0.0)", 22 | com.sap.adt.compatibility;bundle-version="[2.106.1,4.0.0)", 23 | org.eclipse.compare;bundle-version="[3.7.400,4.0.0)", 24 | com.sap.adt.tools.abapsource;bundle-version="[2.106.1,4.0.0)", 25 | org.eclipse.ui.ide;bundle-version="[3.14.200,4.0.0)", 26 | org.eclipse.equinox.security;bundle-version="[1.3.100,4.0.0)" 27 | Automatic-Module-Name: org.abapgit.adt.ui 28 | Bundle-RequiredExecutionEnvironment: JavaSE-11 29 | Bundle-ActivationPolicy: lazy 30 | Eclipse-ExtensibleAPI: true 31 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | output.. = bin/ 3 | bin.includes = plugin.xml,\ 4 | META-INF/,\ 5 | .,\ 6 | icons/,\ 7 | build.properties,\ 8 | plugin.properties 9 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/compare_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/compare_view.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/compare_view@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/compare_view@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/external_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/external_browser.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/external_browser@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/external_browser@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/refresh.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/refresh@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/refresh@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/unstage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/unstage.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/etool/unstage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/etool/unstage@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/obj/repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/obj/repository.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/obj/repository@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/obj/repository@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/ovr/added_ovr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/ovr/added_ovr.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/ovr/added_ovr@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/ovr/added_ovr@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/ovr/delete_ovr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/ovr/delete_ovr.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/ovr/delete_ovr@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/ovr/delete_ovr@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/ovr/dirty_ovr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/ovr/dirty_ovr.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/ovr/dirty_ovr@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/ovr/dirty_ovr@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/view/abapgit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/view/abapgit.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/view/abapgit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/view/abapgit@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/view/abapgit_staging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/view/abapgit_staging.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/view/abapgit_staging@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/view/abapgit_staging@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/wizban/abapGit_import_wizban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/wizban/abapGit_import_wizban.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/icons/wizban/abapGit_import_wizban@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abapGit/ADT_Frontend/40865d50d480bf6757080d0ffa363dc251fc272b/org.abapgit.adt.ui/icons/wizban/abapGit_import_wizban@2x.png -------------------------------------------------------------------------------- /org.abapgit.adt.ui/plugin.properties: -------------------------------------------------------------------------------- 1 | #Properties file for org.abapgit.adt.ui 2 | category.name = abapGit 3 | abapgit.repository.view.name = abapGit Repositories 4 | abapgit.staging.view.name = abapGit Staging 5 | Bundle-Name = abapGit ADT UI Plug-in -------------------------------------------------------------------------------- /org.abapgit.adt.ui/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | org.abapgit.adt.ui 5 | org.abapgit.adt 6 | 1.7.12 7 | org.abapgit.adt.ui 8 | eclipse-plugin 9 | 10 | 11 | org.abapgit.adt.parent 12 | org.abapgit.adt 13 | 1.7.12 14 | ../ 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/AbapGitUIPlugin.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui; 2 | 3 | import org.eclipse.ui.plugin.AbstractUIPlugin; 4 | import org.osgi.framework.BundleContext; 5 | 6 | public final class AbapGitUIPlugin extends AbstractUIPlugin { 7 | 8 | private static AbapGitUIPlugin plugin; 9 | 10 | public static final String PLUGIN_ID = "org.abapgit.adt.ui"; //$NON-NLS-1$ 11 | 12 | @Override 13 | public void start(BundleContext context) throws Exception { 14 | super.start(context); 15 | plugin = this; 16 | } 17 | 18 | @Override 19 | public void stop(BundleContext context) throws Exception { 20 | super.stop(context); 21 | plugin = null; 22 | } 23 | 24 | /** 25 | * Returns the shared instance 26 | * 27 | * @return the shared instance 28 | */ 29 | public static AbapGitUIPlugin getDefault() { 30 | return plugin; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/repositories/IAbapGitRepositoriesView.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.repositories; 2 | 3 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepository; 4 | import org.eclipse.core.resources.IProject; 5 | 6 | /** 7 | * Interface for AbapGit Repositories view 8 | */ 9 | public interface IAbapGitRepositoriesView { 10 | /** 11 | * Returns the repository currently selected.
12 | * Null if no selection is available. 13 | */ 14 | public IRepository getRepositorySelection(); 15 | 16 | /** 17 | * Returns the project currently loaded. 18 | */ 19 | public IProject getProject(); 20 | } 21 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/repositories/IRepositoryModifiedObjects.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject; 6 | 7 | /** 8 | * This interface helps to maintain the modified objects for each repository. 9 | * This acts as the input type for the TreeViewer for selection of modified 10 | * objects page(AbapGitWizardPageObjectsSelectionForPull). 11 | *

12 | * These modified objects is a list of IAbapGitObject which can 13 | * either be OverwriteObjects or PackageWarningObjects in case of 14 | * Selective pull. 15 | *

16 | * Each IRepositoryModifiedObjects object, has the modified objects for a 17 | * repository and a repository url which maps repository to the modified 18 | * objects. 19 | *

20 | * Valid from 2015 back end version with selective pull feature 21 | * 22 | * @author I517012 23 | * 24 | */ 25 | public interface IRepositoryModifiedObjects { 26 | 27 | /** 28 | * 29 | * @return URL of the Repository for which modified/selected objects are 30 | * maintained. 31 | * 32 | */ 33 | String getRepositoryURL(); 34 | 35 | /** 36 | * 37 | * @return Modified Objects . 38 | * 39 | */ 40 | List getModifiedObjects(); 41 | } 42 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/repositories/RepositoryModifiedObjects.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.repositories; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.backend.model.agitpullmodifiedobjects.IOverwriteObject; 6 | 7 | /** 8 | * Implements IRepositoryModifiedObjects 9 | * 10 | * @author I517012 11 | */ 12 | public class RepositoryModifiedObjects implements IRepositoryModifiedObjects { 13 | @Override 14 | public int hashCode() { 15 | final int prime = 31; 16 | int result = 1; 17 | result = prime * result + ((this.repositoryURL == null) ? 0 : this.repositoryURL.hashCode()); 18 | return result; 19 | } 20 | 21 | @Override 22 | public boolean equals(Object obj) { 23 | if (this == obj) { 24 | return true; 25 | } 26 | if (obj == null) { 27 | return false; 28 | } 29 | if (getClass() != obj.getClass()) { 30 | return false; 31 | } 32 | RepositoryModifiedObjects other = (RepositoryModifiedObjects) obj; 33 | if (this.repositoryURL == null) { 34 | if (other.repositoryURL != null) { 35 | return false; 36 | } 37 | } else if (!this.repositoryURL.equals(other.repositoryURL)) { 38 | return false; 39 | } 40 | return true; 41 | } 42 | 43 | private final String repositoryURL; 44 | private final List modifiedObjects; 45 | 46 | public RepositoryModifiedObjects(String repositoryURL, List modifiedObjects) { 47 | this.repositoryURL = repositoryURL; 48 | this.modifiedObjects = modifiedObjects; 49 | } 50 | 51 | @Override 52 | public String getRepositoryURL() { 53 | return this.repositoryURL; 54 | } 55 | 56 | @Override 57 | public List getModifiedObjects() { 58 | return this.modifiedObjects; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/AbapGitStagingContentProvider.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitFile; 6 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitObject; 7 | import org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapGitStagingGroupNode; 8 | import org.eclipse.jface.viewers.ArrayContentProvider; 9 | import org.eclipse.jface.viewers.ITreeContentProvider; 10 | 11 | public class AbapGitStagingContentProvider implements ITreeContentProvider { 12 | 13 | @Override 14 | public Object[] getElements(Object inputElement) { 15 | if (inputElement instanceof List) { 16 | List objects = (List) inputElement; 17 | return objects.toArray(); 18 | } 19 | if (inputElement instanceof IAbapGitObject) { 20 | return getChildren(inputElement); 21 | } else { 22 | return ArrayContentProvider.getInstance().getElements(inputElement); 23 | } 24 | } 25 | 26 | @Override 27 | public Object[] getChildren(Object parentElement) { 28 | if (parentElement instanceof IAbapGitObject) { 29 | return ((IAbapGitObject) parentElement).getFiles().toArray(); 30 | } 31 | if (parentElement instanceof IAbapGitStagingGroupNode) { 32 | return ((IAbapGitStagingGroupNode) parentElement).getAbapgitobjects().toArray(); 33 | } 34 | return null; 35 | } 36 | 37 | @Override 38 | public Object getParent(Object element) { 39 | if (element instanceof IAbapGitFile) { 40 | return ((IAbapGitFile) element).eContainer(); 41 | } 42 | if(element instanceof IAbapGitObject){ 43 | if(((IAbapGitObject) element).eContainer() instanceof IAbapGitStagingGroupNode){ 44 | return ((IAbapGitObject) element).eContainer(); 45 | } 46 | } 47 | return null; 48 | } 49 | 50 | @Override 51 | public boolean hasChildren(Object element) { 52 | if (element instanceof IAbapGitStagingGroupNode) { 53 | return true; 54 | } 55 | if (element instanceof IAbapGitObject) { 56 | return true; 57 | } 58 | return false; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/AbapGitStagingGrouping.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapGitStagingGroupNode; 7 | 8 | public class AbapGitStagingGrouping implements IAbapGitStagingGrouping { 9 | 10 | List stagedGroupObjects; 11 | List unStagedGroupObjects; 12 | 13 | 14 | public AbapGitStagingGrouping() { 15 | super(); 16 | this.stagedGroupObjects = new ArrayList<>(); 17 | this.unStagedGroupObjects = new ArrayList<>(); 18 | } 19 | 20 | @Override 21 | public List getUnstagedGroupObjects() { 22 | return this.unStagedGroupObjects; 23 | } 24 | 25 | @Override 26 | public List getStagedGroupObjects() { 27 | return this.stagedGroupObjects; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/IAbapGitStagingGrouping.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapGitStagingGroupNode; 6 | 7 | /** 8 | * Model for grouping of IAbapGitObjects under IAbapGitStagingGroupNodes in 9 | * abapgit staging view. 10 | * 11 | * The model holds staged and unstaged group nodes. 12 | * 13 | * @author I517012 14 | * 15 | */ 16 | public interface IAbapGitStagingGrouping { 17 | 18 | /** 19 | * Get the unStaged group objects from the model 20 | * 21 | * @return unstaged group objects 22 | */ 23 | List getUnstagedGroupObjects(); 24 | 25 | /** 26 | * Get the staged group objects from the model 27 | * 28 | * @return staged group objects 29 | */ 30 | List getStagedGroupObjects(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/IAbapGitStagingView.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging; 2 | 3 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo; 4 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepository; 5 | import org.eclipse.core.resources.IProject; 6 | 7 | public interface IAbapGitStagingView { 8 | /** 9 | * Opens AbapGit Staging view for the given repository 10 | * 11 | * @param repository 12 | * repository whose details are to be loaded in the staging view 13 | * @param project 14 | * abap project which contains the package linked to the given 15 | * repository 16 | */ 17 | public void openStagingView(IRepository repository, IProject project); 18 | 19 | /** 20 | * Returns the current repository which is loaded. Null if staging view is 21 | * not loaded with any repository 22 | */ 23 | public IRepository getRepository(); 24 | 25 | /** 26 | * Returns the project of the repository currently loaded. Null if no 27 | * repository has been loaded. 28 | */ 29 | public IProject getProject(); 30 | 31 | /** 32 | * Returns ExternalRepositoryInfo of the current repository 33 | * 34 | */ 35 | public IExternalRepositoryInfo getExternalRepositoryInfo(); 36 | } 37 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/actions/CopyNameAction.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.actions; 2 | 3 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitFile; 4 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitObject; 5 | import org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapGitStagingGroupNode; 6 | import org.abapgit.adt.ui.internal.i18n.Messages; 7 | import org.eclipse.jface.viewers.IStructuredSelection; 8 | import org.eclipse.jface.viewers.TreeViewer; 9 | import org.eclipse.swt.dnd.Clipboard; 10 | import org.eclipse.swt.dnd.TextTransfer; 11 | import org.eclipse.swt.widgets.Display; 12 | import org.eclipse.ui.ISharedImages; 13 | import org.eclipse.ui.PlatformUI; 14 | import org.eclipse.ui.actions.ActionFactory; 15 | import org.eclipse.ui.actions.BaseSelectionListenerAction; 16 | 17 | public class CopyNameAction extends BaseSelectionListenerAction { 18 | 19 | private final TreeViewer treeViewer; 20 | 21 | public CopyNameAction(TreeViewer treeViewer) { 22 | super(Messages.AbapGitStaging_action_copy); 23 | updateSelection((IStructuredSelection) treeViewer.getSelection()); 24 | setToolTipText(Messages.AbapGitStaging_action_copy); 25 | setActionDefinitionId(ActionFactory.COPY.getCommandId()); 26 | setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); 27 | 28 | this.treeViewer = treeViewer; 29 | } 30 | 31 | @Override 32 | public void run() { 33 | IStructuredSelection selection = (IStructuredSelection) this.treeViewer.getSelection(); 34 | copyTextToClipboard(selection.getFirstElement()); 35 | } 36 | 37 | protected void copyTextToClipboard(Object object) { 38 | final StringBuilder data = new StringBuilder(); 39 | 40 | if (object instanceof IAbapGitObject) { 41 | data.append(((IAbapGitObject) object).getName()); 42 | } else if (object instanceof IAbapGitFile) { 43 | data.append(((IAbapGitFile) object).getName()); 44 | } else if (object instanceof IAbapGitStagingGroupNode) { 45 | data.append(((IAbapGitStagingGroupNode) object).getValue()); 46 | } 47 | 48 | final Clipboard clipboard = new Clipboard(Display.getDefault()); 49 | clipboard.setContents(new String[] { data.toString() }, new TextTransfer[] { TextTransfer.getInstance() }); 50 | clipboard.dispose(); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/actions/OpenObjectAction.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.actions; 2 | 3 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitObject; 4 | import org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapGitStagingGroupNode; 5 | import org.abapgit.adt.ui.internal.i18n.Messages; 6 | import org.abapgit.adt.ui.internal.staging.IAbapGitStagingView; 7 | import org.abapgit.adt.ui.internal.util.AbapGitUIServiceFactory; 8 | import org.eclipse.jface.viewers.IStructuredSelection; 9 | import org.eclipse.jface.viewers.TreeViewer; 10 | import org.eclipse.ui.actions.BaseSelectionListenerAction; 11 | 12 | public class OpenObjectAction extends BaseSelectionListenerAction { 13 | 14 | private final TreeViewer treeViewer; 15 | private final IAbapGitStagingView view; 16 | 17 | public OpenObjectAction(IAbapGitStagingView view, TreeViewer treeViewer) { 18 | super(Messages.AbapGitStaging_action_open); 19 | setEnabled(updateSelection((IStructuredSelection) treeViewer.getSelection())); 20 | 21 | this.view = view; 22 | this.treeViewer = treeViewer; 23 | } 24 | 25 | @Override 26 | protected boolean updateSelection(IStructuredSelection selection) { 27 | //open action should not be enabled for the node "non code and meta files" 28 | //in case only that node is selected by the user 29 | if (selection.size() == 1) { 30 | if (selection.getFirstElement() instanceof IAbapGitObject) { 31 | if (((IAbapGitObject) selection.getFirstElement()).getType() == null) { 32 | return false; 33 | } 34 | } 35 | //open action should not be enabled for the node "Not assigned to any package or transport" while grouping is enabled 36 | //in case only that node is selected by the user 37 | if (selection.getFirstElement() instanceof IAbapGitStagingGroupNode) { 38 | if (((IAbapGitStagingGroupNode) selection.getFirstElement()).getType() == null) { 39 | return false; 40 | } 41 | } 42 | } 43 | 44 | return true; 45 | } 46 | 47 | @Override 48 | public void run() { 49 | openObjectInEditor(); 50 | } 51 | 52 | private void openObjectInEditor() { 53 | IStructuredSelection selection = (IStructuredSelection) this.treeViewer.getSelection(); 54 | for (Object object : selection.toList()) { 55 | AbapGitUIServiceFactory.createAbapGitStagingService().openEditor(object, this.view.getProject()); 56 | } 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/actions/OpenPackageAction.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.actions; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.ui.internal.i18n.Messages; 6 | import org.abapgit.adt.ui.internal.staging.IAbapGitStagingView; 7 | import org.abapgit.adt.ui.internal.util.AbapGitUIServiceFactory; 8 | import org.abapgit.adt.ui.internal.util.IAbapGitService; 9 | import org.eclipse.ui.actions.BaseSelectionListenerAction; 10 | 11 | import com.sap.adt.tools.core.ui.navigation.AdtNavigationServiceFactory; 12 | import com.sap.adt.tools.core.ui.packages.AdtPackageServiceUIFactory; 13 | import com.sap.adt.tools.core.ui.packages.IAdtPackageServiceUI; 14 | 15 | public class OpenPackageAction extends BaseSelectionListenerAction { 16 | 17 | private final IAbapGitStagingView view; 18 | private final IAbapGitService service; 19 | 20 | public OpenPackageAction(IAbapGitStagingView view) { 21 | super(Messages.AbapGitView_action_open); 22 | setToolTipText(Messages.AbapGitView_action_open_xtol); 23 | setImageDescriptor( 24 | com.sap.adt.tools.core.ui.Activator.getDefault().getImageDescriptor(com.sap.adt.tools.core.ui.ISharedImages.PACKAGE)); 25 | 26 | this.view = view; 27 | this.service = AbapGitUIServiceFactory.createAbapGitService(); 28 | } 29 | 30 | public void run() { 31 | if (this.view.getRepository() != null && this.view.getProject() != null) { 32 | if (!this.service.ensureLoggedOn(this.view.getProject())) { 33 | return; 34 | } 35 | openPackage(); 36 | } 37 | } 38 | 39 | private void openPackage() { 40 | IAdtPackageServiceUI packageServiceUI = AdtPackageServiceUIFactory.getOrCreateAdtPackageServiceUI(); 41 | List pkgRefs = packageServiceUI.find( 42 | this.service.getDestination(this.view.getProject()), this.view.getRepository().getPackage(), null); 43 | if (!pkgRefs.isEmpty()) { 44 | com.sap.adt.tools.core.model.adtcore.IAdtObjectReference gitPackageRef = pkgRefs.stream().findFirst().get(); 45 | if (gitPackageRef != null) { 46 | AdtNavigationServiceFactory.createNavigationService().navigate(this.view.getProject(), gitPackageRef, true); 47 | } 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/compare/AbapGitCompareInput.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.compare; 2 | 3 | import java.lang.reflect.InvocationTargetException; 4 | 5 | import org.eclipse.compare.CompareConfiguration; 6 | import org.eclipse.compare.CompareEditorInput; 7 | import org.eclipse.compare.structuremergeviewer.DiffNode; 8 | import org.eclipse.compare.structuremergeviewer.Differencer; 9 | import org.eclipse.core.resources.IProject; 10 | import org.eclipse.core.runtime.IProgressMonitor; 11 | 12 | import com.sap.adt.tools.core.project.IAbapProject; 13 | 14 | public class AbapGitCompareInput extends CompareEditorInput{ 15 | 16 | private final AbapGitCompareItem left; 17 | private final AbapGitCompareItem right; 18 | 19 | public AbapGitCompareInput(AbapGitCompareItem left, AbapGitCompareItem right, String editorTitle, IProject project) { 20 | super(new CompareConfiguration()); 21 | 22 | this.left = left; 23 | this.right = right; 24 | 25 | IAbapProject abapProject = project.getAdapter(IAbapProject.class); 26 | this.setTitle("[" + abapProject.getSystemId() + "] " + editorTitle); //$NON-NLS-1$ //$NON-NLS-2$ 27 | } 28 | 29 | @Override 30 | protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { 31 | CompareConfiguration configuration = getCompareConfiguration(); 32 | configuration.setLeftLabel(this.left.getName()); 33 | configuration.setRightLabel(this.right.getName()); 34 | return new DiffNode(null, Differencer.CHANGE, null, this.left, this.right); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/compare/AbapGitCompareItem.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.compare; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.InputStream; 5 | 6 | import org.eclipse.compare.IStreamContentAccessor; 7 | import org.eclipse.compare.ITypedElement; 8 | import org.eclipse.core.runtime.CoreException; 9 | import org.eclipse.swt.graphics.Image; 10 | 11 | import com.sap.adt.tools.core.urimapping.AdtUriMappingServiceFactory; 12 | import com.sap.adt.tools.core.urimapping.IAdtUriMappingService; 13 | 14 | public class AbapGitCompareItem implements IStreamContentAccessor, ITypedElement { 15 | private final String contents, name, extension; 16 | 17 | protected IAdtUriMappingService uriMappingService = AdtUriMappingServiceFactory.createUriMappingService(); 18 | 19 | public AbapGitCompareItem(String name, String extension, String contents) { 20 | this.name = name; 21 | this.extension = extension; 22 | this.contents = contents; 23 | } 24 | 25 | public InputStream getContents() throws CoreException { 26 | return new ByteArrayInputStream(this.contents.getBytes()); 27 | } 28 | 29 | public Image getImage() { 30 | return null; 31 | } 32 | 33 | public String getName() { 34 | return this.name; 35 | } 36 | 37 | public String getType() { 38 | return this.extension; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/util/AbapGitStagingTreeComparator.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.util; 2 | 3 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitObject; 4 | import org.abapgit.adt.backend.model.abapgitstagingobjectgrouping.IAbapGitStagingGroupNode; 5 | import org.eclipse.jface.viewers.TreeViewer; 6 | import org.eclipse.jface.viewers.Viewer; 7 | import org.eclipse.jface.viewers.ViewerComparator; 8 | import org.eclipse.swt.SWT; 9 | 10 | public class AbapGitStagingTreeComparator extends ViewerComparator { 11 | @Override 12 | public int compare(Viewer viewer, Object e1, Object e2) { 13 | return compareElements(viewer, e1, e2); 14 | } 15 | 16 | private int compareElements(Viewer viewer, Object e1, Object e2) { 17 | TreeViewer treeViewer = (TreeViewer) viewer; 18 | if (e1 instanceof IAbapGitObject && e2 instanceof IAbapGitObject) { 19 | IAbapGitObject object1 = (IAbapGitObject) e1; 20 | IAbapGitObject object2 = (IAbapGitObject) e2; 21 | //set "non-code and meta files" as the first node 22 | if (object1.getType() == null) { 23 | return treeViewer.getTree().getSortDirection() == SWT.UP ? -1 : 1; 24 | } 25 | if (object2.getType() == null) { 26 | return treeViewer.getTree().getSortDirection() == SWT.UP ? 1 : -1; 27 | } 28 | int result = object1.getName().compareToIgnoreCase(object2.getName()); 29 | return treeViewer.getTree().getSortDirection() == SWT.UP ? result : -result; 30 | } 31 | else if (e1 instanceof IAbapGitStagingGroupNode && e2 instanceof IAbapGitStagingGroupNode) { 32 | IAbapGitStagingGroupNode object1 = (IAbapGitStagingGroupNode) e1; 33 | IAbapGitStagingGroupNode object2 = (IAbapGitStagingGroupNode) e2; 34 | //set "non-code and meta files" as the first node 35 | if (object1.getType() == null) { 36 | return treeViewer.getTree().getSortDirection() == SWT.UP ? -1 : 1; 37 | } 38 | if (object2.getType() == null) { 39 | return treeViewer.getTree().getSortDirection() == SWT.UP ? 1 : -1; 40 | } 41 | int result = object1.getValue().compareToIgnoreCase(object2.getValue()); 42 | return treeViewer.getTree().getSortDirection() == SWT.UP ? result : -result; 43 | 44 | } 45 | return 0; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/util/IAbapGitStagingService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.util; 2 | 3 | import org.abapgit.adt.backend.IFileService; 4 | import org.abapgit.adt.backend.model.abapgitstaging.IAbapGitStaging; 5 | import org.abapgit.adt.ui.internal.util.IAbapGitService; 6 | import org.eclipse.core.resources.IProject; 7 | 8 | public interface IAbapGitStagingService extends IAbapGitService { 9 | 10 | /** 11 | * Utility method for opening the editor for AbapGit Object and AbapGit 12 | * Files 13 | * 14 | * @param object 15 | * Instance of AbapGitObject or AbapGitFile to be 16 | * opened. 17 | */ 18 | void openEditor(Object object, IProject project); 19 | 20 | /** 21 | * Checks whether abapgit file comparison is supported by the backend. If 22 | * supported, an atom link with relation 23 | * {@link IFileService#RELATION_FILE_FETCH_LOCAL} will be present in an 24 | * abapgit file object. 25 | */ 26 | boolean isFileCompareSupported(Object object); 27 | 28 | /** 29 | * Checks whether opening abap/properties files are supported by the 30 | * backend. If supported, an atom link with relation 31 | * {@link IFileService#RELATION_FILE_FETCH_LOCAL} will be present in an 32 | * abapgit file object. 33 | */ 34 | boolean isFetchFileContentSupported(Object object); 35 | 36 | /** 37 | * Checks whether grouping of objects under packages/transports is supported 38 | * by the backend. If supported, for at least one object either transport 39 | * detail or package details will be sent from backend as staging response. 40 | */ 41 | boolean isGroupingObjectsSupported(IAbapGitStaging model); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/util/ProjectChangeListener.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.util; 2 | 3 | import org.abapgit.adt.ui.internal.staging.AbapGitStagingView; 4 | import org.eclipse.core.resources.IProject; 5 | import org.eclipse.core.resources.IResource; 6 | import org.eclipse.core.resources.IResourceChangeEvent; 7 | import org.eclipse.core.resources.IResourceChangeListener; 8 | import org.eclipse.core.resources.IWorkspace; 9 | import org.eclipse.swt.widgets.Display; 10 | 11 | /** 12 | * Listener for project delete and close event. This is to reset the abapgit 13 | * staging view in case the selected project is closed or deleted. 14 | */ 15 | public class ProjectChangeListener implements IResourceChangeListener { 16 | 17 | private final IWorkspace workspace; 18 | private final AbapGitStagingView view; 19 | private IProject project; 20 | 21 | public ProjectChangeListener(AbapGitStagingView view, IWorkspace workspace) { 22 | this.view = view; 23 | this.workspace = workspace; 24 | this.workspace.addResourceChangeListener(this, IResourceChangeEvent.PRE_DELETE | IResourceChangeEvent.PRE_CLOSE); 25 | } 26 | 27 | public void setProject(IProject project) { 28 | this.project = project; 29 | } 30 | 31 | @Override 32 | public void resourceChanged(IResourceChangeEvent event) { 33 | if (this.view != null && this.project != null) { 34 | IResource resource = event.getResource(); 35 | if (resource instanceof IProject) { 36 | if (event.getType() == IResourceChangeEvent.PRE_DELETE || event.getType() == IResourceChangeEvent.PRE_CLOSE) { 37 | if (this.project.equals(resource)) { 38 | //reset the staging view to initial 39 | Display.getDefault().syncExec(() -> ProjectChangeListener.this.view.resetStagingView()); 40 | } 41 | } 42 | } 43 | } 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/util/StagingDragListener.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.util; 2 | 3 | import org.eclipse.jface.util.LocalSelectionTransfer; 4 | import org.eclipse.jface.viewers.ArrayContentProvider; 5 | import org.eclipse.jface.viewers.ISelectionProvider; 6 | import org.eclipse.jface.viewers.IStructuredSelection; 7 | import org.eclipse.swt.dnd.DragSourceAdapter; 8 | import org.eclipse.swt.dnd.DragSourceEvent; 9 | 10 | public class StagingDragListener extends DragSourceAdapter { 11 | private final ISelectionProvider provider; 12 | private final boolean unstaged; 13 | 14 | public StagingDragListener(ISelectionProvider provider, ArrayContentProvider contentProvider, boolean unstaged) { 15 | this.provider = provider; 16 | this.unstaged = unstaged; 17 | } 18 | 19 | public void dragStart(DragSourceEvent event) { 20 | event.doit = !this.provider.getSelection().isEmpty(); 21 | } 22 | 23 | public void dragFinished(DragSourceEvent event) { 24 | if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) { 25 | LocalSelectionTransfer.getTransfer().setSelection(null); 26 | } 27 | } 28 | 29 | public void dragSetData(DragSourceEvent event) { 30 | IStructuredSelection selection = (IStructuredSelection) this.provider.getSelection(); 31 | if (selection.isEmpty()) { 32 | return; 33 | } 34 | if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) { 35 | LocalSelectionTransfer.getTransfer().setSelection(new StagingDragSelection(selection, this.unstaged)); 36 | return; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/staging/util/StagingDragSelection.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.staging.util; 2 | 3 | import java.util.Iterator; 4 | import java.util.List; 5 | 6 | import org.eclipse.jface.viewers.IStructuredSelection; 7 | 8 | public class StagingDragSelection implements IStructuredSelection { 9 | private final IStructuredSelection selection; 10 | private final boolean fromUnstaged; 11 | 12 | public StagingDragSelection(IStructuredSelection selection, boolean fromUnstaged) { 13 | this.selection = selection; 14 | this.fromUnstaged = fromUnstaged; 15 | } 16 | 17 | public boolean isEmpty() { 18 | return this.selection.isEmpty(); 19 | } 20 | 21 | public Object getFirstElement() { 22 | return this.selection.getFirstElement(); 23 | } 24 | 25 | public Iterator iterator() { 26 | return this.selection.iterator(); 27 | } 28 | 29 | public int size() { 30 | return this.selection.size(); 31 | } 32 | 33 | public Object[] toArray() { 34 | return this.selection.toArray(); 35 | } 36 | 37 | public List toList() { 38 | return this.selection.toList(); 39 | } 40 | 41 | public boolean isFromUnstaged() { 42 | return this.fromUnstaged; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/util/AbapGitObjLogService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.util; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.backend.model.abapObjects.IAbapObject; 6 | import org.abapgit.adt.backend.model.abapObjects.IAbapObjects; 7 | import org.abapgit.adt.backend.model.abapObjects.IAbapObjectsFactory; 8 | 9 | public class AbapGitObjLogService implements IAbapGitObjLogService { 10 | public int countChildren(IAbapObject node) { 11 | return node.getAbapLogObjectChildren().size(); 12 | } 13 | 14 | public List listChildObjects(IAbapObject node) { 15 | return node.getAbapLogObjectChildren(); 16 | } 17 | 18 | public IAbapObjects renderObjLogInput(IAbapObjects deserializedAbapObjects) { 19 | 20 | IAbapObjects ObjLogInput = IAbapObjectsFactory.eINSTANCE.createAbapObjects(); 21 | IAbapObject newObjType = IAbapObjectsFactory.eINSTANCE.createAbapObject(); 22 | 23 | for (IAbapObject abapObject : deserializedAbapObjects.getAbapObjects()) { 24 | // object type already exists = use existing type & add child 25 | 26 | if (ObjLogInput.getAbapObjects().stream().anyMatch(r -> r.getType().equals(abapObject.getType()))) { 27 | IAbapObject existingObj = ObjLogInput.getAbapObjects().stream().filter(b -> b.getType().equals(abapObject.getType())) 28 | .findFirst().get(); 29 | existingObj.getAbapLogObjectChildren().add(abapObject); 30 | } 31 | 32 | // new object type = create new type & add child 33 | else { 34 | newObjType = IAbapObjectsFactory.eINSTANCE.createAbapObject(); 35 | newObjType.setType(abapObject.getType()); 36 | newObjType.setName(newObjType.getType()); 37 | newObjType.getAbapLogObjectChildren().add(abapObject); 38 | ObjLogInput.getAbapObjects().add(newObjType); 39 | } 40 | 41 | } 42 | 43 | return ObjLogInput; 44 | 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/util/AbapGitUIServiceFactory.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.util; 2 | 3 | import org.abapgit.adt.backend.FileServiceFactory; 4 | import org.abapgit.adt.backend.IFileService; 5 | import org.abapgit.adt.backend.IRepositoryService; 6 | import org.abapgit.adt.backend.RepositoryServiceFactory; 7 | import org.abapgit.adt.ui.internal.staging.util.AbapGitStagingService; 8 | import org.abapgit.adt.ui.internal.staging.util.IAbapGitStagingService; 9 | import org.eclipse.core.resources.IProject; 10 | import org.eclipse.core.runtime.NullProgressMonitor; 11 | 12 | import com.sap.adt.tools.core.project.AdtProjectServiceFactory; 13 | 14 | public class AbapGitUIServiceFactory { 15 | 16 | private AbapGitUIServiceFactory() { 17 | } 18 | 19 | public static IAbapGitService createAbapGitService() { 20 | return new AbapGitService(); 21 | } 22 | 23 | public static IAbapGitStagingService createAbapGitStagingService() { 24 | return new AbapGitStagingService(); 25 | } 26 | 27 | public static IAbapGitPullService createAbapGitPullService() { 28 | return new AbapGitPullService(); 29 | } 30 | 31 | public static IRepositoryService createRepositoryService(IProject project) { 32 | return RepositoryServiceFactory.createRepositoryService(getDestination(project), new NullProgressMonitor()); 33 | } 34 | 35 | public static IFileService createFileService() { 36 | return FileServiceFactory.createFileService(); 37 | } 38 | 39 | public static IAbapGitObjLogService createAbapGitObjLogService() { 40 | return new AbapGitObjLogService(); 41 | } 42 | 43 | private static String getDestination(IProject project) { 44 | return AdtProjectServiceFactory.createProjectService().getDestinationId(project); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/util/IAbapGitObjLogService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.util; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.backend.model.abapObjects.IAbapObject; 6 | import org.abapgit.adt.backend.model.abapObjects.IAbapObjects; 7 | 8 | public interface IAbapGitObjLogService { 9 | 10 | /** 11 | * 12 | * @param node 13 | * IAbapObject abapGit log object node 14 | * @return Returns the number of children of an AbapGit Log object node 15 | */ 16 | int countChildren(IAbapObject node); 17 | 18 | /** 19 | * 20 | * @param node 21 | * IAbapObject abapGit log Object node 22 | * @return Returns the children of an AbapGit log object node 23 | */ 24 | 25 | List listChildObjects(IAbapObject node); 26 | 27 | /** 28 | * 29 | * @param deserializedAbapObjects 30 | * Deserialized abap log objects retrieved 31 | * @return Returns abap log objects rendered to be displayed in 32 | * AbapGitDialogObjLog 33 | */ 34 | 35 | IAbapObjects renderObjLogInput(IAbapObjects deserializedAbapObjects); 36 | } 37 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/util/IAbapGitPullService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.util; 2 | 3 | import java.util.Map; 4 | import java.util.Set; 5 | 6 | import org.abapgit.adt.backend.model.agitpullmodifiedobjects.IAbapGitPullModifiedObjects; 7 | import org.abapgit.adt.ui.internal.repositories.IRepositoryModifiedObjects; 8 | 9 | /** 10 | * To handle all utility and helper methods involved in Pull Action in abapGit. 11 | * 12 | * @author I517012 13 | * 14 | */ 15 | public interface IAbapGitPullService { 16 | 17 | /** 18 | * 19 | * Return a map of repository to the selected objects to be pulled, both 20 | * overWrite objects and packageWarning Objects, put together in 21 | * IAbapGitPullModifiedObjects. 22 | *

23 | * This is required to extract the selected overwrite warning objects and 24 | * package warning objects into IAbapGitPullModifiedObjects, to be sent to 25 | * the back end, in the request to pull. 26 | * 27 | * @param overWriteObjectsSelectedToPull 28 | * The objects that are selected to be pulled in the page, 29 | * AbapGitWizardPageObjectsSelectionForPull for overWrite 30 | * Objects. 31 | * @param packageWarningObjectsSelectedToPull 32 | * The objects that are selected to be pulled in the page, 33 | * AbapGitWizardPageObjectsSelectionForPull for package warning 34 | * Objects. 35 | * @return A map of repository to the selected objects to be pulled, both 36 | * overWrite objects and packageWarning Objects, put together in 37 | * IAbapGitPullModifiedObjects 38 | * 39 | */ 40 | public Map getSelectedObjectsToPullforRepo( 41 | Set overWriteObjectsSelectedToPull, 42 | Set packageWarningObjectsSelectedToPull); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /org.abapgit.adt.ui/src/org/abapgit/adt/ui/internal/util/IAbapGitService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.util; 2 | 3 | import java.util.List; 4 | 5 | import org.abapgit.adt.backend.IRepositoryService; 6 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo; 7 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepositories; 8 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepository; 9 | import org.eclipse.core.resources.IProject; 10 | 11 | public interface IAbapGitService { 12 | /** 13 | * Checks if the abap project is logged on 14 | * 15 | * @param project 16 | * Project to be checked 17 | * @return Returns true if the project is logged on 18 | */ 19 | boolean isLoggedOn(IProject project); 20 | 21 | /** 22 | * Logon to an abap project 23 | * 24 | * @param project 25 | * Project to logon 26 | * @return Returns true if logon is successful, else false 27 | */ 28 | boolean ensureLoggedOn(IProject project); 29 | 30 | /** 31 | * @return Destination Id for the given abap project 32 | */ 33 | String getDestination(IProject project); 34 | 35 | /** 36 | * Returns the href from the atom link based on the relation 37 | * 38 | * @param object 39 | * Object can be IAbapGitObject or IAbapGitFile 40 | * @param relation 41 | * Relation of the atom link which has to be retrieved 42 | * @return Href from the atom link found or null if no atom link is present 43 | * with the given relation 44 | */ 45 | String getHrfFromAtomLink(Object object, String relation); 46 | 47 | /** 48 | * Checks whether the given project supports AbapGit. Currently abapGit is 49 | * enabled only for steampunk projects. 50 | */ 51 | boolean isAbapGitSupported(IProject project); 52 | 53 | /** 54 | * Checks whether selecting folder logic is supported while linking 55 | * repositories. The feature would be available if the repositories contains 56 | * an atom link with relation 57 | * {@link IRepositoryService.RELATION_FOLDER_LOGIC} 58 | */ 59 | boolean isFolderLogicSupportedWhileLink(IRepositories repositories); 60 | 61 | /** 62 | * Checks whether the given project supports to selectively pull objects 63 | * from remote repository. 64 | */ 65 | boolean isSelectivePullSupported(IRepository repository); 66 | 67 | /** 68 | * Checks whether the folder logic is sent from back-end. 69 | */ 70 | boolean isFolderLogicAvailable(List repositories); 71 | 72 | /** 73 | * Checks whether the URI to fetch branch info is supported. 74 | */ 75 | boolean isBranchInfoSupported(IExternalRepositoryInfo externalRepoInfo); 76 | 77 | } 78 | -------------------------------------------------------------------------------- /org.abapgit.adt.updatesite/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.abapgit.adt.updatesite 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.UpdateSiteBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.UpdateSiteNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.abapgit.adt.updatesite/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | abapGit plugin for ABAP Development Tools (ADT) 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /org.abapgit.adt.updatesite/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | org.abapgit.adt.updatesite 5 | 1.7.12 6 | abapGit for ABAP Development Tools (ADT) 7 | eclipse-repository 8 | 9 | 10 | org.abapgit.adt.parent 11 | org.abapgit.adt 12 | 1.7.12 13 | ../ 14 | 15 | 16 | 17 | 18 | 19 | org.eclipse.tycho 20 | tycho-p2-repository-plugin 21 | ${tycho-version} 22 | 23 | updatesite-${project.version} 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /spotbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.abapgit.adt.backend.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.SchemaBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | com.sap.adt.pde.ManifestBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.pde.PluginNature 36 | org.eclipse.jdt.core.javanature 37 | com.sap.adt.pde.PluginNature 38 | 39 | 40 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 4 | org.eclipse.jdt.core.compiler.compliance=11 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 9 | org.eclipse.jdt.core.compiler.release=enabled 10 | org.eclipse.jdt.core.compiler.source=11 11 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: Unit Tests for abapGit ADT Backend components 4 | Bundle-SymbolicName: org.abapgit.adt.backend.test;singleton:=true 5 | Bundle-Version: 1.7.12 6 | Bundle-ClassPath: . 7 | Bundle-Vendor: abapGit 8 | Fragment-Host: org.abapgit.adt.backend 9 | Export-Package: org.abapgit.adt.backend 10 | Require-Bundle: org.junit;bundle-version="[4.12.0,5.0.0)" 11 | Bundle-RequiredExecutionEnvironment: JavaSE-11 12 | Import-Package: org.abapgit.adt.backend 13 | Automatic-Module-Name: org.abapgit.adt.backend.test 14 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/build.properties: -------------------------------------------------------------------------------- 1 | #Fri Sep 24 08:21:39 CEST 2010 2 | bin.includes=META-INF/,., 3 | source..=src/ 4 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | org.abapgit.adt.backend.test 5 | 1.7.12 6 | org.abapgit.adt.backend.test 7 | eclipse-test-plugin 8 | 9 | org.abapgit.adt 10 | tests 11 | 1.7.12 12 | ../pom.xml 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/src/org/abapgit/adt/backend/internal/TestsUnitApackDependency.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | 5 | import org.junit.Test; 6 | 7 | import com.sap.adt.tools.core.model.adtcore.IAdtCoreFactory; 8 | import com.sap.adt.tools.core.model.adtcore.IAdtObjectReference; 9 | 10 | public class TestsUnitApackDependency { 11 | 12 | @Test 13 | public void sameDependency() { 14 | ApackDependency apackDependencyOne = new ApackDependency(); 15 | apackDependencyOne.setGroupId("sap.com"); 16 | apackDependencyOne.setArtifactId("my-fancy-component"); 17 | apackDependencyOne.setGitUrl("https://github.com/SAP/abap-platform-fancy-component"); 18 | apackDependencyOne.setRequiresSynchronization(true); 19 | IAdtObjectReference targetPackageOne = IAdtCoreFactory.eINSTANCE.createAdtObjectReference(); 20 | apackDependencyOne.setTargetPackage(targetPackageOne); 21 | 22 | ApackDependency apackDependencyTwo = new ApackDependency(); 23 | apackDependencyTwo.setGroupId("sap.com"); 24 | apackDependencyTwo.setArtifactId("my-fancy-component"); 25 | apackDependencyTwo.setGitUrl("https://github.com/SAP/abap-platform-fancy-component"); 26 | apackDependencyTwo.setRequiresSynchronization(true); 27 | IAdtObjectReference targetPackageTwo = IAdtCoreFactory.eINSTANCE.createAdtObjectReference(); 28 | apackDependencyTwo.setTargetPackage(targetPackageTwo); 29 | 30 | assertEquals(apackDependencyOne, apackDependencyTwo); 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.backend.test/src/org/abapgit/adt/backend/internal/TestsUnitExternalRepoInfoService.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.backend.internal; 2 | 3 | import java.net.URI; 4 | 5 | import org.abapgit.adt.backend.IExternalRepositoryInfoService; 6 | import org.abapgit.adt.backend.model.abapgitexternalrepo.AccessMode; 7 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IAbapgitexternalrepoFactory; 8 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IBranch; 9 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo; 10 | import org.eclipse.core.runtime.CoreException; 11 | import org.junit.Assert; 12 | import org.junit.BeforeClass; 13 | import org.junit.Test; 14 | 15 | import com.sap.adt.tools.core.model.atom.IAtomFactory; 16 | import com.sap.adt.tools.core.model.atom.IAtomLink; 17 | 18 | 19 | public class TestsUnitExternalRepoInfoService { 20 | 21 | private static IExternalRepositoryInfoService extRepoService; 22 | 23 | @BeforeClass 24 | public static void setUp() throws CoreException { 25 | extRepoService = new ExternalRepositoryInfoService("dummy_destination", URI.create("dummy_ext_repo_uri")); 26 | } 27 | 28 | private static IExternalRepositoryInfo getExternalRepoInfoObject() { 29 | IExternalRepositoryInfo externalRepositoryInfo = IAbapgitexternalrepoFactory.eINSTANCE.createExternalRepositoryInfo(); 30 | externalRepositoryInfo.setAccessMode(AccessMode.PUBLIC); 31 | 32 | IBranch branch = IAbapgitexternalrepoFactory.eINSTANCE.createBranch(); 33 | branch.setDisplayName("master"); 34 | branch.setName("refs/head/master"); 35 | branch.setType("HD"); 36 | branch.setIsHead("X"); 37 | 38 | IAtomLink branchInfoLink = IAtomFactory.eINSTANCE.createAtomLink(); 39 | branchInfoLink.setRel(IExternalRepositoryInfoService.RELATION_BRANCH_INFO); 40 | branchInfoLink.setHref("/sap/bc/adt/abapgit/externalrepoinfo/branchinfo"); 41 | branch.getLinks().add(branchInfoLink); 42 | 43 | externalRepositoryInfo.getBranches().add(branch); 44 | 45 | return externalRepositoryInfo; 46 | 47 | } 48 | 49 | @Test 50 | public void TestGetURIForBranchInfo() { 51 | 52 | //Prepare Test Data 53 | IExternalRepositoryInfo externalRepositoryInfo = getExternalRepoInfoObject(); 54 | 55 | URI uri = extRepoService.getURIForBranchInfo(externalRepositoryInfo, "refs/head/master"); 56 | 57 | //Asserts 58 | Assert.assertTrue(uri.getPath().equalsIgnoreCase("/sap/bc/adt/abapgit/externalrepoinfo/branchinfo")); 59 | 60 | 61 | 62 | 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.abapgit.adt.ui.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.SchemaBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | com.sap.adt.pde.ManifestBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.pde.PluginNature 36 | org.eclipse.jdt.core.javanature 37 | com.sap.adt.pde.PluginNature 38 | 39 | 40 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 4 | org.eclipse.jdt.core.compiler.compliance=11 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 9 | org.eclipse.jdt.core.compiler.release=enabled 10 | org.eclipse.jdt.core.compiler.source=11 11 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: AbapGit UI tests 4 | Bundle-SymbolicName: org.abapgit.adt.ui.test;singleton:=true 5 | Bundle-Version: 1.7.12 6 | Bundle-ClassPath: . 7 | Bundle-Vendor: abapGit 8 | Fragment-Host: org.abapgit.adt.ui;bundle-version="0.13.2" 9 | Automatic-Module-Name: org.abapgit.adt.ui.test 10 | Bundle-RequiredExecutionEnvironment: JavaSE-11 11 | Require-Bundle: org.junit;bundle-version="4.12.0", 12 | org.easymock;bundle-version="3.6.0" 13 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | output.. = bin/ 3 | bin.includes = META-INF/,\ 4 | . 5 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | org.abapgit.adt.ui.test 5 | org.abapgit.adt 6 | 1.7.12 7 | org.abapgit.adt.ui.test 8 | eclipse-test-plugin 9 | 10 | org.abapgit.adt 11 | tests 12 | 1.7.12 13 | ../pom.xml 14 | 15 | 16 | 17 | **/test/suite/AllUnitTests* 18 | **/test/suite/AllPdeTests* 19 | **/test/suite/AllIntegrationTests* 20 | 21 | 22 | -eclipse.password ${project.basedir}/pom.xml -eclipse.keyring ${project.build.directory}/work/securestore 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | macosx-jvm-flags 31 | 32 | mac 33 | 34 | 35 | -XstartOnFirstThread 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.eclipse.tycho 44 | target-platform-configuration 45 | ${tycho-version} 46 | 47 | 48 | org.eclipse.tycho 49 | tycho-surefire-plugin 50 | ${tycho-version} 51 | 52 | 53 | ${testPatternUnit} 54 | ${testPatternPde} 55 | ${testPatternIntegration} 56 | 57 | true 58 | true 59 | false 60 | ${testAppArgLine} 61 | ${tycho.testArgLine} ${os-jvm-flags} ${additionalTestArgs} 62 | org.eclipse.ui.ide.workbench 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/src/org/abapgit/adt/ui/internal/dialogs/TestsPdeAbapGitStagingCredentialsDialog.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.dialogs; 2 | 3 | import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfoRequest; 4 | import org.abapgit.adt.ui.internal.i18n.Messages; 5 | import org.abapgit.adt.ui.internal.staging.AbapGitStagingView; 6 | import org.abapgit.adt.ui.internal.staging.TestsPdeAbapGitStagingUtil; 7 | import org.eclipse.core.runtime.CoreException; 8 | import org.junit.AfterClass; 9 | import org.junit.Assert; 10 | import org.junit.BeforeClass; 11 | import org.junit.Test; 12 | 13 | public class TestsPdeAbapGitStagingCredentialsDialog { 14 | 15 | private static AbapGitStagingView view; 16 | private static TestsPdeAbapGitStagingUtil testUtil; 17 | 18 | @BeforeClass 19 | public static void setUp() throws CoreException{ 20 | testUtil = new TestsPdeAbapGitStagingUtil(); 21 | view = testUtil.initializeView(); 22 | } 23 | 24 | @AfterClass 25 | public static void disposeControls() throws CoreException { 26 | view.dispose(); 27 | } 28 | 29 | @Test 30 | public void credentialsDialog() { 31 | AbapGitStagingCredentialsDialog dialog = new AbapGitStagingCredentialsDialog(view.getSite().getShell()); 32 | dialog.setBlockOnOpen(false); 33 | dialog.open(); 34 | 35 | dialog.usernameField.setText(""); 36 | dialog.passwordField.setText(""); 37 | 38 | dialog.okPressed(); 39 | Assert.assertEquals(dialog.getMessage(), Messages.AbapGitStaging_credentials_dialog_error_invalid_username); 40 | 41 | dialog.usernameField.setText("lorem_ipsum"); 42 | dialog.okPressed(); 43 | Assert.assertEquals(dialog.getMessage(), Messages.AbapGitStaging_credentials_dialog_error_invalid_password); 44 | 45 | dialog.passwordField.setText("lorem_ipsum"); 46 | dialog.okPressed(); 47 | 48 | IExternalRepositoryInfoRequest externalInfo = dialog.getExternalRepoInfo(); 49 | Assert.assertEquals(externalInfo.getUser(), "lorem_ipsum"); 50 | Assert.assertEquals(externalInfo.getPassword(), "lorem_ipsum"); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/src/org/abapgit/adt/ui/internal/repositories/actions/TestUnitAbapGitRepositoriesOpenAction.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.internal.repositories.actions; 2 | 3 | import org.junit.BeforeClass; 4 | import org.junit.Test; 5 | import org.junit.Assert; 6 | 7 | import java.net.URISyntaxException; 8 | 9 | import org.abapgit.adt.backend.model.abapgitrepositories.IRepository; 10 | import org.abapgit.adt.backend.model.abapgitrepositories.impl.AbapgitrepositoriesFactoryImpl; 11 | import org.abapgit.adt.ui.internal.repositories.AbapGitView; 12 | import org.abapgit.adt.ui.internal.repositories.TestsPdeAbapGitRepositoriesUtil; 13 | import org.eclipse.core.runtime.CoreException; 14 | 15 | public class TestUnitAbapGitRepositoriesOpenAction { 16 | 17 | private static OpenRepositoryAction openAction; 18 | private static AbapGitView view; 19 | private static IRepository dummyGitSelection; 20 | private static IRepository dummyBitSelection; 21 | private static TestsPdeAbapGitRepositoriesUtil utils; 22 | 23 | @BeforeClass 24 | public static void setup() throws CoreException { 25 | utils = new TestsPdeAbapGitRepositoriesUtil(); 26 | view = utils.initializeView(); 27 | // git based host 28 | dummyGitSelection = utils.createDummyRepository(); 29 | // bitbucket host 30 | dummyBitSelection = AbapgitrepositoriesFactoryImpl.eINSTANCE.createRepository(); 31 | dummyBitSelection.setUrl("https://user1234@bitbucket.org/user1234/dummy.git"); 32 | dummyBitSelection.setPackage("$AP_GITHUB"); 33 | dummyBitSelection.setCreatedEmail("dummy_user_one@email.com"); 34 | dummyBitSelection.setBranchName("refs/heads/master"); 35 | dummyBitSelection.setDeserializedAt("20200322180503"); 36 | dummyBitSelection.setStatusText("dummy_status"); 37 | openAction = new OpenRepositoryAction(view); 38 | } 39 | 40 | @Test 41 | public void testOpenRepositoryInBrowserAction() throws URISyntaxException { 42 | String actualGitLink = openAction.getLink(dummyGitSelection); 43 | String expectedGitLink = "https://github.com/dummy_url/tree/master"; 44 | Assert.assertEquals(actualGitLink, expectedGitLink); 45 | 46 | String actualBitLink = openAction.getLink(dummyBitSelection); 47 | String expectedBitLink = "https://bitbucket.org/user1234/dummy/src/master"; 48 | Assert.assertEquals(actualBitLink, expectedBitLink); 49 | } 50 | } -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/src/org/abapgit/adt/ui/test/suite/AllIntegrationTests.java: -------------------------------------------------------------------------------- 1 | //TODO Uncomment once bundling issue with com.sap.adt.test.services is resolved 2 | //package org.abapgit.adt.ui.test.suite; 3 | // 4 | //import org.junit.runner.RunWith; 5 | //import org.junit.runners.Suite; 6 | // 7 | //import org.abapgit.adt.ui.internal.repositories.*; 8 | //import org.abapgit.adt.ui.internal.staging.*; 9 | // 10 | //@RunWith(AdtIntegrationTestSuite.class) 11 | //@RunWithDestination(DestinationTestUtil.HTTP_SKS) 12 | //@Suite.SuiteClasses({// 13 | // TestsIntegrationRepositoriesView.class, 14 | // TestsIntegrationStagingView.class 15 | //}) 16 | // 17 | //public class AllIntegrationTests { 18 | //} 19 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/src/org/abapgit/adt/ui/test/suite/AllPdeTests.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.test.suite; 2 | 3 | import org.abapgit.adt.ui.internal.dialogs.TestsPdeAbapGitStagingCredentialsDialog; 4 | import org.abapgit.adt.ui.internal.staging.TestsPdeAbapGitStaging; 5 | import org.junit.runner.RunWith; 6 | import org.junit.runners.Suite; 7 | 8 | @RunWith(Suite.class) 9 | @Suite.SuiteClasses({// 10 | TestsPdeAbapGitStaging.class, 11 | TestsPdeAbapGitStagingCredentialsDialog.class 12 | }) 13 | public class AllPdeTests { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /test/org.abapgit.adt.ui.test/src/org/abapgit/adt/ui/test/suite/AllUnitTests.java: -------------------------------------------------------------------------------- 1 | package org.abapgit.adt.ui.test.suite; 2 | 3 | import org.abapgit.adt.ui.internal.util.TestsUnitAbapGitPullService; 4 | import org.abapgit.adt.ui.internal.util.TestsUnitAbapGitService; 5 | import org.abapgit.adt.ui.internal.util.TestsUnitRepositoryUtil; 6 | import org.junit.runner.RunWith; 7 | import org.junit.runners.Suite; 8 | 9 | @RunWith(Suite.class) 10 | @Suite.SuiteClasses({// 11 | TestsUnitRepositoryUtil.class, 12 | TestsUnitAbapGitService.class, 13 | TestsUnitAbapGitPullService.class 14 | 15 | }) 16 | public class AllUnitTests { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /test/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | org.abapgit.adt 6 | tests 7 | 1.7.12 8 | Test Fragments 9 | pom 10 | Test Fragments 11 | 12 | 13 | org.abapgit.adt 14 | org.abapgit.adt.parent 15 | 1.7.12 16 | ../pom.xml 17 | 18 | 19 | 20 | org.abapgit.adt.backend.test 21 | org.abapgit.adt.ui.test 22 | 23 | 24 | 25 | --------------------------------------------------------------------------------