Closed Enigmage closed 3 years ago
@Enigmage - go ahead and send a PR
Is this issue available at the moment? I'd like to work on this.
@paramsiddharth - Go ahead 👍🏻
@ankingcodes Please note that since the filename holds significance in Java classes, we need to decide the class name based on the filename. Also, I have noticed that specifically CodeForces allows any class name for the solution, though "Solution" is preferred by many. To make sure that the classes are compiled and run properly, we need to make sure that the class name is the same as the filename before the .java
extension. That would also mean making changes to codemon.py
too.
One way to avoid the hassle and leaving it to the user to take care of it would be naming the class "Solution" by default and adding a comment asking the user to change the name as required.
@paramsiddharth - I'm not very aware about this point that you've discussed since I normally do competitive coding in C++ or Python. You may make the changes as per your research. In case, any Java programmer faces problems, they may make an issue.
@paramsiddharth - I'm not very aware about this point that you've discussed since I normally do competitive coding in C++ or Python. You may make the changes as per your research. In case, any Java programmer faces problems, they may make an issue.
@ankingcodes Did you look at #77 ? I took into account the points I made in the previous comment and added a sensible template for Java to CodemonMeta.py
. Should I make any changes?
Currently we don't have a proper default template for java. This is the template that gets added to source files during init if the user does not have a custom template in
~/.codemon/
folder.The goal is to have a sensible default template that is capable of taking care of the basic needs of the user during a competitive programming contest without having too much boilerplate.
The template can be added in the
template
string underdefault_java
method of theTemplates
class in theCodemonMeta
module.