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

Show printed messages in the console view of the LF IDE #370

Merged
merged 1 commit into from
Jun 14, 2021
Merged

Conversation

cmnrd
Copy link
Collaborator

@cmnrd cmnrd commented Jun 14, 2021

As the title says, this change redirects all messages printed via println() to the internal Console view of our IDE. Effectively, this makes all messages appear in the internal view of our IDE and no longer in the host IDE if running from Eclipse (or on the command line when running the product).

I am not sure where the best place is to put this code. The LFUiModule class was the best place I could find, and it seems to work well. We probably should also consider introducing some logging mechanism that lets us distinguish between messages we want to show the user in the Command view and other messages that are only interesting to developers.

@cmnrd cmnrd added the enhancement Enhancement of existing feature label Jun 14, 2021
@cmnrd cmnrd added this to the 0.1.0 Beta milestone Jun 14, 2021
@cmnrd cmnrd requested a review from lhstrh June 14, 2021 09:38
@edwardalee
Copy link
Collaborator

Cool! Next step would be to make it simple to run the generated code and view its output on this console.

@cmnrd
Copy link
Collaborator Author

cmnrd commented Jun 14, 2021

Definitely! I am not sure how we can invoke the binary, but for printing its output I think it is even better to create a new console. Consoles are named and you can switch between them in the IDE. Currently, there is only the one "LF output", but we could add new consoles for each binary we run to make the output distinct from our LF output.

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Yes, I think LFUiModule is a good place to put it. That said, given that this is a generated file, I'm surprised that it's still an Xtend file; it should be a Java file...

@lhstrh lhstrh merged commit 6e0739c into master Jun 14, 2021
@cmnrd cmnrd deleted the console branch August 20, 2021 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants