#Can't rename package on project [Intellij]

17 messages · Page 1 of 1 (latest)

snow relic
#

I've been working on a java project for school, I don't believe the software is that limiting to a point where I have to recreate the whole project because I can't change the package name.

Essentially: my package name is 'here.London.calls'.
I have a test file that scans through 'here.london.calls'.

I've tried using refractor, but nothing seems to change, when I access the problem in the controllers and other files it gives me two options. One to convert it into the capital to the current package (NOT what i want) or move it to the test folder.

Would appreciate help or advice. Thanks in advance.

wintry rivetBOT
#

This post has been reserved for your question.

Hey @snow relic! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

delicate flax
#

what's the actual error ? Normally intelliJ says something along the lines of "couldn't refactor"

snow relic
#

In brief, here is what happens.

Change the letter to lowercase
The files change to capital.

I could probably make a short video to showcase this.

delicate flax
#

a screenshot of your project structure might help.

snow relic
delicate flax
snow relic
#

I need the package to be lowercase 'leicester' instead of 'Leicester'.

delicate flax
#

now the second part.

The files change to capital
Your files start with a capital letter. What changes to capital ?

snow relic
#

Alright, so I go highlight the package, go onto 'rename', then change it to lowercase. Once you press refractor. The package name in the classes change to the upper case version of it

delicate flax
#

alright if refactor doesn't work rename the folder manually

#

and fix the resulting import errors/ package declaration errors

snow relic
#

Yeah thanks that works, I just gotta figure out a way to push that onto github since it doesnt recognise the change for some reason

wintry rivetBOT