Skip to main content
AgeCommit message (Collapse)AuthorFilesLines
2020-06-09Prepare 5.9.0-SNAPSHOT buildsMatthias Sohn2-18/+18
Change-Id: I92254611d084dbb365bcf6a94d36c3010090bb71 Signed-off-by: Matthias Sohn <>
2020-04-21Allow to select bundle files as source URIsKonrad Windszus1-7/+7
Bug: 560903 Change-Id: I3a56d26535eb6385eb21836835c1073ca9b33e22 Signed-off-by: Konrad Windszus <>
2020-04-16Prevent ClassCastException during cloningAlexander Nittka1-0/+32
Cloning commands must not assume the RepositoriesView to be active. Otherwise a ClassCastException may occur when trying to expand a group node. Bug: 562109 Change-Id: I18fb36c3b8fb28823b4465e487589e7f58406e7a Signed-off-by: Alexander Nittka <>
2020-04-13allow specifying the tag option when cloningAlexander Nittka3-5/+63
This change allows the user to specify the tag option for the remote configuration when initially cloning the repository. Bug: 561021 Change-Id: Idd9939d1e90d5eb1b14d3af370d495d4005feb73 Signed-off-by: Alexander Nittka <>
2020-04-04[staging view ] commit button enablementAlexander Nittka2-0/+46
The commit button should be enabled only if there is something to commit. Bug: 525685 Change-Id: Ib5915668a0e96786c01e431f685fb4bce13aa613 Signed-off-by: Alexander Nittka <>
2020-03-29[cleanup] Remove no longer needed CommonUtils.getService()Thomas Wolf4-14/+10
Use IServiceLocator.getService() directly; it's generified since Eclipse 4.5. Change-Id: I6c86d1b47813c07927ae3bb85e6ca17d28c30125 Signed-off-by: Thomas Wolf <>
2020-03-28Refactor simple toggle commandsThomas Wolf4-10/+9
Provide a single non-abstract command implementation. Move the ids for the "branch hierarchy" and "show commits on refs" up to that class. These commands had originated in the repositories view, but as that view's content and label provider became more general, they were re- used elsewhere, too, and so today these toggles have an effect beyond the repositories view. Moving these to a general common ToggleCommand class thus makes sense. Move the ID for "link repositories view with selection" to the repositories view. Keep the command IDs unchanged. Adapt tests. Change-Id: Ica8b0c388722904cdf435691e2dd7f7508f9a315 Signed-off-by: Thomas Wolf <>
2020-03-24[history view test] Fix bug in GenerateHistoryJobThomas Wolf1-2/+0
The test failed because the job sometimes would not update the UI. Change-Id: I38d357c6029b551d1e0516bbe9ca2c37e3839fea
2020-03-22history view test stability 2Alexander Nittka1-1/+1
Waiting for jobs in assertNoCommit did not reliably solve the sporadic HistoryViewTest failures. Other tests suggested that an unselect before changing the tree content might be better. Change-Id: I7fa74a57e1553e33160bd0e1e697310e20aee1f2 Signed-off-by: Alexander Nittka <>
2020-03-17history view test stabilityAlexander Nittka1-1/+2
Wait for jobs in assertNoCommit in analogy to assertCommitsAfterBase. The test failed in multiple builds with changes unrelated to this test - always in assertNoCommit. Change-Id: Ia35779075d80988dc1c978d0b263de9da5ad7e13 Signed-off-by: Alexander Nittka <>
2020-03-09Prepare 5.8.0-SNAPSHOT buildsMatthias Sohn2-18/+18
Change-Id: I8faed4348ce34f28b6a00e620667fe36a2ec502d Signed-off-by: Matthias Sohn <>
2020-02-25Dynamic label for Push to/Fetch from UpstreamAlexander Nittka2-13/+14
Let push to and fetch from upstream contributions implement IElementUpdater in order to inform the user about the push target/fetch source. This is useful when working with several remotes for the same repository. Bug: 441940 Change-Id: I130437f59fd309566db85e30054baac4e9268760 Signed-off-by: Alexander Nittka <>
2020-02-25Create branch from repository groupAlexander Nittka1-8/+12
Allow creating a new branch for a mixed selections of repositories and/or repository groups. The branch is created from the current head. Except for the branch name no further configuration is possible. Bug: 558561 Change-Id: Ic6dccb6d9813ee568c70997d997f92121de46752 Signed-off-by: Alexander Nittka <> Signed-off-by: Thomas Wolf <>
2020-01-27Replace deprecated junit assertion methods with hamcrestMatthias Sohn10-13/+15
Change-Id: I512ebc8c5de591d2e3fe0f4bf74a3ef594122d49 Signed-off-by: Matthias Sohn <>
2020-01-27Update Orbit to I20200126235943Michael Keppler1-3/+3
- update org.junit to 4.13.0.v20200126-2018 - add org.assertj 3.14.0.v20200120-1926 Since this is required in jgit now, update egit target platform to the same versions. Bug: 559547 Change-Id: Id7bcb8f0b4beabe0b8705a7bc061dfa2b118b30a Signed-off-by: Michael Keppler <> Signed-off-by: Matthias Sohn <>
2019-12-28Remove redundant type informationMichael Keppler4-6/+6
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 <>
2019-12-28Enable and execute cleanup "Push down negations"Michael Keppler2-6/+6
Push down negations to make reading of complex expressions with negations easier. Also enable the cleanup as a save action. There is a bug in the cleanup (not adding braces around instanceof expressions), but whenever that occurs, the developer can just add the braces manually, and the bug will not occur again for that location. Therefore that bug should not stop us from using the cleanup. Change-Id: I1a5026304b080b0ccebe06e6829857b784541f99 Signed-off-by: Michael Keppler <>
2019-12-27Upgrade project properties to 2019-12 formatMichael Keppler3-1/+8
Open and save all project property pages to have new values stored explicitly in version control. There are no functional changes (i.e. all lines must be added, or must be a version increment). This change does not guarantee that the properties are the same for all projects in the repository. Change-Id: I39e0bf55811d27ba71ae2adda9010ac26b60bc75 Signed-off-by: Michael Keppler <>
2019-12-26Fix typo in testsMichael Keppler5-25/+25
Change-Id: I7c91f36a166b371e688c2c598393da87d3299f85 Signed-off-by: Michael Keppler <>
2019-12-23[ref filters] Prevent exception on canceling the dialogThomas Wolf1-0/+16
When the dialog was canceled while an inline editor was open a "widget is disposed" exception occurred. Prevent that by checking explicitly. Change-Id: I22aff34a68219655e0068ee6c8fe8590b10bcf7e Signed-off-by: Thomas Wolf <>
2019-12-15[deco cache] Reset BranchStatus cache on ConfigChangedEventThomas Wolf1-2/+57
Otherwise labels are not updated when a branch is (re-)configured. Bug: 558323 Change-Id: Ifa47c0edcaf4bc3b73682ac2f2ac33e976a95155 Signed-off-by: Thomas Wolf <>
2019-12-13[repo view] Simpler refresh, better decorator setup, simpler listenersThomas Wolf1-1/+1
Instead of a scheduling a job that schedules a UI refresh simply schedule the UI refresh directly. Reduce the default delay a little. Also, there is no need to use a new input. Refreshing the viewer will pick up structural changes. The lightweight decorator was setup in a somewhat non-standard way not really supported by the CNF. Use a simple non-decorating label provider in the view, and let the framework do all the decorating. This has multiple advantages: there's no flickering on refreshes. Icon decorations can finally be done in the lightweight decorator. This also brings back the gitflow icon overlay. And there's no longer a need for caching "last used" labels to avoid flickering in text decorations. However, out of the box the framework does not support having label text after the decoration. Add special-case handling for updating a ViewerCell and add the directories of repositories and working trees only then. If this were done in getStyledText() of the label provider, the directories would appear before the decoration. Note that both the simpler refresh and the lightweight decorator setup belong together. Doing only one or the other leads to flickering on refresh. Use lambdas for listeners. Bug: 553841 Change-Id: I735da30934c650680d60781ae58f7f354089d7d0 Signed-off-by: Thomas Wolf <>
2019-12-05Prepare 5.7.0-SNAPSHOT buildsMatthias Sohn2-18/+18
Change-Id: I23af5df49d780878bf15782f1ce0ddb2f05f0b6e Signed-off-by: Matthias Sohn <>
2019-11-29[tests] Stabilize StashesMenuTestThomas Wolf1-0/+6
The test should wait until the background job performing the operation on the stash has finished. Change-Id: Ia62770fddfaccb8a5c25293bdd7b9b4db95c7cfe Signed-off-by: Thomas Wolf <>
2019-11-27[releng] Try project deletion multiple timesMichael Keppler1-38/+2
We sometimes see test failures in the master build caused by not being able to delete a test project. See builds 173, 170, 165... for examples. Therefore repeat project deletion in case of error, as it may be locked by some other concurrent processing. Change-Id: I3dbeba99a4d5bf5a6e0c9e960c5abb2277c057a1 Signed-off-by: Michael Keppler <>
2019-11-23Ref filter dialog: use standard Eclipse variable syntaxThomas Wolf3-81/+54
Use "${git_branch}" instead of "[CURRENT-BRANCH]". Adjust the explanation and the tests accordingly. GitHistoryReffilterConfigurationDialogTest didn't work on OS X. First, the key events were not sent on the UI thread, and second, they never arrived at the cell editor. Rewrite this part to use normal setText() following the example given by the SWTBot developers.[1] [1] Bug: 553072 Change-Id: I8d092c0035b1d5cb3025552e5022a6b5ac53054f Signed-off-by: Thomas Wolf <>
2019-11-22Branch selection dialog improvementsThomas Wolf1-1/+1
This dialog can be invoked via the BranchActionHandler, which is a default handler. Make sure the dialogs say in which repository they operate; it may not be obvious if invoked via Quick Access. Pre-select the current branch, if any, in the dialog, so that when clicking "New branch..." there is a default base set. Also give the BranchActionHandler a description. Bug: 553223 Change-Id: I0aaf4a6788382201310dbcd1ff4f154577720db6 Signed-off-by: Thomas Wolf <>
2019-11-21"Switch To" should allow to take a commit/hash as inputSimon Muschel2-12/+22
Add a new menu entry to open the CommitSelectionDialog to be able to check out an arbitrary commit. Give all menu items an icon. Bug: 451087 Change-Id: I5b0596f52334c0876a868de76d776075b6a2adb9 Signed-off-by: Simon Muschel <> Signed-off-by: Thomas Wolf <>
2019-11-17Fix assertion argument orderMichael Keppler1-2/+2
Change-Id: I54a4d77f93bd646f66b3eb24f575020e2b6b1437 Signed-off-by: Michael Keppler <>
2019-11-16[repo view] Eliminate default handler for paste commandThomas Wolf1-2/+6
Remove the special paste command with its default handler; create a dedicated handler and bind it to the standard paste command instead. Remove the now superfluous key binding. Bug: 495064 Change-Id: Ibcacd226b37bf05f1e46126e277a0f5ef6aab6a1 Signed-off-by: Thomas Wolf <>
2019-11-12Decorators: cache more repository stateThomas Wolf1-2/+1
Generalize the mechanism previously only used for the branch state in the DecoratableResourceHelper. This cached the branch state per repository and relied on the label providers clearing that cache when needed. Use the same mechanism for more repository state, similar to what had been done in commit 8bf986c3 for handler enabling. Make RepositoryStateCache abstract; move the clearing on selection changes into a separate subclass and use that instead. Give decorators their own cache instance, and make sure they use it instead of computing things themselves over and over again. Bug: 550878 Change-Id: I988905103ad86e18c696269dd54d525fcdbc5cbc Signed-off-by: Thomas Wolf <>
2019-11-11GitHistoryView: Add ability to select refs to showTim Neumann6-33/+1910
This commit adds: * Helper class to manage ref filter preferences (repo specific) * Changes to MenuBar * New Dialog to configure Ref filters * Fixes for existing tests, which were broken by this change * New tests for the new features CQ: 21056 Bug: 381520 Change-Id: I5e2eb4daa843e91ca120da45c09482e5ba82a6af Signed-off-by: Tim Neumann <>
2019-11-07[staging view] Run deletion and discarding changes in background jobsThomas Wolf1-2/+5
Run the DeletePathsOperation in a job. The normal DeleteResourceAction also performs the deletion in a job. For resetting, re-use the DiscardChangesOperation and also run it in a job. Name the UI text keys for DeletePathsOperationUI consistently. Fix broken GitRepositoriesViewTest.testDeleteFileNotInProject(); this test actually tested the wrong thing and worked only by chance. It should have failed since commit a422ae25 when the button label was changed. It kept on working because it actually got the platform's "Delete Resources" dialog, not EGit's "Delete Files" dialog, which until now happened to have the same title. Bug: 552776 Change-Id: I8da1967e9bf2151d89ef06fdeedccab0059b7568 Signed-off-by: Thomas Wolf <>
2019-11-01Staging view: don't clear title RepositoryNodeThomas Wolf2-2/+49
This node may end up being referenced elsewhere, for instance in the repositories view. If it's nulled out, the repositories view will then have a node with a null repository, which breaks all subsequent operations on that node. Bug: 552622 Change-Id: I3338b9ac038a235eaf5f373e8b60406ca10af0cb Signed-off-by: Thomas Wolf <>
2019-10-26[repo view] Link with selection: immediate reaction, show open editorsThomas Wolf1-9/+0
React immediately when linking with selection is enabled. Track workbench parts even when linking is disabled. When linking is enabled, immediately react on the last selection before the repositories view became active. When the selection inside the view changes react to a FileNode being selected by bringing an already open editor of that file to the front. Activate and correct the already existing test for this. Remove the old LinkHelper. It wasn't used anymore since commit d6cf5241 in 2013. Bug: 409722 Change-Id: I49ebc0b361469f3058348199ff8bd3557d949634 Signed-off-by: Thomas Wolf <>
2019-10-23Fix broken "start release" from commit in history viewMax Hohenegger1-0/+19
The changes in commit 2e2810f7 broke this sub-menu entry in Gitflow. Fix by using SelectionProvider instead of adapters. Add UI test to avoid future breakage. Bug: 551819 Change-Id: I943b43babc7d0eb028623c5419371fa68c4d8150 Signed-off-by: Thomas Wolf <>
2019-10-17[repo view] Let "link with selection" be always enabledThomas Wolf5-23/+61
It's actually a normal state toggling command for which a default handler is fine. It didn't have a default handler because it was badly implemented and assumed that the currently active part was the repositories view. Change the handling of all three toggle commands in the repositories view. Let them only toggle their state, don't make them refresh the view. Make the view listen to state changes and refresh if needed. The content provider doesn't need to listen to changes; it has no way to inform the viewer to refresh. Also remove duplicating the state into local boolean variables; use the state's current value instead. Bug: 537958 Change-Id: I2027a64bd6f4e88439e7975b9d3c3eb3d381efef Signed-off-by: Thomas Wolf <>
2019-10-04Preserve executable bit when editing index entriesThomas Wolf1-0/+41
Only change the mode to REGULAR_FILE if the existing entry is not a file. Bug: 551679 Change-Id: I8f6b61bef1c46c9cc343ce1d891b79594d4590a4 Signed-off-by: Thomas Wolf <>
2019-10-02Don't return a path for an IStorage representing an index entryThomas Wolf5-203/+364
Doing so may make some parts of Eclipse conclude the storage really represented an on-disk file and then revert the internal file buffer to that index state, which rolls back all open editors on that file to the index state (and marks them dirty). That's not what we want at all. Occurs for instance with Java files. Adapting to IFile (from commit 0c17469b) to make Eclipse select the right DocumentProvider is fine, but returning a path for the IStorage is not. Bug: 550989 Change-Id: I3f63ad9a4432063d7d1a245c05641fcf12698c2f Signed-off-by: Thomas Wolf <>
2019-09-30Adapt editor inputs to IFile for merge with index stage 2 as inputThomas Wolf1-1/+15
Otherwise the framework cannot find the correct DocumentProvider, which may cause a PartInitException on opening the merge editor. This uses the same hacks as in LocalNonWorkspaceTypedElement. Bug: 550989 Change-Id: Id024c7f849f4cc6d16e6aa4e845f04f86c9534e5 Signed-off-by: Thomas Wolf <>
2019-09-21Migrate JDT project settings to 2019-09 formatMichael Keppler2-1/+19
There is no change in settings. All the newly added lines are the default values (e.g. iterate all project property pages and apply without changing any value). Be aware that the projects currently do not use identical settings everywhere. That can be cleaned up later. Change-Id: I1d574ca5336abe1a2ee9cfa74a54700f25cb730d Signed-off-by: Michael Keppler <>
2019-08-29Prepare 5.6.0-SNAPSHOT buildsMatthias Sohn2-18/+18
Change-Id: I617ef95d0f31df937987d1d4046b0f10db05cf47 Signed-off-by: Matthias Sohn <>
2019-08-27History view: shorten view toolbarThomas Wolf1-16/+38
Combine the four filter buttons into one single button with a drop-down menu. Selecting the button itself cycles though the filters. Use the new FilterAction also in the view menu; to be able to do so implement ToolBarMenuAction.getMenu(Menu) and rename the class to DropDownMenuAction. Also, as long as one only updates the image of an action it isn't necessary to update the whole toolbar. The framework listens for such changes and updates the corresponding ToolItem or Menu entry already. Change-Id: If7fb1e3199cd1721a4455bac10925fc2922c5ba8 Signed-off-by: Thomas Wolf <>
2019-08-21Shorten confirmation messages for "reset hard" and "discard changes"Thomas Wolf2-2/+2
Eliminate the "Are you sure?"-like extra questions. They're not necessary; the dialogs tell the user what's going to happen and present a "Reset"/"Discard Changes" button and a "Cancel" button. The explicit questions were a left-over from older code where the dialogs had just "Yes"/"No" or "OK"/"Cancel" buttons. Incidentally constructing the message texts becomes simpler because the warning text about running launches doesn't have to be inserted somewhere in the middle but can simply be tacked onto the end. Bug: 550292 Bug: 550293 Change-Id: I9365737ef08fe43f29142ca1ae6851464282a334 Signed-off-by: Thomas Wolf <>
2019-08-21Fix silent failure on conflicting checkout after branch creation.Max Hohenegger4-28/+83
* Minor changes in BranchOperationUI to re-use checkout result handling. * Add UI test because the issue is tedious to reproduce, and depends on proper synchronization with the Job and the Display thread. Bug 549612 Change-Id: I616b975f5eff881c6cc3455649ec7dd7a9bd293f Signed-off-by: Max Hohenegger <>
2019-08-13Stabilize StageUnstageActionTestMichael Keppler1-0/+1
We had WidgetNotFoundExceptions in the last 2 executions of our main build job. Re-calculate the tree widget after unsharing a project to eventually get rid of the exception. Local testing did not expose the exception on my Windows system. org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: The widget {null} was disposed. at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.<init>( at org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem.<init>( at org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem.<init>( at org.eclipse.swtbot.swt.finder.widgets.SWTBotTree.notifySelect( at org.eclipse.swtbot.swt.finder.widgets.SWTBotTree.notifySelect( at at Change-Id: Iefbeb57f1adb62426db457c3f0a918529fe648a7 Signed-off-by: Michael Keppler <>
2019-08-09Fix equals & hashCode of StashedCommitNodeThomas Wolf2-0/+130
Nodes in the repositories view for stashed commits must only be equal if the commit _AND_ the index are equal. Otherwise the TreeViewer in the repositories view gets confused and does not update the tree correctly. Bug: 464949 Change-Id: Iab7dc3e5471f71f4034735bb661e29ed8f3b6998 Signed-off-by: Thomas Wolf <>
2019-07-22Log an error if the reflog cannot be readThomas Wolf1-1/+27
EGit reads the reflog in three places: in the SwitchToMenu, when trying to get a short branch name, and in the reflog view. The latter uses JGit's ReflogCommand and has its own fatal error handling. In the other two places, a failure to read the reflog may cause severe UI functionality loss. Therefore catch RuntimeExceptions, too, and just log them. In SwitchToMenu, also just log IOExceptions when the ref log cannot be read. That way, there's a fair chance that the menu will still show some branches. Bug: 549235 Change-Id: I914536a65cec9d7e5c04199e989926d46e607427 Signed-off-by: Thomas Wolf <>
2019-07-07Fix showing selected refs or commits in history viewThomas Wolf1-25/+86
When the history view shows only the current branch ("Show all branches and tags" _off_), selecting some other branch in the git repositories view might not show the selected branch. It would be shown only if that branch happened to be merged into the currently checked out branch. The same could be observed when using "Show In History" on a commit in the results of a "Git Search": the commit would only be selected if it was contained in the branch currently checked out. Change this by always considering such a selected branch or commit as an additional start point for the RevWalk. This enables the user to make the history view show exactly two branches (plus all those merged into these two), and also correctly selects commits not on the current branch. Bug: 360868 Change-Id: Ib2e071f40c57b06a0ce0a51defac3fe30f481e03 Signed-off-by: Thomas Wolf <>
2019-07-03Repositories view: check for submodules when reacting on selectionThomas Wolf1-3/+56
When the repositories was set to follow the selection and a file in a submodule folder was selected, the submodule repository was added as a top-level repository in the view. Fix this by also considering repositories under submodule nodes when determining which node to show. Add a new test, and fix SubmoduleFolderTest to properly commit the addition of the submodule in setUp(). Bug: 520735 Change-Id: I54c1d2c5d2b8fac95dc7a4fed658e59285639f4c Signed-off-by: Thomas Wolf <>

Back to the top