Improve Gerrit change ref rendering (issue-206)
| | |
| | | - Use standard ServletRequestWrapper instead of custom wrapper (issue 224)
|
| | |
|
| | | changes:
|
| | | - Improve Gerrit change ref decoration in the refs panel (issue 206)
|
| | | - Disable Gson's pretty printing which has a huge performance gain
|
| | | - Properly set application/json content-type on api calls
|
| | | - Updated Polish translation
|
| | |
| | |
|
| | | private static final String R_REMOTES = "refs/remotes/";
|
| | |
|
| | | private static final String R_CHANGES = "refs/changes/";
|
| | |
|
| | | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
|
| | | boolean hasFocus, int row, int column) {
|
| | | super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
| | |
| | | } else if (name.startsWith(R_REMOTES)) {
|
| | | name = name.substring(R_REMOTES.length());
|
| | | fg = Color.decode("#6C6CBF");
|
| | | } else if (name.startsWith(R_CHANGES)) {
|
| | | name = name.substring(R_CHANGES.length());
|
| | | fg = Color.decode("#B0E0F0");
|
| | | }
|
| | | setForeground(fg);
|
| | | super.setText(name);
|
| | |
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | private static final String R_CHANGES = "refs/changes/";
|
| | |
|
| | | public RefsPanel(String id, final String repositoryName, RevCommit c,
|
| | | Map<ObjectId, List<RefModel>> refs) {
|
| | | this(id, repositoryName, refs.get(c.getId()));
|
| | |
| | | // local head
|
| | | linkClass = LogPage.class;
|
| | | cssClass = "headRef";
|
| | | } else if (name.startsWith(R_CHANGES)) {
|
| | | // Gerrit change ref
|
| | | name = name.substring(R_CHANGES.length());
|
| | | cssClass = "otherRef";
|
| | | } else if (name.startsWith(Constants.R_REMOTES)) {
|
| | | // remote branch
|
| | | linkClass = LogPage.class;
|