Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-08-06Use an asynchronous lightweight decorator in the repositories viewThomas Wolf18-754/+806
In the previous implementation, the label provider produced styled labels that included the decorations. But label providers run in the UI thread, and expensive decorations like a branch state (N commits ahead, M behind) could thus lead to UI blocks. Newly, leverage Eclipse's built-in support. Use a lightweight decorator for RepositoryTreeNode and register it in plugin.xml. Separate out getting labels into a WorkbenchAdapter and adapt the GitAdapterFactory accordingly. (We already created a WorkbenchAdapter there, but first we always created a new one, and second, it always created a RepositoriesViewLabelProvider just to get the label text. That's terribly inefficient and the logic is completely backwards.) Also use ImageDescriptors instead of Images where possible. Factor out the handling of LabelProviderChangedEvent from GitLightweightDecorator into GitDecorator and re-use it in the new decorator for RepositoryTreeNodes. Make the RepositoriesViewLabelProvider a decorating label provider based on a WorkbenchLabelProvider, which uses the singleton RepositoryTreeNodeWorkbenchAdapter to get labels and images. Change the other uses of RepositoriesViewLabelProvider in dialogs to work with the new setup. Adapt git repositories view tests. These often use the label provider to determine expected node labels, and then try to find a node with a matching label. Decorations are now asynchronous, and thus the label returned from the label provider may or may not contain the decoration. Even with waiting for decoration jobs we may end up with the label being determined in the test and the one in the UI being different. The latter may or may not contain the decoration, which makes finding expected nodes a bit difficult. For now, use the TestUtil navigation methods, which just check for containment. This works well, but because some decorations include the repo directory path which in turn includes the test method name, some test methods and even some test repo names had to be changed to avoid false "duplicate nodes" failures. User-visible UI changes from all that: next to none. Three differences I noticed in the default theme on OS X: 1. Decorations all use the default decoration style (light brown), with the exception of the directory paths shown on repository nodes and on working tree nodes. Those are handled specially and use the qualifier style. 2. Decorations in the "File->Import...->Projects from Git->Existing git repositories" page now actually work. 3. Image decorations briefly flicker on a refresh because of the way asynchronous lightweight decorators work. The flickering is due to the repository view being wholly refreshed frequently. On such a refresh, the viewer tries to get a new decorated label, but the decoration isn't available yet. Once it is available, an event is fired, and the viewer updates the label again. For text labels, the new RepositoriesViewLabelProvider contains a work-around, but for images, that method won't work. The only image decorations (so far) are the check markers for the currently checked-out ref. Otherwise, I notice much faster Eclipse startup with the repositories view open and containing some repositories. Bug: 536814 Change-Id: Ifa8279dd6755c57696b8b64e96bc41a1f948aa59 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-08-01History table: let the user define which columns are shownThomas Wolf5-28/+248
Columns in tables cannot be shown/hidden individually. But we can set the width to zero to hide a column. Of course the user can hide and restore columns directly by dragging the column separators, too. Add a "Columns" sub-menu in the view menu where the user can check the columns to be shown/hidden. These modifications are transient; they are not saved or restored when the view is closed or opened, and they do not survive across and IDE restart. This is similar to the "pinned" state of a history view. To permanently change which columns are shown by default, there's a new preference page. Bug: 339796 Change-Id: Ib8daff29b6610eed1397969a203947e5e72b629a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-29History table: adapt column widths when view size changesThomas Wolf1-11/+40
Use a TableColumnLayout; give columns minimum widths, and give the commit ID column a fixed size. Re-layout the table when the width changes, and if the table then doesn't fit the view, re-distribute all column widths afresh. This results in the table always using at least the available width, and getting a horizontal scroll bar only if the user makes columns so wide that they cannot fit the view. (Or makes the view that small.) Bug: 537181 Change-Id: Ic105acd0ffc7877e8834888b841e3f0aa96993cb Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-22Fix wrapping label in DateFormatPreferencePageThomas Wolf1-1/+2
Using SWT.FILL and SWT.TOP as _width and height_ makes no sense. The real problem with wrapping labels in a GridLayout is that one needs some width to wrap against. With SWT.DEFAULT, the layout lets the label itself determine its width, which of course will always be the unwrapped width absent any other constraints. If one wants to have wrapping, one needs to provide a reasonable widthHint. Change-Id: Ie07d2fd93f110048ddcfb535d0706347915852d0 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-21Bug 536863 - No feedback on "Import changed projects"Michael Keppler3-1/+24
Show a message dialog if no projects are to be imported. Change-Id: Ia9648fa9262e72f27220c7f26a09ed29ba5fa795 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-07-21fix typo in message string keyMichael Keppler3-3/+3
Change-Id: Ief3607641510561e3181b21cd0820923a15447a5 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-07-21Add 2 missing icons in reflogMichael Keppler1-0/+4
cherry-pick and rename branch entries in the reflog do not have an icon (maybe there are more, I only noticed these 2). Change-Id: I80d80d5a9dc2e8b4b5ce05ae98b434c592474561 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-07-17Avoid that loading the history blocks updating the commit tableThomas Wolf2-32/+27
Somehow setting the input on the commit graph table got blocked on the monitor of the SWTCommitList. The only other place where that monitor can be held is in the GenerateHistoryJob itself. However, CommitGraphTable.setInput() is always called not only with that SWTCommitList but also its contents copied into an array. Thus we can use this array copy instead of the list itself to get the contents. On the array, no synchronization is needed. That also means that inside the GenerateHistoryJob no synchronization on that list is needed anymore, since only that job accesses it. Bug: 485743 Change-Id: I77007b159d8b3de0a346b7cea69599fd61d80585 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-17Disable "Compare with previous" for deletionsThomas Wolf2-6/+10
"Compare with Previous" in the history view and in the commit viewer outline makes no sense for deletions. The operation makes only sense if both a new and an old version exist. Bug: 536799 Change-Id: Id08200fe9900942cd83a9da0e1badfd075a5590b Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-16Fix "Compare with Previous" in history view and commit editor outlineThomas Wolf3-20/+18
Enable or include the command only if there _is_ a previous revision to compare to (i.e., only if the diff is not an addition). Also fix the comparison itself to work for renames, too. Bug: 536799 Change-Id: Ia2c0a706d1bac2f67fad4dbe686cd3e0d9d013d8 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-15Git history page: move expensive operations in the backgroundThomas Wolf13-337/+598
There were still two potentially expensive operations occurring in the UI thread: * Computing the file diffs can take quite a while for large commits. * Preparing to load the history can take quite a while if there are many refs. Because of the highly asynchronous loading already going on for other things (commit messages, unified file diffs, actually loading the history) and the somewhat hacky way the various viewers were re-set when something changed, it was not possible to do this in several commits and still have everything working correctly. The old code stored the repository to use before the new history was loaded, which sometimes could lead to cases where EGit would end up looking for an object in the wrong repository when the repository had changed. Concerning file diffs: we exploit the fact that since commit 9df32ed a FileDiff carries its repository, and we wrap all items needed to compute the file diffs in a FileDiffInput object (tree walk, repo, interesting paths, and so on). The diff calculation is done newly in a background job, and only the actual update of the viewer happens in the UI thread. Because the diff computation is now asynchronous, revealing and selecting interesting elements had to be moved to this UI update triggered by the background job. Incidentally this part of the code became much simpler. One problem here is that computing diffs is not cancelable in JGit. The background jobs must be serialized because they may re-use the same TreeWalk instance. This may lead to longer delays than desired until the file diff viewer updates, but at least he UI will not be blocked. To remedy this fully, DiffEntry.scan() and RenameDetector.compute() in JGit should be made cancelable. See bug 536323 and bug 536324. Concerning the history preparation: marking the start points for the RevWalk can be a rather expensive operation if there are many refs. Use a customized RevWalk for the history that does this on the very first call to next(). That way it gets executed in the GenerateHistoryJob instead of in the UI thread. For the commit message viewer, a similar problem with trying to look up a commit in the wrong repository became apparent. This was resolved by not storing the repo in the viewer itself but relying on the fact that an SWTCommit also carries its repository along. Finally, asynchronously loading the history meant that there was some time during which some parts of the git history page had already been prepared for a new repository now being loaded, but the table would still show the old entries. During that time a user could select one of these old commits and try to invoke commands on it, which then also could result in looking up a commit in the wrong repository. This is resolved now by clearing the table when the repository changes. Bug: 440588 Bug: 485743 Change-Id: I5c3cf9a7a0ae536000a9bf4542407fea0b741e22 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-07mark more jobs as system or userMichael Keppler2-0/+2
When browsing some job creations, I noticed that some of the egit internal jobs are not marked as system or user. Change-Id: I8d557bcf5ccfc54e5d27e0f3c1f4455dc62a751a Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-07-07Better default editor opening for file revisionsThomas Wolf4-26/+104
EGit tried already to open the configured editor based on content types or file name associations. On failure, it would fall back to the default internal text editor. Unfortunately, opening a default editor failed always for editors that do require some physical file. Thus opening an external editor always failed, and EGit showed the file as text. Even if the file was binary. Newly, make FileRevisionEditorInput implement IPathEditorInput. Eclipse uses this to invoke external editors, so when getPath() is called, we can write the blob to a temporary file, so that the external editor has something to read from. This is the same technique as used in InternalClassFileEditorInput in JDT. Incidentally this also makes showing a git revision of an HTML page in the internal web browser work. The file is created inside a temporary directory; this enables us to use a simple file name (revision & original file name), which looks nicer in programs that show the file name than a (partially) auto-generated name as we'd get from createTempFile(). The file is set as read-only: a user cannot modify a git revision. We attempt to delete the temporary file and directory when the JVM terminates to avoid filling the system tmp directory. Bug: 463906 Change-Id: I355524f46a8ef66745f287adf718dfb8ea197b4a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-05Fix error marker updates in staging viewThomas Wolf1-17/+43
Use (absolute) paths instead of resources to determine which elements to update in the staging viewer. Using resources may give inconsistent results if * a file occurs several times in the Eclipse resource tree, or * a on-disk directory doesn't exist as a resource in Eclipse at all. The latter can occur if tree representation is used and an Eclipse project lives in some sub-directory (for instance, "bundles") in the git working tree. In that case the staging view will have a folder "bundles", but there's no resource for it, and thus our top-down tree traversal will skip it and all its descendants. Bug: 536471 Change-Id: I46fc84737471e2994af056ecb238b3bbfb55e413 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-07-05Staging view: update author/committer on config changesThomas Wolf2-22/+96
When the config changes, update the committer (and possibly also a signed-off line in the commit message) to the possibly new user.name and user.email values. If the author is the same as the committer, also update the author of the commit. Correct the logic in CommitMessageComponent for updating the sign-off settings. Previously, editing the committer field would switch off the "sign off" flag if the committer was invalid (quite common if you type a new value), and thus the user had to re-enable it manually and correct an old or wrong signed-off-by line explicitly. Bug: 533019 Change-Id: I13252da7beec6cd1ecd1ad2831b4d85c94d46636 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-30Sort decoration variables alphabeticallyMichael Keppler1-4/+5
Change-Id: I6e07a299d4dcf683b92e74a397d1b3b713145265 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:536360
2018-06-30Have sentences in message dialogsMichael Keppler1-19/+19
All the changed texts are used as message argument in MessageDialog.openConfirm/openWarning/openInformation/openError calls. Change-Id: I9ab86c6190a8c79cf620425dc8bb354fc17a7724 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-06-30Fix history preference page field editor layoutMichael Keppler2-7/+13
BooleanFieldEditors manipulate the GridLayout of their composite parent to have only one column. Therefore avoid BooleanFieldEditors as last field editor, if some of the other field editors need more than one column. Also improve the option label for shortening long branch and tag names. See screenshots in bugzilla. Change-Id: I1cc6656da65467081ea33327fdb8d683cb37b3a6 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:536357
2018-06-30Disable commit buttons immediately on committingMichael Keppler1-4/+11
Since all the file related checks can take quite some time, we need to disable the buttons immediately, not only when triggering the commit operation on the repository. Most notable visible difference is that the complete staging view is disabled when the user gets the "no files staged" error message dialog. Change-Id: Iae825abfb9235832a3fae49e9f967d983461dec5 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:533005
2018-06-30Remove semicolon at end of variable descriptionsMichael Keppler1-4/+4
Change-Id: I7dbd6b0f65294ca012839daccd808541a1b977c5 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:536358
2018-06-30Normalize tag name when typingMichael Keppler3-9/+5
Use the BranchNameNormalizer also in the CreateTagDialog. Additionally remove the tooltip, and remove the stars from the mandatory input field labels, since we don't have those anywhere else. Change-Id: I96bf9c1db8b00f31a8b1263a264a68e3999fb904 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:535577
2018-06-30DatePreferencePage does not wrap explanation labelMichael Keppler1-2/+2
Make the long explanation label wrap when the preference page is shrinked. The layout data is set as explained in https://bugs.eclipse.org/bugs/show_bug.cgi?id=9866#c19 Change-Id: I0795ca8e6d01a73499f1bffc1cb4053508912403 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:536356
2018-06-25Fix sort order in Staging viewThomas Wolf2-6/+12
Change alphabetic sorting such that elements with shorter directory names in the path sort before elements with longer directory names. * Replace slashes by '\001' to ensure the above. * If "file name first" is active, sort by file name _and_ path to ensure relative order of files with the same name in different directories. * Also sort StagingFolderEntries the same way to ensure that the order is the same when "compact tree" representation is active. Also apply the same technique in FileDiff.PATH_COMPARATOR to ensure that we use a consistent ordering also in the history page and in the commit viewer and its outline page. Bug: 536240 Change-Id: I6a8daf7faed8a89a5b97f083e108cd614ba15096 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-24Set RepositoryPropertyPage zero pixel marginMichael Keppler4-7/+16
The abstract property page implementation requires a zero pixel margin for the top level composite being returned by the concrete subclass. Change-Id: I0b6f5f9764114b6a95af1900ce4cf4d855fd8291 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:536097
2018-06-24StagingView wrongly sorted by state initiallyMichael Keppler1-1/+1
While refactoring the sort toggle, its meaning was negated, but for one occurence the negation was not added in the code. Change-Id: I4380ba3ba64a3af21d9f02d5f8a8a325a5b91dda Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:535749
2018-06-23Improve share wizard window titleMichael Keppler1-1/+1
Since that wizard is used as direct child of the general Share wizard it makes sense to use the same window title in all the wizard. Change-Id: I6e583fdafb491022a2595759a805ccc4c3502438 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:535678
2018-06-23Sort gerrit remote refs naturallyMichael Keppler2-2/+3
Found two more instances of sorting just as String, and not in natural order. Change-Id: I96efda5b137c2be23fd5b46d9298d414a6b82dfe Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:536204
2018-06-23Reveal newly created entry in configuration editorMichael Keppler1-0/+19
I've chosen to not set the selection to the new entry, but only to reveal it. If some of the egit core developers thinks different, I'm open to change this. Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:535160 Change-Id: I383a35a3b4a80bfcd32a730298942a54c947c80e
2018-06-22History search: use CSS for text field background colorThomas Wolf1-14/+41
Use a CSS class on the text field to set the light red background color when there are no matches. Remove the CSS class to reset the background. This makes the background color changes work as expected with themes that define their own background. Note that changing the background of a text field is supported by SWT currently only on gtk and on Windows. Bug: 532940 Change-Id: Ieb1c6b70a5df9b23c18b501b89379fa9cdeb66fb Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-18Fix CommitUI.getSelectedFiles()Thomas Wolf1-24/+46
This method is used to restrict the files that can be potentially committed to those covered by the user's resource selection. If a container is selected, all modified files under that container are to be included in a commit. Previous code started off with the modified files as known in git, then tried to figure out which resource such a file was in Eclipse, and then checked if that resource was contained by any of the selected resources. It failed to reliably identify matches when a file appeared as several resources in the Eclipse resource tree. The new code swaps the logic around. It starts with the resource selection and finds the repository-relative paths for all, and then filters the modified files as known in git. Bug: 535796 Change-Id: I0b77876ed3913cac987a07444c9de1e6a43e69ee Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-16Batch resource refreshesThomas Wolf2-20/+17
Wrap multiple resource refreshes in an IWorkspaceRunnable with IWorkspace.AVOID_UPDATE to avoid a flood of resource change events. Most operation that do refresh parts of the workspace already did that, but a few didn't. Wrap those as appropriate. Bug: 535950 Change-Id: I1d1028544f70d5211e91c962900cf51d81cad725 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-16Speed up staging view tree viewer managementThomas Wolf2-26/+60
In StagingView: 1. Don't call AbstractTreeViewer.getVisibleExpandedElements() multiple times. In fact, don't call it at all. We do have the tree hierarchy, and the tree viewer uses a hash map, so traversing the known sub- hierarchy explicitly is much faster. 2. Avoid duplicate paths to add (or remove) by using sets instead of lists. In StagingViewContentProvider: 3. Speed up getStagingEntriesFiltered and hasVisibleChildren by traversing the wanted sub-hierarchy explicitly. 4. Massively reduce the number of calls to getFilterPattern(). Bug:535856 Change-Id: I86876119c58f58305e722a832f8950c913d1f2d3 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-13Merge branch 'stable-5.0'Matthias Sohn13-30/+228
* stable-5.0: Prepare 5.0.1-SNAPSHOT builds EGit v5.0.0.201806131550-r Fix merge of wrong patchset of "EGit integration for LFS" Prepare 5.0.0-SNAPSHOT builds EGit v5.0.0.201806131210-r Update documentation for 5.0 EGit integration for LFS Downgrade Apache httpclient to 4.5.2.v20170210-0925 Handle new CommandFailedException when execution of ssh command fails Fix target platform Revert "Update staging view on repository config changes" Update to latest Photon Orbit R20180606145124 Use hash lookup for TreeViewers Prepare 5.0.0-SNAPSHOT builds EGit v5.0.0.201806050710-rc3 Fix AssumeUnchangedOperation not working on directory/project Change-Id: Ideee702514592028c5757b976237f35f4eea32bf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-13Fix merge of wrong patchset of "EGit integration for LFS"Matthias Sohn1-16/+7
By rebasing an outdated version I submitted patchset 8 [1] instead of patchset 7 [2] of the change "EGit integration for LFS". This is the reverse delta between these two patchsets. [1] https://git.eclipse.org/r/#/c/124333/8 [2] https://git.eclipse.org/r/#/c/124333/7 Change-Id: Id513120ea153a14991c3925cd676f5738aa49167 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-13EGit integration for LFSMarkus Duft12-25/+242
* Register builtin LFS on startup When EGit starts and the lfs bundle (org.eclipse.jgit.lfs) is available register the LFS implementation and check configuration. * Allow install (enablement) of LFS support in Preferences (global) and on the repository (local). * Apply smudge/clean filters where applicable and required. * LFS integration using built-in JGit lfs filters fully works when using Gerrit with lfs plugin using ssh protocol. * Pushing lfs objects over http still fails with 401 response code, this is tracked in JGit bug 535814 Change-Id: I465da0f1c7f88272d3ec0e6545eea582eae631ec Also-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
2018-06-11Revert "Update staging view on repository config changes"Matthias Sohn1-12/+0
This reverts commit 40cc626957292a0dbd058f6f399eac6a7cd52773. Bug: 533019 Bug: 535744 Change-Id: I8f6632fcb09ae65daf2d5d15af99417ec397b421 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-06Use hash lookup for TreeViewersThomas Wolf2-0/+2
This should speed up manipulating them when they contain thousands of elements. Bug: 535516 Change-Id: I106500fd09dea99e8553a07b1311beccee590491 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-04Refactor class to contain its private methodsMichael Keppler1-25/+27
The static comparator class has some private methods, which were declared in the top level utility class instead. Move them into the static comparator class to make it self-contained. Change-Id: Id814aeb2d0e9d15c928953b6602843c7ab481925 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-06-04Reload commit info in history only if selection really changedThomas Wolf1-0/+3
On a SelectionChangedEvent from the commit graph table we re-load the commit viewer and the file diffs. However, such an event is also received on Windows when the focus changes back to the commit graph table and the same commit is selected. Happens for instance also on a right click on the commit to bring up the context menu. When we're already showing information for that commit, there is no need to re-load it. Problem observed on Windows 10, all Eclipse versions at least since Neon 3 -- didn't try earlier versions. Change-Id: I0b9c9b1aa0906b744b8a0144b5d3d08d2fb73100 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-04Do not display "[NO-HEAD]" for empty repositoryThomas Wolf9-23/+206
After a new repository has been created, its "master" branch is an unborn branch. EGit showed "NO-HEAD" in the decorations for this case. This is confusing for novices and looks like something went wrong. The canonical implementation shows after "git init; git status": "On branch master" and "Initial commit". So let's display "master" in this case, too. Reserve the "NO-HEAD" for cases where there is really no HEAD. Also show such a HEAD in the repositories view under "References" and decorate it as "[master] unborn; will be created by commit". Limit showing such a HEAD to the repositories view: the content provider is used in other places where such a HEAD node would only cause confusion or malfunctioning. Use an extension factory to create the content provider for the repositories view; in this way the new behavior can be enabled there only without having to touch all the other places where this content provider is used. Adapt the label provider to handle the new case, and ensure that the history page doesn't get confused and broken if HEAD is such an unborn branch. In the staging view, use the the warning message label above the commit message text area to tell the user that this commit will create the still unborn branch. Bug: 533596 Change-Id: Ifd0547a156f0a5616ce7e032ea8daebd2596f31e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-06-04Complete the hovers in the CommitGraphTableThomas Wolf1-12/+52
Add the missing hovers: * On the commit ID column, display the full SHA1 and the short commit message. * On the message column, display the short message if not over a ref. Especially the latter is useful when there are so many lanes that the short commit message cannot be displayed in full (or in extreme cases, at all) or is very far away from the corresponding node on a lane. Change-Id: I76a2536b3972683a9e85260ecff62f472f874f2f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-05-29Merge branch 'stable-5.0'Matthias Sohn621-1242/+2482
* stable-5.0: Fix description property in org.eclipse.egit-feature/feature.properties Update license to EPL-2.0 Add tracing of low-level JSch log messages Change-Id: I2bd4012226097efc8826db3396cccd9e423a283d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-29Update license to EPL-2.0Matthias Sohn621-1242/+2482
Bug: 530393 Change-Id: Iea3b247253a97c28043187df0e35daecf518011e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-28FetchGerritChangePage: automatic content-assist on pasteThomas Wolf1-5/+28
If paste replaces the whole refText but we don't have a complete change number/patch set number combo, then automatically trigger content assist. Bug: 535171 Change-Id: I462c55e7510e9f2db866211017487d0bd01a35fc Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-05-28Remove duplicate code in RepositoriesViewContentProviderThomas Wolf1-86/+44
Change-Id: I0bf64bafe0569125cc3f5a47dc0ecf44d9230d65 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-05-25Natural sort for refs in FetchResultTableThomas Wolf1-1/+3
This gives a better ordering in particular for fetched tags, sorting a new fetched tag v2.10.0 after a tag v2.9.0. Change-Id: Ibcab9d5fd117518aa1028124023feb36a10a7495 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-05-13Suggest complete repository path in NewRepositoryWizardMichael Keppler3-2/+28
This simplifies the new repository wizard by suggesting "repository", "repository2", ... as the default name of the new repository. That way the wizard is even more simple to use for end users. This also simplifies validation, since with the old behavior this could easily trigger warnings of the directory not being empty (which is now guaranteed). Bug: 534404 Change-Id: I3175f8f0e791efa63ba458a250c5fa81c5164504 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
2018-05-13Ignore IndexChangedEvent if it originates from the same JGit processMatthias Sohn2-2/+2
Repository.scanForRepoChanges() fires an IndexChangedEvent when the index file was modified. Since JGit now fires fine grained WorkingTreeModifiedEven indicating exactly which files have been changed we should only handle IndexChangedEvents originating from external git commands in order to avoid double processing. Change-Id: Id28c26b5fe08c0466ae8680c7385cfa0901ae4e6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2018-05-13Natural sort for tags in CreateTagDialogThomas Wolf1-6/+13
Give the tag viewer a comparator, and change the label provider from an ITableLabelProvider to a simple LabelProvider. The viewer has one column only anyway, and with the previous label provider implementation, the comparer wouldn't work. The viewer would use getColumnText(), but the ViewerComparator would use the inherited getText() from WorkbenchLabelProvider, which always returns the empty string since the elements don't adapt to IWorkbenchAdapter. Bug: 529449 Change-Id: Ib1371f13c80334a9f41246fc96134f3c99198fb4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2018-05-13Speed up the RepositoriesViewContentProviderThomas Wolf1-81/+71
Some enhancements for the working tree part: * It's not necessary to sort in the content provider since we have a RepositoriesViewSorter. Besides, that sorting was very inefficient because it repeatedly queried File.isDirectory(), which is an expensive call on Windows. * Short-cut the hasChildren() call for files and folders. This gives a significant speedup for large directories; the old implementation actually read the whole directory for a folder, but using a DirectoryStream we can stop reading after the first entry. * Use Files.walkFileTree() with depth 1 to get the children and their attributes in one go on Windows. On Linux, this shouldn't make any difference; there'll be one call to get file attributes to determine isDirectory() anyway, but on Windows, this saves an extra call to getAttributes() per child. Change-Id: Ie0bf1d89167f4399f72e4f9372aeea3dff24a320 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>

Back to the top