Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-03-11[osgi] Disperse the EGit core Activator into OSGi dynamic servicesThomas Wolf1-5/+2
Use OSGi DS to perform most of the setup formerly done in the Activator. Because of interdependencies it's not possible to do this step-by-step. The Activator did a number of unrelated things: * setting up the internal EGit caches (RepositoryCache, IndexDiffCache, RepositoryUtil). * setting up a number of IResourceChangeListeners for auto-sharing projects, auto-ignoring derived resources, and similar things. * setting up HTTP and SSH, and proxy support. * handling debug tracing options. * migrating preferences. * tracking merge strategies contributed via an extension point. Each of these have now become an OSGi DS component: * RepositoryInitializer: EGit caches * WorkspaceConnector: IResourceChangeListeners * TransportConfigurator: HTTP, SSH, and proxies * DebugOptionsHandler: debug tracing options * PreferencesMigrator: preferences migrations; runs as a Job * MergeStrategies: merge strategy tracking; runs a Job to initialize The activator is no longer the central hub from which other classes can obtain the RepositoryCache, IndexDiffCache, or RepositoryUtil. This change was necessary because otherwise an early component activation causes the Activator to run, which then might cause trying to activate org.eclipse.core.resources before the instance location is set, which breaks Eclipse start-up. These central singletons are newly managed in these three classes directly, and are accessible via getInstance() static methods. Likewise, the EGitSecureStore is now such a singleton that will be created on first access to the EGitSecureStore class. The RepositoryInitializer publishes the RepositoryCache as a service, which is consumed by the WorkspaceConnector OSGi component. This ensures correct initialization order. The changes outside the Activator and the six new OSGi components are all simple replacements for using the new instance getters instead of the Activator. Bug: 560412 Change-Id: Id5c7440213ae25a573e84720db7dfcc83a8f5d0a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-12-28Remove redundant type informationMichael Keppler1-1/+1
Execute only the cleanup "Remove redundant type information" on the egit projects. The number of Java error/warning markers is the same before and after this change. The cleanup preference was already enabled on all projects, but probably we did not execute the cleanup when enabling it. Change-Id: I638e47b1cb4826adb3843dc143e84a3a110eb4c7 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2019-09-08[mylyn] Simplify getting a TaskRepository for a git repoThomas Wolf1-52/+30
First, if bugtracker.url is set in the config, use it unconditionally. Second, simplify the alternate mechanism (find a task repository matching the git upstream host) by not checking against the resolved local host name. Calling InetAddress.getLocalHost() here is not such a good idea since it may be extremely slow over a VPN or especially if there is no Internet connection at all, and this gets called on the UI thread. Bug: 520386 Change-Id: Ia20c33e5e486581c437c5a5cb4aeb490e91dbb65 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-09-08[mylyn] Simplify adaptations in TaskReferenceFactoryThomas Wolf1-50/+65
Avoid running through all repositories. This adapter factory is registered to adapt SWTCommit or GitModelCommit to mylyn's AbstractTaskReference. For both classes the repository is actually known. Change-Id: Iab80fed43ab04915796b3325e30ac89099ed04a9 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-05-14Join catch sections using multicatchCarsten Hammer1-3/+1
Change-Id: I4d0eabb0faf45a6d032f69377ad08c63363cd463 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
2019-03-16Generify most getAdapter() methodsThomas Wolf1-8/+6
There are some overrides of getAdapter() inherited from platform compare which still inherit a non-generic signature in Eclipse Neon. But the large majority can finally be generified. Change-Id: I8b1b5e81e8d608d044bfd9d2c5d66569cb04e466 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-08-25Refactor: Remove unneeded null checksMichael Keppler1-5/+3
RevWalk.parseCommit() was marked @NonNull in January 2018, and existing egit code has not been adapted in all cases. Change-Id: Ic5f35768852cf695ac7ee8fdf53a24d53f6cc10e Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-08-13refactor: simplify collection.toArray()Michael Keppler1-1/+1
On recent VMs, collection.toArray(new T[0]) is faster than collection.toArray(new T[collection.size()]). Since it is also more readable, it should now be the preferred way of collection to array conversion. https://shipilev.net/blog/2016/arrays-wisdom-ancients/ Change-Id: If0c3202aa3ebb2d4e4ea68da8fe431cd8f363826 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-05-29Update license to EPL-2.0Matthias Sohn7-14/+28
Bug: 530393 Change-Id: Iea3b247253a97c28043187df0e35daecf518011e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-04-11Remove problem characters from task related branch name suggestionMichael Keppler1-2/+3
In addition to standard branch name normalization, remove also specific mylyn related problem characters when creating the branch name from a mylyn task context. Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Change-Id: I7a6a254c75f37fac12930e33771820d9b47b29e7 Bug: 531171
2017-03-03Repository.normalizeBranchName can return nullThomas Wolf1-2/+4
Add null checks. Also normalize again in egit.mylyn if we cut after 30 characters: if we're unlucky, the substring might end with a slash or a period, and JGit likes neither. Change-Id: I50057382e403d6906db2cc6add24d0ac7a32c207 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2017-01-19Use the JGit API for branch name normalization.Wim Jongman1-3/+2
JGit contains a method to normalize the branch name. Normalization is delegated to that method Bug: 509878 Change-Id: I92a29d7af2addc134c47ac12d68c01e42c66d76e Signed-off-by: Wim Jongman <wim.jongman@remainsoftware.com>
2016-09-13Reset commit message in staging view when new task is activatedBrandon Dong1-0/+30
Bug: 472716 Change-Id: I8c82e078f81078cae5ab14424f4d86e55847dec9 Signed-off-by: Brandon Dong <brandon.dong@tasktop.com>
2015-09-17Add missing @Override annotations to all EGit bundlesLars Vogel5-0/+11
Bug: 477689 Change-Id: I490e6558db5133a60caf00af2b996feae0e2e832 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2015-05-21Use try-with-resource to avoid leaks with RevWalk and TreeWalkMatthias Sohn1-4/+4
Change-Id: I1ea48039ea38766bb07f079e5ef4569de034d577 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2015-03-02Replace deprecated RevWalk.close()Matthias Sohn1-7/+1
Use try-with-resources statements instead. Change-Id: I05ba3440a5c1b55afb2d759088c25ad22bee24e6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-04-02Provide extensibility for suggesting branch namesGerd Zanker1-0/+62
* Add new extension point for branch name suggestions * Add new extension to provide branch name suggestion from Mylyn task This change is needed to enable the automatic creation and checkout of branches based on the active task. Bug: 309578 Change-Id: I9e26d668617481026c81a05b6ea08b97e28f620b AlsoBy: Steffen Pingel <steffen.pingel@tasktop.com> AlsoBy: Manuel Doninger <manuel.doninger@googlemail.com> Signed-off-by: Steffen Pingel <steffen.pingel@tasktop.com> Signed-off-by: Gerd Zanker <gerd.zanker@web.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-05-03Fix line endingsMatthias Sohn1-60/+60
Change-Id: Id7f665b3f4cd7aa48c31593f8b7ce74ee417d5c3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Robin Stocker <robin@nibor.org>
2013-01-25Don't use ContextChangeSet#getComment(..), it's deprecated and internalTomasz Zarna1-6/+3
ContextChangeSet#getComment(..) is an internal method and it has been deprecated. Use TeamUiUtil.getComment(..) instead. Change-Id: I997373563dd049f87f58302cc5411942c2691844
2012-04-01[sync] New 'Git Commit Model' implementationDariusz Luksza1-1/+10
New less memory consuming implementation of 'Git Commit Model'. It uses cache providers added earlier for retrieving data from repository instead of calculating changes in every model object. This is only beginning of rewriting 'Git Commit Model'. Next commits will ensure that cache objects are created only once and completely destroyed after synchronization. Change-Id: I6a5b9c05bc210ebf3627fa24745f7d3d48a74e06 Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-03-23Fix regions decorated by commit hyperlink detectorSteffen Pingel1-52/+82
* The offset of the hyperlinked region is now calculated correctly. * Gerrit change ids are not detected as commit ids. * Performance is improved through using a regular expression rather than tokenizing the text. Bug: 355868 Change-Id: I35e36dc057a4ce1279836cf1aa65cbea6f83dbdb
2012-01-16Arrays.copyOf not supported in Java 1.5, replace with System.arraycopyTomasz Zarna1-2/+3
Change-Id: If337d1650053d6d96e89a38f018822b212c7c78f
2012-01-14[findBugs] Return defensive copy to not expose mutable object stateMatthias Sohn1-1/+2
Change-Id: I9dfd79711ccb14c34e9e08562a97a9fa500eecb0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-11-16[findBugs] Don't catch unexpected checked exceptionsMatthias Sohn1-1/+4
Change-Id: Ie4f42f02428cebbd29d208fb9d57a61393bc34f9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-08-28TaskReferenceFactory should set timestamp for commitsSteffen Pingel1-1/+3
Bug: 355990 Change-Id: Ifd07fc2f462d80f78521ca90eb6e2ddf4f78e2d0 Signed-off-by: Steffen Pingel <steffen.pingel@tasktop.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-08-17Support hyperlink detector for Commit idsBenjamin Muskalla3-0/+261
In order to have better navigation between code and tasks, this hyperlink detector recognizes commit ids inside the task descriptions and lets the user open the corresponding commit in the Commit editor. Change-Id: Ic60d11a45b8cb8cc9383e4120a84eae2f1859e32 Signed-off-by: Benjamin Muskalla <benjamin.muskalla@tasktop.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-06-30TaskReferenceFactory: use URIish to extract the hostRobert Munteanu1-7/+5
Bug: 339534 Bug: 348019 Bug: 347731 Change-Id: I757fcbb0f09a722169a88f8657b155436ac1ebe3
2011-06-30TaskReferenceFactory: use constants instead of hardcoded stringsRobert Munteanu1-1/+4
Change-Id: I42cf155ccf8690c6998d1550f68223a0d848c557
2011-05-02UI blocked while opening menuBenjamin Muskalla1-9/+0
We should not check for host resolution while opening the menu. Bug: 340412 Change-Id: I7282cc9648d95354c6b2bc52ae74b8aac51038ab Signed-off-by: Benjamin Muskalla <benjamin.muskalla@tasktop.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-01-31Support 'Open corresponding task'ilya.ivanov1-10/+159
Implemented repository url resolving. Task repository url is taken from 'bugtracker.url' config entry. If the config entry doesn't exist, assume the Mylyn task repository and remote git repository (origin) are on the same host. Change-Id: I18af5f3dcfa080cfb46d9e38ea91a9e55a634071 Signed-off-by: Ilya Ivanov <ilya.ivanov@intland.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-01-25Support 'Open corresponding task' in History and Sync ViewBenjamin Muskalla1-0/+58
In order to quickly see a task for a commit, we need to provide an adapter between EGit and Mylyn. Change-Id: I2d265c8b894c1b45c2d4d9186f6696433acba95c Signed-off-by: Benjamin Muskalla <benjamin.muskalla@tasktop.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-01-21Ensure public fields are commented due to project settingsMathias Kinzler1-1/+1
Change-Id: I9ee30581e0a22199c55b457401351161a6da1dbe Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-01-21Fetch commit message template from project specific settings Manuel Doninger1-10/+26
Resources of the commit are registered and the commit template of the project, that contains a resource to commit is used for the commit message. If resources of multiple projects with their own template are committed, then the template of the first project in the workspace is taken. Bug: 334879 Change-Id: I0ba46429790630787497f00ffdfb26bd6b9b5157 Signed-off-by: Manuel Doninger <manuel.doninger@googlemail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-01-17Add initial EGit Mylyn integrationChris Aniszczyk2-0/+99
Generates the commit dialog message by getting the active mylyn task. The commit message is generated by combinging the title with description and commit message template defined in the mylyn preferences. Bug: 306001 Change-Id: I344546626c8cb089c019db08afa400e4847e6fc4 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com> Signed-off-by: Benjamin Muskalla <benjamin.muskalla@tasktop.com>

    Back to the top