Skip to content

[NewTypeWizardPage] Add support for multiple type creation (#1251)#2407

Open
alexcoover wants to merge 1 commit intoeclipse-jdt:masterfrom
alexcoover:master
Open

[NewTypeWizardPage] Add support for multiple type creation (#1251)#2407
alexcoover wants to merge 1 commit intoeclipse-jdt:masterfrom
alexcoover:master

Conversation

@alexcoover
Copy link

@alexcoover alexcoover commented Aug 4, 2025

What it does

Adds support for creating multiple types at once through the New Type dialog (#1251).

Multiple type names can be entered, separated by semicolons (with or without spaces).

Only the first file is opened in the editor.

Duplicate names are ignored.

How to test

Open the dialog for creating a new class, enum, or other types.

In the type name field, enter multiple names separated by semicolons.

Closes #1251

@iloveeclipse
Copy link
Member

  • Please squash 34 commits to one
  • Rebase this ome on master
  • Never do merge commits again
  • Provide appropriate commit message

@alexcoover
Copy link
Author

Is there anything else I need to do? @iloveeclipse

@alexcoover
Copy link
Author

@noopur2507 or @jarthana Does anyone have time to check on this? Sorry for repeat pinging, I'm doing this for school credit.

@alexcoover
Copy link
Author

@iloveeclipse reminder when you get some time

@iloveeclipse
Copy link
Member

Please resolve conflicts first.
Note, I'm not going to review the functionality because I'm not interested in that feature. So you will need someone else for review.

@alexcoover
Copy link
Author

@jarthana @ktatavarthi @mateusz-matela @noopur2507 @SarikaSinha @sravanlakkimsetti @vik-chand Does anyone have interest in reviewing this feature?

@danthe1st
Copy link
Contributor

danthe1st commented Sep 15, 2025

I'm not a committer but if you start pinging others to review a PR, it might be a good idea to get rid of the merge commit first. If you want to update your branch with the latest changes from master, you can do so by rebasing your PR.

@alexcoover alexcoover force-pushed the master branch 5 times, most recently from 596f7ea to cceffcf Compare September 18, 2025 15:18
…lipse-jdt#1251)

Adds support for creating multiple types with semicolon-separated values,
with or without spaces. Only the first file is opened in the editor and
duplicate names are ignored.

How to test:
- Open the dialog for creating a new class, enum, etc.
- Enter multiple names separated by semicolons in the type name field.

Closes eclipse-jdt#1251
@jjohnstn
Copy link
Contributor

Do you have any real-life scenarios for where you wanted to create a set of empty classes all with the same super-class, interface and for that scenario, why would you not want to open the editor for each? I can think of perhaps creating a set of test classes based on the same class, but they still need to edited to be useful so not opening them in the editor doesn't make much sense to me, but I'm willing to listen. Yes, one can open each one by double-clicking in the package.

Using this patch, I have a set of usability comments. Adding a space after a semi-colon causes an error message, even though spaces are ignored (complains that there is an invalid class name). There should be no ignoring of same class names. This should be flagged (a user may think they are creating a different name and mistyped it). The dialog label Name: needs to be changed to Name[s]: or possibly Names:, but I prefer the first choice. Same with the dialog title (Create one or more Java classes). The dialog help needs to be updated to state how the dialog field can be filled in. Also not sure I like the use of semi-colon over comma for separator, but others are free to chime in.

Trying to create multiple classes that super-class a sealed class (I specified each class be made final) causes an exception. It is possible other complex scenarios that require changing the super-class will fail similarly.

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.

Consider to add support to create multiple types at once through the Dialog Window

4 participants