Skip to content
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

Add log status at the bottom #734

Merged
merged 9 commits into from
Oct 23, 2018

Conversation

ykazakov
Copy link
Contributor

@ykazakov ykazakov commented Nov 9, 2017

The changes add a log icon at the bottom of Protege window.
This icon can be used to monitor problems (warnings and errors) and quickly open the log.
Previously this has been handled only for errors (an error icon showed at the top) but the user was uninformed about the warnings (unless a log window is already opened). However, warnings are also important. E.g., a reasoner (like ELK) warns when the result is incomplete (see, e.g., #710), which could stay unnoticed.

so long the scroll position is at the very bottom
yellow is not visible well on the light background
so that can be read without scrolling
- log opens by clicking on the log icon
- the icon changes if warning / error appears in log
- the last warning / error is shown in the tooltip
- the icon clears on mouse click (which opens the log)
to make it more clear that an error / warning may be not just one
1. log is displayed in JTextPane not in JList
advantages:
- no custom code for rendering
- rendering is much fast (previously the whole JList layout was
re-calculated every time a message is appended)
- (parts of) messages are now easy to copy / paste

2. Use the native logback PatternLayout to format messages based on a
format string
- it is more flexible and easy to configure
@ykazakov
Copy link
Contributor Author

I now have changed the implementation of the log window to use JTextPane instead of JList. Was there any deep reason to display the log in a list?

including settings of:
- the line wrap
- the character limit
- the log level
- the log pattern
- the foreground colors of messages
@ykazakov
Copy link
Contributor Author

ykazakov commented Sep 7, 2018

@matthewhorridge would you consider merging this pull request before the new release of Protege? It is essential for the new version of ELK.

@matthewhorridge
Copy link
Contributor

@ykazakov sorry for not looking at this sooner. Will take a look asap. I might target this for beta-4 if that's okay.

@ykazakov
Copy link
Contributor Author

beta-4 is ok, just wanted to be sure it is a part of the next Protege (non-beta) release

@matthewhorridge
Copy link
Contributor

Excellent job with this @ykazakov. Big improvement. The only thing that bothers me is the removal of the View log menu item.

@matthewhorridge matthewhorridge merged commit 6beb3a6 into protegeproject:master Oct 23, 2018
@matthewhorridge
Copy link
Contributor

Merged in. I've added the menu item back so that it's accessible from the menu.

@ykazakov
Copy link
Contributor Author

Thanks for merging! I don't mind putting the menu back. It is probably a good idea as novice users might not notice the log icon.
Note that I also removed the menu for the timestamp as it is now available in the log window itself. I hope that is fine.

@matthewhorridge
Copy link
Contributor

I've put the menu back in. I think the timestamp button is better where it is. Overall, this is a great improvement... very nice UI work!

@ykazakov
Copy link
Contributor Author

I see. Thanks. Just downloaded the new version. Checking... The tooltip for the menu Window > Show Log... is the same as for Timestamp log / console. Probably copy & paste error.

@ykazakov
Copy link
Contributor Author

Other than that looks good. Thanks again for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants