-
Notifications
You must be signed in to change notification settings - Fork 101
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
CreateMainClassAndOpenItInEditor #398
base: master
Are you sure you want to change the base?
Conversation
…ditor on new Haxe project generation
class ${NAME} { | ||
public static function main() { | ||
} | ||
} |
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.
Should be invisible to user, only for project generation
I am not sure if it is a good way to do such stuff, but it is better than nothing, perhaps there are might be project templates, maybe in Basically it creates ready to use project, with proper run configuration, but on first compilation it fails, then after it, it is ok. Also if user would do I don't really understand why it copies |
Sdk sdk = HaxelibSdkUtils.lookupSdk(project); | ||
boolean isHaxeSDK = sdk.getSdkType().equals(HaxeSdkType.getInstance()); | ||
|
||
if (!isHaxeSDK) { |
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.
check which fixes #397
The CI build is failing because of the breaking API changes between 14.0.4 and 14.1.6. (Actually, 14.1.5 introduced the breaking changes.) So we're going to have to use the MethodWrapper class to cover it. The v15 stuff has a better implementation, so we can wait for that (in the next hour or two) before we submit. |
OK, the v15 branch has been merged, so you can use it now. |
@EBatTiVo What if we will do this, only if project has no Haxe modules? |
@as3boyan How about a check box, in the "Create New Class" dialog? Maybe with the title: "Add main support"? Possibly even a secondary check box for "Add debugger support" and include the snippet from the README.md? Of course, they should only be available if the "Kind" field is Class or Enum. |
@as3boyan Also, the same code can be added to a warning dialog from the "Main class" selector on the module settings page. |
I don't know, it seems like good place for it is in project templates, but I don't know how to put it there |
CreateMainClassAndOpenItInEditor