code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
attributes.getAjaxCallListeners().add(new ConfirmLeaveListener(form));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | updateAjaxAttributes | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
WebMarkupContainer commentOrReplyContainer = newCommentOrReplyContainer();
editFragment.replaceWith(commentOrReplyContainer);
target.add(commentOrReplyContainer);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onInitialize() {
super.onInitialize();
add(new Label("label", "Save"));
add(AttributeAppender.append("class", "dirty-aware"));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onInitialize | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
super.onError(target, form);
target.add(feedback);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onError | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
super.onSubmit(target, form);
String content = contentInput.getModelObject();
if (content.length() > CodeComment.MAX_CONTENT_LEN) {
error(_T("Comment too long"));
target.add(feedback);
} else {
... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onSubmit | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.canModifyOrDelete(getComment()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
send(getPage(), Broadcast.BREADTH, new ContentQuoted(target, getComment().getContent()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.getAuthUser() != null);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
private WebMarkupContainer newActionsContainer() {
WebMarkupContainer actionsContainer = new Fragment("actions", "actionsFrag", this) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.getAuthUser() != null);
}
};
actionsContainer.setOutputMarkupId(true)... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | newActionsContainer | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.getAuthUser() != null);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
onAddReply(target, null);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
onAddReply(target, true);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(!getComment().isResolved() && SecurityUtils.canWriteCode(getComment().getProject()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
onAddReply(target, false);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(getComment().isResolved() && SecurityUtils.canWriteCode(getComment().getProject()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
String confirmMessage;
if (getComment().getReplies().isEmpty()) {
confirmMessage = _T("Do you really want to delete this code comment?");
} else {
confirmMessage = _T("D... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | updateAjaxAttributes | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
onDeleteComment(target, getComment());
OneDev.getInstance(CodeCommentManager.class).delete(getComment());
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.canModifyOrDelete(getComment()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
private List<CodeCommentActivity> getActivities() {
List<CodeCommentActivity> activities = new ArrayList<>();
for (CodeCommentStatusChange change: getComment().getChanges())
activities.add(new CodeCommentStatusChangeActivity(change));
for (CodeCommentReply comment: getComment().getReplies())
activiti... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getActivities | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onInitialize() {
super.onInitialize();
add(newCommentOrReplyContainer());
activitiesView = new RepeatingView("activities");
List<CodeCommentActivity> activities = new ArrayList<>();
for (CodeCommentStatusChange change: getComment().getChanges())
activities.add(new CodeComme... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onInitialize | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
@SuppressWarnings("deprecation")
public void onObservableChanged(IPartialPageRequestHandler handler, Collection<String> changedObservables) {
Component prevActivityContainer;
if (activitiesView.size() > 0)
prevActivityContainer = activitiesView.get(activitiesView.size()-1);
else
pr... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onObservableChanged | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public Collection<String> findObservables() {
return Sets.newHashSet(CodeComment.getChangeObservable(commentId));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | findObservables | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onEndRequest(RequestCycle cycle) {
if (SecurityUtils.getAuthUser() != null)
OneDev.getInstance(VisitInfoManager.class).visitCodeComment(SecurityUtils.getAuthUser(), getComment());
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onEndRequest | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(CssHeaderItem.forReference(new CodeCommentCssResourceReference()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | renderHead | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onEvent(IEvent<?> event) {
super.onEvent(event);
if (event.getPayload() instanceof ContentQuoted) {
ContentQuoted contentQuoted = (ContentQuoted) event.getPayload();
if (visitChildren(MarkdownEditor.class, new IVisitor<MarkdownEditor, MarkdownEditor>() {
@Override
public void co... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onEvent | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void component(MarkdownEditor object, IVisit<MarkdownEditor> visit) {
visit.stop(object);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | component | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
private void onAddReply(IPartialPageRequestHandler handler, @Nullable Boolean resolved) {
Fragment editFragment = new Fragment("actions", "commentOrReplyEditFrag", CodeCommentPanel.this);
Form<?> form = new Form<Void>("form");
CommentInput contentInput = new CommentInput("content", Model.of(""), true) {
@... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onAddReply | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected AttachmentSupport getAttachmentSupport() {
return new ProjectAttachmentSupport(getProject(), getComment().getUUID(),
SecurityUtils.canManageCodeComments(getProject()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getAttachmentSupport | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected String getAutosaveKey() {
return "code-comment:" + getComment().getId() + ":new-reply";
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getAutosaveKey | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected SuggestionSupport getSuggestionSupport() {
return CodeCommentPanel.this.getSuggestionSupport();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getSuggestionSupport | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected Project getProject() {
return getComment().getProject();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getProject | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected List<Behavior> getInputBehaviors() {
List<Behavior> behaviors = new ArrayList<>();
if (resolved != null)
behaviors.add(AttributeModifier.replace("placeholder", "Leave a note"));
return behaviors;
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getInputBehaviors | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected List<User> getParticipants() {
return getComment().getParticipants();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getParticipants | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
attributes.getAjaxCallListeners().add(new ConfirmLeaveListener(form));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | updateAjaxAttributes | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
WebMarkupContainer actionsContainer = newActionsContainer();
editFragment.replaceWith(actionsContainer);
target.add(actionsContainer);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onInitialize() {
super.onInitialize();
if (resolved != null) {
add(new Label("label", "Ok"));
} else {
add(new Label("label", "Save"));
add(AttributeAppender.append("class", "dirty-aware"));
}
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onInitialize | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
super.onError(target, form);
target.add(feedback);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onError | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
super.onSubmit(target, form);
String content = contentInput.getModelObject();
if (content != null && content.length() > CodeCommentReply.MAX_CONTENT_LEN) {
error(_T("Comment too long"));
target.add(feedback);
}... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onSubmit | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public Component render(String componentId) {
Fragment fragment = new Fragment(componentId, "statusChangeFrag", CodeCommentPanel.this, Model.of(this));
fragment.add(new UserIdentPanel("userAvatar", getChange().getUser(), Mode.AVATAR));
fragment.add(new Label("userName", getChange().getUser().getDis... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | render | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("data-tippy-content", _T("Current context is different from this action, click to show the comment context"));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onComponentTag | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
public CodeCommentStatusChange getChange() {
return OneDev.getInstance(CodeCommentStatusChangeManager.class).load(changeId);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getChange | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public Date getDate() {
return getChange().getDate();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getDate | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public String getAnchor() {
return getChange().getAnchor();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getAnchor | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public User getUser() {
return getChange().getUser();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getUser | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public Component render(String componentId) {
CodeCommentReply reply = getReply();
Fragment viewFragment = new Fragment(componentId, "commentOrReplyViewFrag",
CodeCommentPanel.this, Model.of(this));
viewFragment.setOutputMarkupId(true);
viewFragment.setMarkupId(reply.getAnchor());
viewF... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | render | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("data-tippy-content", _T("Current context is different from the context when this reply is added, click to show the reply context"));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onComponentTag | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("href", "#" + getReply().getAnchor());
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onComponentTag | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void detach() {
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | detach | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public String getObject() {
return getReply().getContent();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getObject | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void setObject(String object) {
CodeCommentReply reply = getReply();
reply.setContent(object);
onSaveCommentReply(RequestCycle.get().find(AjaxRequestTarget.class), reply);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | setObject | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected SuggestionSupport getSuggestionSupport() {
return CodeCommentPanel.this.getSuggestionSupport();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getSuggestionSupport | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
Fragment editFragment = new Fragment(viewFragment.getId(),
"commentOrReplyEditFrag", CodeCommentPanel.this,
Model.of(replyId));
Form<?> form = new Form<Void>("form");
CommentInput contentInput = new CommentInput("content"... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected SuggestionSupport getSuggestionSupport() {
return CodeCommentPanel.this.getSuggestionSupport();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getSuggestionSupport | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected String getAutosaveKey() {
return "code-comment-reply:" + getReply().getId();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getAutosaveKey | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected AttachmentSupport getAttachmentSupport() {
return new ProjectAttachmentSupport(getProject(), getComment().getUUID(),
SecurityUtils.canManageCodeComments(getProject()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getAttachmentSupport | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected Project getProject() {
return getComment().getProject();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getProject | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected List<User> getParticipants() {
return getComment().getParticipants();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getParticipants | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
attributes.getAjaxCallListeners().add(new ConfirmLeaveListener(form));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | updateAjaxAttributes | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
Component activityContainer = new CodeCommentReplyActivity(getReply()).render(componentId);
editFragment.replaceWith(activityContainer);
target.add(activityContainer);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
super.onError(target, form);
target.add(feedback);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onError | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
super.onSubmit(target, form);
String content = contentInput.getModelObject();
if (content.length() > CodeCommentReply.MAX_CONTENT_LEN) {
error("Comment too long");
target.add(feedback);
... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onSubmit | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.canModifyOrDelete(getReply()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
send(getPage(), Broadcast.BREADTH, new ContentQuoted(target, getReply().getContent()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.getAuthUser() != null);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
attributes.getAjaxCallListeners().add(new ConfirmClickListener(_T("Do you really want to delete this reply?")));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | updateAjaxAttributes | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public void onClick(AjaxRequestTarget target) {
viewFragment.remove();
OneDev.getInstance(CodeCommentReplyManager.class).delete(getReply());
target.appendJavaScript(String.format("$('#%s').remove();", viewFragment.getMarkupId()));
notifyCodeCommentChange(target, getComment());
... | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onClick | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.canModifyOrDelete(getReply()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
public Long getCommentId() {
return replyId;
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getCommentId | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
public CodeCommentReply getReply() {
return OneDev.getInstance(CodeCommentReplyManager.class).load(replyId);
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getReply | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public Date getDate() {
return getReply().getDate();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getDate | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public String getAnchor() {
return getReply().getAnchor();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getAnchor | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
@Override
public User getUser() {
return getReply().getUser();
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | getUser | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
private void notifyCodeCommentChange(AjaxRequestTarget target, CodeComment comment) {
((BasePage) getPage()).notifyObservableChange(target, CodeComment.getChangeObservable(comment.getId()));
} | We pass comment id instead of comment model as we want to make sure that
comment is always loaded upon usage as this panel is involved in websocket
update and websocket update does not detach models at end of request which
may result in Hibernate lazy load exception when the comment is used again
in next request
@p... | notifyCodeCommentChange | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/codecomment/CodeCommentPanel.java | MIT |
public Component getHeader(String componentId) {
return new HeaderSelector<T>(componentId) {
@Override
protected Set<IModel<T>> getSelections() {
return selections;
}
@Override
protected void onSelectionChange(AjaxRequestTarget target) {
SelectionColumn.this.onSelectionChange(target);
}
... | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | getHeader | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
@Override
protected Set<IModel<T>> getSelections() {
return selections;
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | getSelections | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
@Override
protected void onSelectionChange(AjaxRequestTarget target) {
SelectionColumn.this.onSelectionChange(target);
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | onSelectionChange | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
public S getSortProperty() {
return null;
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | getSortProperty | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
public boolean isSortable() {
return false;
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | isSortable | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel) {
cellItem.add(new RowSelector<T>(componentId, rowModel) {
@Override
protected Set<IModel<T>> getSelections() {
return selections;
}
@Override
protected void onSelectionChange(AjaxRequestTarget targ... | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | populateItem | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
@Override
protected Set<IModel<T>> getSelections() {
return selections;
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | getSelections | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
@Override
protected void onSelectionChange(AjaxRequestTarget target) {
SelectionColumn.this.onSelectionChange(target);
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | onSelectionChange | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
public String getCssClass() {
return "row-selector";
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | getCssClass | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
public Set<IModel<T>> getSelections() {
return selections;
} | Add this column to the wicket DataTable component so that user can select row of the
data table using checkboxes. Override method ${@link SelectionColumn#onSelectionChange(AjaxRequestTarget)}
to add your process logic when selection changes, and call ${@link SelectionColumn#getSelections()} to get
current selections... | getSelections | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/datatable/selectioncolumn/SelectionColumn.java | MIT |
@Override
protected List<DiffEntryFacade> load() {
AnyObjectId oldRevId = getProject().getObjectId(oldRev, true);
AnyObjectId newRevId = getProject().getObjectId(newRev, true);
return getGitService().diff(getProject(), oldRevId, newRevId);
} | Make sure to add only one revision diff panel on a page
@author robin | load | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected List<BlobChange> load() {
List<DiffEntryFacade> diffEntries = diffEntriesModel.getObject();
List<BlobChange> changes = new ArrayList<>();
for (DiffEntryFacade entry : diffEntries) {
ChangeType changeType;
if (entry.getChangeType() == ChangeType.RENAME
&& entry.getOldPath().... | Make sure to add only one revision diff panel on a page
@author robin | load | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected List<BlobChange> load() {
List<BlobChange> diffChanges;
if (getTotalChanges().size() > WebConstants.MAX_DIFF_FILES)
diffChanges = getTotalChanges().subList(0, WebConstants.MAX_DIFF_FILES);
else
diffChanges = getTotalChanges();
List<BlobChange> displayChanges = new ArrayList<>(... | Make sure to add only one revision diff panel on a page
@author robin | load | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected List<PendingSuggestionApply> load() {
return OneDev.getInstance(PendingSuggestionApplyManager.class)
.query(SecurityUtils.getAuthUser(), getPullRequest());
} | Make sure to add only one revision diff panel on a page
@author robin | load | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
public void detach() {
blameModel.detach();
} | Make sure to add only one revision diff panel on a page
@author robin | detach | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
public String getObject() {
return blameModel.getObject();
} | Make sure to add only one revision diff panel on a page
@author robin | getObject | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
public void setObject(String object) {
AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
String prevBlameFile = blameModel.getObject();
blameModel.setObject(object);
if (prevBlameFile != null && object != null && !prevBlameFile.equals(object)) {
BlobDiffPanel... | Make sure to add only one revision diff panel on a page
@author robin | setObject | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
private void doFilter(AjaxRequestTarget target) {
target.add(reviewProgress);
body.replace(commentContainer = newCommentContainer());
body.replace(navigationContainer = newNavigationContainer());
target.add(body);
target.appendJavaScript("" +
"var $diffs = $('.revision-diff>.body li.diff'); " +
"if ($... | Make sure to add only one revision diff panel on a page
@author robin | doFilter | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected void onInitialize() {
super.onInitialize();
add(new WebMarkupContainer("revisionsIndexing") {
@Override
protected void onInitialize() {
super.onInitialize();
add(new ChangeObserver() {
@Override
public Collection<String> findObservables() {
return getChang... | Make sure to add only one revision diff panel on a page
@author robin | onInitialize | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected void onInitialize() {
super.onInitialize();
add(new ChangeObserver() {
@Override
public Collection<String> findObservables() {
return getChangeObservables();
}
});
setOutputMarkupPlaceholderTag(true);
} | Make sure to add only one revision diff panel on a page
@author robin | onInitialize | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
public Collection<String> findObservables() {
return getChangeObservables();
} | Make sure to add only one revision diff panel on a page
@author robin | findObservables | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
CodeIndexManager indexManager = OneDev.getInstance(CodeIndexManager.class);
ObjectId oldCommit = getOldCommitId();
ObjectId newCommit = getNewCommitId();
boolean oldCommitIndexed = oldCommit.equals(ObjectId.zeroId())
|| indexMa... | Make sure to add only one revision diff panel on a page
@author robin | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected void onInitialize() {
super.onInitialize();
add(new MenuLink("batchedSuggestions") {
@Override
protected void onInitialize() {
super.onInitialize();
add(new Label("count", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
... | Make sure to add only one revision diff panel on a page
@author robin | onInitialize | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected void onInitialize() {
super.onInitialize();
add(new Label("count", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return String.valueOf(pendingSuggestionAppliesModel.getObject().size());
}
}));
} | Make sure to add only one revision diff panel on a page
@author robin | onInitialize | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
public String getObject() {
return String.valueOf(pendingSuggestionAppliesModel.getObject().size());
} | Make sure to add only one revision diff panel on a page
@author robin | getObject | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(getPullRequest() != null
&& SecurityUtils.getAuthUser() != null
&& !pendingSuggestionAppliesModel.getObject().isEmpty());
} | Make sure to add only one revision diff panel on a page
@author robin | onConfigure | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
@Override
protected List<MenuItem> getMenuItems(FloatingPanel dropdown) {
List<MenuItem> menuItems = new ArrayList<>();
menuItems.add(new MenuItem() {
@Override
public String getLabel() {
return _T("Commit");
}
@Override
public WebMarkupContainer newLink(Str... | Make sure to add only one revision diff panel on a page
@author robin | getMenuItems | java | theonedev/onedev | server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/io/onedev/server/web/component/diff/revision/RevisionDiffPanel.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.