当前位置: 首页>>代码示例>>Java>>正文


Java PathBreadcrumbsPanel类代码示例

本文整理汇总了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));
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:45,代码来源:BlobDiffPage.java


注:本文中的com.gitblit.wicket.panels.PathBreadcrumbsPanel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。