Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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 1141 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles

JGO Wizard


Medals: 67
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« 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)!

-wes

Offline HeroesGraveDev

JGO Kernel


Medals: 269
Projects: 11
Exp: 2 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 wessles

JGO Wizard


Medals: 67
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #2 - Posted 2013-12-23 07:15:46 »

Glad I could help!

But you were using a script for this? That is interesting, integrating your own bash scripts into it. Probably will google around.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SHC
« Reply #3 - Posted 2013-12-23 14:41:50 »

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

Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


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

I disable all the template stuff and use libgdx's FileProcessor, eg:
https://github.com/libgdx/libgdx/blob/master/extensions/gdx-tools/src/com/badlogic/gdx/tools/headers/HeaderFixer.java

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (38 views)
2014-10-17 03:59:02

Norakomi (29 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (56 views)
2014-10-14 00:39:48

TehJavaDev (55 views)
2014-10-14 00:35:47

TehJavaDev (46 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!