-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#37] Gitlab Connector: Add activity part #299
Conversation
BeckerFrank
commented
Oct 15, 2023
- Separate Comments from other System Activity Events.
- use StyledText to show the Activity Events with color Background
- add Tooltip and open Action to the Design Events
if (states != null) { | ||
for (JsonElement stateElem : states) { | ||
JsonObject state = (JsonObject) stateElem; | ||
Date date = GitlabTaskAttributeMapper.parseDate(state.get("created_at").getAsString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interval?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with new commit.
thread = Thread.currentThread(); | ||
System.out.println( | ||
thread.getName() + " getTaskData start: " + repository.getRepositoryUrl() + " id " + taskId); | ||
startTime = Calendar.getInstance().getTimeInMillis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.currentTimeMillis()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with new commit.
if (clientCache.getIfPresent(new RepositoryKey(repository)) == null) { | ||
getClient(repository); | ||
} | ||
try { | ||
if (TRACE) { | ||
thread = Thread.currentThread(); | ||
startTime = Calendar.getInstance().getTimeInMillis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.currentTimeMillis()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with new commit.
if (added.size() > 0) { | ||
text += "added "; | ||
text += String.join(", ", added); | ||
if (added.size() > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text += added.size() == 1 ? "label" : "labels";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with new commit.
} | ||
} | ||
if (removed.size() > 0) { | ||
if (text.length() == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text += text.length() == 0 ? "removed" : "and removed"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with new commit.
|
||
TaskAttribute styleAttribute = taskAttribute.createAttribute(GitlabCoreActivator.ATTRIBUTE_TYPE_ACTIVITY_STYLE); | ||
String resultText = ""; | ||
Pattern r = Pattern.compile("\\[(.+)\\]\\((.+)\\)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with new commit.
|
||
Label labelIcon = toolkit.createLabel(activityComposite, ""); | ||
|
||
switch (GitlabCoreActivator.ActivityType.valueOf(activityType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undecided if something like:
labelIcon.setImage(
GitlabUiActivator.getDefault().getImageRegistry().get(
switch(GitlabCoreActivator.ActivityType.valueOf(activityType)) {
CALENDAR: yield GitlabUiActivator.GITLAB_CALENDAR_FILE
...
}
)
);
would be easier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with new commit.
...clipse.mylyn.gitlab.core/src/org/eclipse/mylyn/internal/gitlab/core/GitlabActivityStyle.java
Show resolved
Hide resolved
@gnl42: can you please look if I fixed all your comments so that we can merge this? |
@gnl42, @wimjongman , @ruspl-afed: can I continue with the merge or should I wait for a review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Frank.