本文整理汇总了Java中com.gitblit.wicket.panels.PathBreadcrumbsPanel类的典型用法代码示例。如果您正苦于以下问题:Java PathBreadcrumbsPanel类的具体用法?Java PathBreadcrumbsPanel怎么用?Java PathBreadcrumbsPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PathBreadcrumbsPanel类属于com.gitblit.wicket.panels包,在下文中一共展示了PathBreadcrumbsPanel类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BlobDiffPage
import com.gitblit.wicket.panels.PathBreadcrumbsPanel; //导入依赖的package包/类
public BlobDiffPage(PageParameters params) {
super(params);
final String blobPath = WicketUtils.getPath(params);
final String baseObjectId = WicketUtils.getBaseObjectId(params);
Repository r = getRepository();
RevCommit commit = getCommit();
DiffOutputType diffType = DiffOutputType.forName(GitBlit.getString(Keys.web.diffStyle,
DiffOutputType.GITBLIT.name()));
String diff;
if (StringUtils.isEmpty(baseObjectId)) {
// use first parent
diff = DiffUtils.getDiff(r, commit, blobPath, diffType);
add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class,
WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));
} else {
// base commit specified
RevCommit baseCommit = JGitUtils.getCommit(r, baseObjectId);
diff = DiffUtils.getDiff(r, baseCommit, commit, blobPath, diffType);
add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class,
WicketUtils.newBlobDiffParameter(repositoryName, baseObjectId, objectId,
blobPath)));
}
add(new BookmarkablePageLink<Void>("commitLink", CommitPage.class,
WicketUtils.newObjectParameter(repositoryName, objectId)));
add(new BookmarkablePageLink<Void>("commitDiffLink", CommitDiffPage.class,
WicketUtils.newObjectParameter(repositoryName, objectId)));
// diff page links
add(new BookmarkablePageLink<Void>("blameLink", BlamePage.class,
WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));
add(new BookmarkablePageLink<Void>("historyLink", HistoryPage.class,
WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));
add(new CommitHeaderPanel("commitHeader", repositoryName, commit));
add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, blobPath, objectId));
add(new Label("diffText", diff).setEscapeModelStrings(false));
}