• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Arranging and rearranging source folders, packages and classes.  RSS feed

 
Ranch Hand
Posts: 32
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done 5 separate tutorials on Spring Aspect Orientated Programming and i want to upload them to GitHub for safekeeping.

At the moment, all 5 tutorials are in separate Java projects in Eclipse and I want to move them to 1 project, split into 5 different source folders. When I drag and drop source folders between projects, I get all sorts of error

Here is my hierarchy at the moment, and on the right is what I want to achieve (with a little help from MS paint) :



The problems I am having are the system sees two packages called App, both with a main method so this flags an error. I dont have this problem with other projects with this set up. Also when i move packages around, sometimes they move cleanly, sometimes they copy and sometimes they refactor the package name.

I have refactored the package names in the first tutorial but i havenr changed the second or third yet. How can this be done ?
 
Rancher
Posts: 485
11
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you try to move a package inside the same project, it will refactor.
If you move a package from on project to an other it will copy.
A cleaner solution is to create one main project and import all the other projects as seperate modules.
By the way, I also think this is more a question for the Ide forum
 
Kevin Mckeon
Ranch Hand
Posts: 32
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Daniel Demesmaecker wrote:When you try to move a package inside the same project, it will refactor.
If you move a package from on project to an other it will copy.
A cleaner solution is to create one main project and import all the other projects as seperate modules.
By the way, I also think this is more a question for the Ide forum



Thanks ! How would I go about importing all the other projects as separate modules ?

Ill have a look in the Ide forum next time - thought this problem was java related
 
Daniel Demesmaecker
Rancher
Posts: 485
11
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's bin a while since I've used eclipse, in intelij you would to the left top corner of your screen click on file, then new and then module from excisting source, I could imagine in eclipse it's something simulor.
Here's a link on how to do that
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!