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

Create Class could respect constructor args #10337

Closed
sethladd opened this issue Apr 30, 2013 · 12 comments
Closed

Create Class could respect constructor args #10337

sethladd opened this issue Apr 30, 2013 · 12 comments
Assignees
Labels
area-analyzer closed-not-planned Closed as we don't intend to take action on the reported issue P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

Consider this code:

main() {
  Person p = new Person('Bob', 'Smith');
}

Using "create class" quickfix creates this:

class Person {
}

I would have loved to see this:

class Person {
  String arg1;
  String arg2;

  Person(String arg1, String arg2);
}

Or something like:

Person p = new Person();
p.firstName = 'Bob';

and then run Create Class, and get:

class Person {
  String firstName;
}

@clayberg
Copy link

clayberg commented May 1, 2013

Set owner to @scheglov.
Added this to the Later milestone.

@scheglov
Copy link
Contributor

scheglov commented Jun 9, 2013

Removed this from the Later milestone.
Added this to the M6 milestone.

@scheglov
Copy link
Contributor

Removed this from the M6 milestone.
Added this to the M7 milestone.

@scheglov
Copy link
Contributor

Removed this from the M7 milestone.
Added this to the M8 milestone.

@clayberg
Copy link

Removed this from the M8 milestone.
Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@sethladd
Copy link
Contributor Author

Added NotPlanned label.

@stereotype441
Copy link
Member

Removed Area-Editor, Oldschool-Milestone-Later labels.
Added Area-Analyzer, Triaged labels.

@sethladd
Copy link
Contributor Author

So the analyzer is in charge of code generation?


cc @kevmoo.

@scheglov
Copy link
Contributor

Analyzer is now "Analysis Server", which includes Quick Fixes/Assists and refactorings.
So, yes, it is.

@sethladd
Copy link
Contributor Author

OK, added a new label.


Added Analysis-CodeGen label.

@scheglov
Copy link
Contributor

It is possible to do all the code generated, but in two stages:

  1. Create a class declaration.
  2. Create a constructor declaration.

I don't feel like merging these two Quick Fixes.


Attachments:
[Screen Shot 2014-09-29 at 12.35.35 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-10337/comment-12/Screen Shot 2014-09-29 at 12.35.35 PM.png) (43.79 KB)
[Screen Shot 2014-09-29 at 12.35.50 PM.png](https://storage.googleapis.com/google-code-attachments/dart/issue-10337/comment-12/Screen Shot 2014-09-29 at 12.35.50 PM.png) (51.89 KB)


Added NotPlanned label.

@sethladd sethladd added Type-Enhancement P3 A lower priority bug or feature request area-analyzer closed-not-planned Closed as we don't intend to take action on the reported issue labels Sep 29, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer closed-not-planned Closed as we don't intend to take action on the reported issue P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants