Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Display logical line numbers in DiffEditorPageThomas Wolf11-66/+622
Give the DiffEditorPage a special LineNumberRulerColumn that can display logical line numbers of the shown hunk lines, corresponding to the line numbers in changed file versions. The ruler menu has a toggle action to switch between this logical display and the normal physical line number display. * Store the line numbers in the DiffRegions produced by the DiffRegionFormatter. Add a CONTEXT DiffRegion.Type to be able to number context lines. * Introduce a LogicalLineNumberProvider. * Add a LogicalLineNumberRulerColumn that uses such a provider to determine line numbers for a diff side. * Add a composite OldNewLogicalLineNumberRulerColumn that groups two such LogicalLineNumberRulerColumns (one for each side) together, and that contains the toggling logic for physical/logical line number display. Change-Id: I53394854523d15187c21786ca54370561d84642d Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-27[findBugs] Fix warning "writing static from instance method"Matthias Sohn1-5/+7
Change-Id: I9952f9047bff73497d10a2efcc6164bbdc7685ca Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-27Prepare 4.7.0-SNAPSHOT buildsMatthias Sohn38-259/+259
Change-Id: I08ba5da00f6b4021dc07355e1f01fb1b6d279c0e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-27Merge branch 'stable-4.6'Matthias Sohn38-259/+259
* stable-4.6: Update tycho version to 0.26 Prepare 4.6.1-SNAPSHOT builds EGit v4.6.0.201612231935-r Change-Id: I8e078625a5324554d1b7b9a598b17f5c81927e38 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-26Update tycho version to 0.26Matthias Sohn1-2/+2
Change-Id: Ib0a3763590a43cf56e283173d31360865fad632e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-24Prepare 4.6.1-SNAPSHOT buildsMatthias Sohn38-257/+257
Change-Id: I32a6d58bf4e5ec14ee074cc884e0b185be553dbd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-24EGit v4.6.0.201612231935-rv4.6.0.201612231935-rMatthias Sohn38-39/+39
Change-Id: Ia254425615f55f6de523c3839fd0eacb2075f981 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-23Update documentation for 4.6Matthias Sohn21-271/+321
Change-Id: Ibbc123eff53f4096c84c1f044e314b18652bf814 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-23Validate target repository path entered by the userMatthias Sohn8-44/+208
Validate the repository path entered in NewRepositoryWizard or GitImportWizard to prevent we hit an InvalidPathException in JGit. Since it seems many users try to paste a git clone command or a URL instead of a local path raise a dedicated error messages for these cases. Bug: 496688 Change-Id: I7c40f2d47f5b37ce50d873dbd02e6365097d7110 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-21Fix focus restoration in CommitEditor pagesThomas Wolf6-38/+307
FormPage by default re-sets the focus to the first child of the managed form. In the CommitEditorPage, this is not convenient; it'll always set focus on the author indication. Add focus tracking to identify the control currently having the focus so that it can be re-focused when the page becomes active again after a page change or editor de-activation. Because of the vagaries of focus handling in MultiPageEditorParts, this turned out to be more convoluted than expected. Depending on how the focus gets set (through the page or through the editor), focus is either set via the page's SWT control directly, or through an IFormPart registered in the ManagedForm. So provide both mechanisms. Bug: 509486 Change-Id: I678bdfde9105d04669a42ad81502eb1064c470bc Also-by: Markus Keller <markus_keller@ch.ibm.com> Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Markus Keller <markus_keller@ch.ibm.com>
2016-12-21Merge "[Dark theme] FetchResultDialog should use a fitting icon to look"Thomas Wolf1-0/+15
2016-12-21[Dark theme] FetchResultDialog should use a fitting icon to lookLars Vogel1-0/+15
The current default icon of TitleAreaDialog looks very misplaced in the dark theme. FetchResultDialog news uses the existing png file which also a real alpha included. Bug: 509544 Change-Id: I0cc15871801e56be99c0c4afa2ad449eea140f00 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2016-12-21CommitEditorPage: do not remove signed-off-by lines.Thomas Wolf1-15/+0
This is confusing and sometimes even leaves stray empty lines. Just display the message as it is. Bug: 509472 Change-Id: I1840e8a549a94c1943121a6427e766332eab3e92 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-19[findbugs] Do not rely on default character encodingMatthias Sohn3-4/+9
Change-Id: I5025874ef929e574459975d5a5c3108c4e1e4d6d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-18Add overview annotations to DiffEditorPageThomas Wolf4-4/+267
Add overview annotations for added/removed lines in the unified diff. * Add annotations for the DiffRegions of a DiffDocument. * Coalesce adjacent DiffRegions in DiffRegionFormatter. * Fix a layout problem with the overview ruler when used in the DiffEditorPage. * Derive the annotation colors automatically from the line background colors as set by the user preferences or by the current theme. * When colors change, use invalidateTextPresentation() in DiffViewer instead of refresh() in order to maintain display state (scroll and caret position, selection, folding, etc.) refresh() would reset all those and jump to the beginning of the document. Bug: 447512 Change-Id: I25964fee73b97995895f0a6819fb93c8ccdfbf04 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-18Compare/ReplaceWithPrevious support for multiple resources (in mappings)Stefan Dirix4-60/+143
The CompareWithPrevious and ReplaceWithPrevious actions now also support scenarios where the current selection consists of a single object but maps to multiple files (commonly via ResourceMappings). The previous commit is the next-to-last commit which touched any of the resources. Bug: 496916 Change-Id: I1a208bd9949711e602309cac702a5a158b0eab4b Signed-off-by: Stefan Dirix <sdirix@eclipsesource.com> Signed-off-by: Philip Langer <planger@eclipsesource.com> Also-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Also-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
2016-12-17Improve search implementation in RepositorySearchDialogMatthias Sohn4-60/+207
- use NIO FileVisitor to search repositories - should be faster than the old approach - follow symlinks - skip internal folders of git repositories - by default skip hidden directories, add option to include them - update path of currently scanned directory in UI at max 10 times/sec - sort list of found repository paths in natural order - report search summary statistics Change-Id: Ib4487b4b89d5fb79cc0487f6652b94d780de7902 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-16Show Git Staging view in Git Repositories view's Show In menuDani Megert2-2/+24
Bug: 506974 Change-Id: Iab17a79abbca0fea88035c3ce45cb3dab5df7647 Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-16Replace use of deprecated SubProgressMonitor with SubMonitorMatthias Sohn5-73/+74
Change-Id: Id9e0abdfbfc96a6c92dc136cac8e41db5d33d548 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-14Fix DiffEditorOutline for pre-Neon EclipseThomas Wolf1-2/+16
In February 2016, default implementations were added to the IContentProvider interface.[1] Eclipse's before Neon do not have those, thus content providers need to implement dispose() and inputChanged() if a platform earlier than Eclipse Neon is targeted. [1] https://git.eclipse.org/r/#/c/56214/ Change-Id: I3fc1c21b0c25f27fb60144612920032f28968d44 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-14Add a mnemonic/shortcut for the reset expression text widgetTomasz Zarna1-1/+1
Change-Id: I62334e36bced6e73165954ac4ef7982e6a41028b
2016-12-13Change mnemonic in PushBranchPageThomas Wolf1-1/+1
Alt-N conflicts with the mnemonic for the "Next" button. Use Alt-R instead. Note that this button label is also used on the PullWizardPage. Bug: 508997 Change-Id: I106c3b513b68a489f9aa4866e342377aac6f0a3d Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-12Enable the text editor toolbar items for DiffEditorPageThomas Wolf3-5/+29
A TextEditor provides a couple of items in an action set in the global Eclipse toolbar: buttons for block selection, word wrap, showing whitespace, and navigation between annotations. As the DiffEditorPage is a real TextEditor now, enable those. * Add an "action set part association" in plugin.xml to get those buttons at all when the CommitEditor is active. * Propagate the global action contributions from the nested editor's SubActionBars to those of the CommitEditor. Change-Id: I516b5609906aefb6840bc9f4f4e95d92fafc1590 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-12Add an outline page for DiffEditorPageThomas Wolf8-5/+762
Introduce a MultiPageEditorContentOutlinePage for the CommitEditor that manages outline pages for nested editors. Give the nested DiffEditorPage its own fully functional outline page. The outline page is linked to the editor page: its selection updates when the caret's position in the editor moves between file diffs. It also has a simple context menu giving access to actions for opening the files in an editor, or for showing a file diff in a compare editor. Change-Id: Iddd72105b86c3a8c5d31e6fa874bb470ad1f964c Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-12Make auto-staging of files being moved configurableMatthias Sohn8-83/+208
- by default auto-stage files being moved. This simplifies reverting a move using hard reset. If moved files aren't auto-staged hard reset does not fully revert the move since the new unstaged file isn't tracked by git - add an option to disable auto-staging of files being moved Change-Id: I1de114e90c26988bc83d4f4ef859cde1909f9ef4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-12Make auto-staging of files being deleted configurableMatthias Sohn9-6/+107
- by default do not auto-stage files being deleted - add an option to enable auto-staging of deleted files for those who want the old behavior. Bug: 507018 Change-Id: I5c906dd4fb7295f0ac153ada9be7ee341d8f46c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-12Merge "Save and restore previously selected reset type "Matthias Sohn1-2/+10
2016-12-12Save and restore previously selected reset type Tomasz Zarna1-2/+10
Change-Id: I430cb54802121dfeff19577a5ac38102c61c5bf1
2016-12-12Add newer Orbit repository to Oomph setup for NeonMarc-Andre Laperle1-0/+2
Otherwise, it doesn't find the newer required javaewah. Change-Id: I53c50d3c0444da2dcc82be070d85a7deea918fb7 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2016-12-10Rename DiffStyleRangeFormatter and friendsThomas Wolf7-197/+209
Since the DiffStyleRangeFormatter no longer produces StyleRanges, let's rename this class to DiffRegionFormatter. Also rename its range classes to *Region and derive them from Region. Change-Id: I142ae0550723e819163c6c50a3c4229aa99ce855 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-08Improve error handling when using SecureStoreMatthias Sohn6-54/+40
- if reading credentials fails remove the failing credentials from secure store, otherwise the same error will occur again next time when trying again to get the same credentials from a corrupted entry stored in secure store - improve error messages logged when a secure store operation fails - add SecureStoreUtils.clearCredentials() to simplify error handling Bug: 495539 Change-Id: Ie6e8712b4a8eb936bfe874c2f01ce081305ba156 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-07Turn the DiffEditorPage into a real TextEditorThomas Wolf12-223/+591
This enables many standard text editor actions like "Find" or "Go to line". There should be no visual changes except: * The diff page behaves generally like a real read-only text editor, including global contributions to menus, toolbars, the status line, and so on. The line number ruler is now provided by the text editor and can be toggled. And if the diff show multiple files, there's even folding. * The context menu is now a standard extensible text editor context menu that may get contributions. It also provides access to the text editor preferences. Code changes: * DiffViewer simplified. In particular removed a number of things from the constructor that are now provided by the standard text editor framework. (Line numbers, highlighting current line, configuration). * CommitEditor: give it an IEditorActionBarContributor to manage contributions of nested text editors. * Make HyperlinkSourceViewer a ProjectionViewer to get folding support in the editor. * Rewrite DiffEditorPage to be a TextEditor. * Add "Show In..." support. Change-Id: Ic9f2ad74f50e92d9c93d4cfd04273c12b741b284 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-06Introduce GitSynchronizer for logical model supportLaurent Delaigue20-297/+1233
This allows providing distinct implementations when doing synchronizations depending on whether or not the user is interested in logical models. The default synchronizer implementation does not deal with logical models at all and thus provides the best performance. The ModelAwareGitSynchronizer consults the logical model providers to determine the set of resources involved in synchronization operations and thus can have important performance impact especially on large repositories. It uses a 'lazy' implementation of subscriber to load additional resource revisions lazily when needed. Bug: 501990 Change-Id: I9322cef70c037e0b2c270a7c2bab7d2ffd278f60 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-04Merge branch 'stable-4.5'Matthias Sohn1-0/+3
* stable-4.5: Fix NPE in RepositorySearchDialog Change-Id: I6d5e6e2a7a7d1a9576bbd88f32c5b67cf55de11f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-03Add hyperlinks to DiffViewerThomas Wolf14-350/+1217
Provide links on file headlines and hunk headers to open files in editors. Provides links to: * Open the previous version in an editor * Open the workspace version (if it exists) in an editor * Open "this" version (i.e., the “current” one of the diff) in an editor * Open a two-way diff between the previous and this version in a compare editor Hyperlinks were chosen instead of a context menu because: * A context menu sensitive to the location in the text would have needed to be based on the location of the current selection, which is cumbersome. * A context menu based on click coordinates is not a good idea because * one has no immediate access to the coordinates of the mouse event triggering the context menu (and if one had, it would need to be converted to a text location), and * when the context menu is triggered via the keyboard (Shift-F10), there is no reasonable coordinate to use anyway. Add a hyperlink detector to create links to open files (and reveal the affected lines if on a hunk). As it turned out, simply adding a hyperlink detector worked already, but had a few problems: * Background and foreground colors got messed up when mousing over the hyperlinks because the JFace hyperlink infrastructure didn’t interact well with the purely SWT-based coloring done in the viewer. * The hyperlink pop-up giving access to the different open "commands" when there are multiple hyperlinks at the same location took longer to appear the further down in the diff the hyperlink was. No idea why; the hyperlink detector itself is fast. Therefore rewrite the DiffViewer to use the JFace infrastructure for syntax coloring. The hand-crafted SWT coloring is a dead-end and makes adding new features very hard. Added a document partitioner, plus a presentation reconciler. The line background listener was kept to get backgrounds extending over the whole width of the viewer (syntax coloring alone would only set the background on actual content). This solves the color problems, and interestingly also makes the hyperlink pop-ups appear speedily, even at the bottom of a lengthy diff. Also move all the "open file (version)" methods to DiffViewer and use them in StagingView, CommitFileDiffViewer, and CompareTreeView instead of duplicating code all around. Change-Id: I84332f8e07d9f9928a66a91799dec7650de6b44c Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-03Replace deprecated EolCanonicalizingInputStream with AutoLFInputStreamTomasz Zarna1-2/+2
Change-Id: I15102b4a38b06fe11a9fed3a85861e86a755daf6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-12-02Clean up "Replace With..." actionsThomas Wolf3-90/+26
Replace deprecated <objectContribution>s by command/handler combos. Remove now unused legacy actions. Remove defaultHandlers. Bug: 495064 Change-Id: I1968ba9b79172465c2704a100309b4c64a645acc Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-02Clean up "Replace With..." actionsThomas Wolf7-165/+107
Replace deprecated <objectContribution>s by command/handler combos. Remove now unused legacy actions. "Replace with HEAD" and "Replace With Index" also work on multiple repositories. Change the resourcesAllInRepository property test to also handle repository property tests in order to be able to test the isSafe property. Restrict the "Replace with Previous" to tracked resources; on untracked resources it would only open a dialog telling the user that there was no previous revision. Which is correct, but then why allow trying to execute the command at all? Visual change: previously, "Replace with HEAD" and "Replace With Index" did not appear on a WorkingSet containing projects from several repositories. Now they do. It's unclear to me why they didn't before, and in any case they also appeared before on WorkingSets containing projects from a single repository. Both commands are and were active when projects from several repositories were selected. Bug: 495064 Change-Id: Id0fae18e042aa180310f289e48ad13ad263c9481 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-12-02Clean up "Compare With" actionsThomas Wolf6-105/+52
Replace two more legacy <objectContribution>s by command/handler combos. Remove now unused legacy action classes, and remove a duplicate and confusing command ID org.eclipse.egit.ui.team.CompareWithRevision. In EGit, we have CompareWithRef and CompareWithCommit, and action IDs follow the class names. Fix comment in ResourceStatePropertyTester: since commit 2349a197 it doesn't enforce the "single repository" condition anymore to allow "Add to Index"/"Remove from Index" to work for multiple repositories at once. Since the "Compare with" handlers must also be enabled on StagingEntries that do not adapt to IResource (such as staged files not in the workspace) and the "resourcesSingleRepository" property thus cannot be used, introduce a new "selectionSingleRepository" property test in the SelectionPropertyTester and use that. Visual change: the ordering of the compare actions on a WorkingSet is now consistent with the ordering on IResources. Previously and inexplicably, the order was different. Bug: 495064 Change-Id: I35277df4e82e70b0d8f6bd149c4218acd3f293f7 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-11-30parameter 'site' in CommitMessageViewer constructor is never usedTomasz Zarna2-3/+2
Change-Id: I9d715327762ef21e78ca3dd3b93edaadc9af031b
2016-11-27Fix NPE in RepositorySearchDialogstable-4.5Matthias Sohn1-0/+3
Bug: 508192 Change-Id: Iec73645aacc8d49b60a93ba4f6b8b9ec9e4d3295 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-11-25Correct target nameThomas Wolf2-2/+2
Change-Id: I3643188de19c74e8a193dc6011468d5d66f4a6f7 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-11-24Be more careful with synchronization in RepositoryCacheThomas Wolf2-44/+101
Ensure that EGit doesn't use nested locking of the RepositoryCache and the IndexDiffCache. Otherwise deadlocks can occur between a new IndexDiffCacheEntry being created and pruning or clearing the RepositoryCache (lock inversion). Also ensure that stopping the bundle shuts down in the inverse order things were started. Stop listeners and cancel and wait for jobs before shutting down global caches, then shut down down the caches in the inverse order they were started. Bug: 507359 Change-Id: If5fafdbbb88e4421eb4ea15380542d5c03ca248e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-11-23Update target platformsMatthias Sohn19-332/+115
* remove target platforms older than Mars * add Oxygen target platform * update javaewah to 1.1.6 which is built using orbit-recipes only available in Oxygen Orbit builds JGit-Dependency: I7f3dcc966732b32830c75d5daa55383bd028d182 Change-Id: I5ecbd265729d8b09765ec20d8c1af690e38e3503 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-11-23Test stability fix for GitRepositoriesViewTestMatthias Sohn1-1/+4
Change-Id: I0d91487ac2b5ef2e55561181b3d66b717d483d83 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-11-20Don't steal the focus in the find widget of the history viewThomas Wolf1-5/+11
The find toolbar widget of the history view does some ugly focus juggling. Make sure to do this only initially, or when the widget is explicitly shown by the user triggering the findToolbarAction, but not when the control is re-created in response to other events, such as switching between history pages. This focus back-and-forth is a hack, but unfortunately it's the only way I have found to fix the wrong background of the whole toolbar when showing the find widget makes the toolbar move from right of the tabs to below the tabs. Bug: 507484 Change-Id: I96c2cadeb988612371dceeddc2f8967cc9566e1a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-11-13Consider active editor input only if active part is an editorThomas Wolf1-0/+4
The active editor input may be set even if the active part is not an editor. Ensure that EGit considers text selections and the active editor input only if the active part is indeed an editor. Otherwise EGit menu contributions may appear in too many places. Bug: 507398 Change-Id: I4c4822344db0c10240b357fa6986883853f50c9a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2016-11-05Show accurate progress reports for pullAndrey Loskutov1-6/+53
Don't double count on each repo, and don't suppress task names. Bug: 506617 Change-Id: I98dc9d6826d6227a8fa83d6ddc3d774e04df4c8b Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2016-11-04Use "Revision Information" label in preferences and update jobLars Vogel1-3/+3
In Bug 501823, we changed the ruler text from "Show Annotations" to "Show Revision Information". We also need to update the preferences, otherwise ours users will not find the corresponding setting. Change-Id: I61788da0be87cb5d1185c18376e7cbc93aa5cb08 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2016-11-02Avoid NPE that can occur during finishing a Gitflow releaseMax Hohenegger4-3/+16
At the moment it is unclear how this NPE can be reproduced. Presumably it happens due to a failed merge. Fail early, and added logging to provide information about which of the merges failed. https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/5806eda2e4b0596435bd7852 Change-Id: I4e5f1c2faebc0c1cb3a05ede049eec7e64da05f3 Signed-off-by: Max Hohenegger <eclipse@hohenegger.eu>

Back to the top