Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (843)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Organization with licensing using Eclipse  (Read 3683 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles
« Posted 2013-12-23 04:43:48 »

Coding is a fun experience; You learn something every time! But, sometimes, you may want to share things like source code, and resources, etc! For this you will need licensing. If you are new to licensing, I highly suggest that you check out codinghorror's take on it (if you haven't picked a license, I would suggest GPLv2.0, for its protection for you, and easy use for others). With licensing, you usually have to put a license at the beginning of every single file. Take this file for example. That bunch of lines will take up a lot of space in your file! Luckily, if you are using eclipse, you have a feature for just that!

Start by going to Window -> Preferences. You will want to search for 'Code Templates.' Click on the search result, and click on 'Code' in the middle section. Now press edit, and a window should pop up.

The window that pops up is the code that is done for you when you make a class. Ever notice how in eclipse, you don't have to type out the package declaration, since its already there? That is because of this window. Now that you can edit it, you can add in a javadoc comment with all sorts of goodies like who made it, when was it made, in what package, in what project, what license (important), etc. With the license, I would suggest not putting the license in, but the link to the license.

Not only will this small little tip save you some time, but it will also save space to not have the full license, but the link to it. Also, in discovery of that menu, you can now edit all of the things you want that will automatically appear on creation, whether it be javadoc for every method, or some extras for getters and settters.

I hope you have benifited! Criticism is much appreciated (especially if I screwed up with my law education)!

Offline HeroesGraveDev

JGO Kernel

Medals: 382
Projects: 11
Exp: 4 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

« Reply #1 - Posted 2013-12-23 07:09:40 »

Yay! Now I don't have to use my special license-header script!

TBH, I should have just done this in the first place, but the license-header script was more fun.

Offline SHC
« Reply #2 - Posted 2013-12-23 14:41:50 »

Good tutorial. Thanks for sharing. Maybe it's more nice if it had larger screenshots.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

« JGO Bitwise Duke »

Medals: 167
Projects: 4
Exp: 14 years

Esoteric Software

« Reply #3 - Posted 2013-12-23 15:07:34 »

I disable all the template stuff and use libgdx's FileProcessor, eg:

Pages: [1]
  ignore  |  Print  

EgonOlsen (42 views)
2018-06-10 19:43:48

EgonOlsen (22 views)
2018-06-10 19:43:44

EgonOlsen (43 views)
2018-06-10 19:43:20

DesertCoockie (197 views)
2018-05-13 18:23:11

nelsongames (124 views)
2018-04-24 18:15:36

nelsongames (123 views)
2018-04-24 18:14:32

ivj94 (863 views)
2018-03-24 14:47:39

ivj94 (124 views)
2018-03-24 14:46:31

ivj94 (768 views)
2018-03-24 14:43:53

Solater (140 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!