Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-02-07 12:59:26 +0000
committerThomas Wolf2016-02-29 18:30:14 +0000
commit04b5ae86a4dacfecdd86d7d92c697695fcedfe7b (patch)
treeee8be33f08154ebde4e6a5625cdf7fb157540aea /org.eclipse.egit.ui.test
parent83ad11e2ff549487a8fb3352950266b663bc979b (diff)
downloadegit-04b5ae86a4dacfecdd86d7d92c697695fcedfe7b.tar.gz
egit-04b5ae86a4dacfecdd86d7d92c697695fcedfe7b.tar.xz
egit-04b5ae86a4dacfecdd86d7d92c697695fcedfe7b.zip
Decorate IFolders that are submodule working directory roots
Introduce a new configurable submodule text decoration used for folders that are submodule working directory roots. (Or working directory roots of nested repositories.) The default shows the a dirty indicator, the branch, branch state, and the head commit's short message. The repository name is omitted since it'll always be identical to the folder name. Added a new variable for the short message of the head commit. Change-Id: I75460fd59f2e6c9bd06e82a1966e3d06f97ab709 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java
index c15b6b156f..320344a6f9 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/submodules/SubmoduleFolderTest.java
@@ -243,6 +243,24 @@ public class SubmoduleFolderTest extends LocalRepositoryTestCase {
}), 5000);
}
+ @Test
+ public void testDecoration() throws Exception {
+ SWTBotTree projectExplorerTree = TestUtil.getExplorerTree();
+ SWTBotTreeItem node = TestUtil.navigateTo(projectExplorerTree,
+ childFolder.getFullPath().segments());
+ waitForDecorations();
+ assertTrue("Folder should have repo/branch decoration",
+ node.getText().contains("[master"));
+ node = TestUtil.getChildNode(node.expand(), CHILDPROJECT);
+ waitForDecorations();
+ assertFalse("Folder should not have repo/branch decoration",
+ node.getText().contains("["));
+ node = TestUtil.navigateTo(projectExplorerTree, CHILDPROJECT);
+ waitForDecorations();
+ assertTrue("Project should have subrepo/branch decoration",
+ node.getText().contains("[child"));
+ }
+
@SuppressWarnings("restriction")
@Test
public void testHistoryFromProjectExplorerIsFromSubRepository()

Back to the top