• Stars
    star
    113
  • Rank 310,115 (Top 7 %)
  • Language
    Java
  • Created over 12 years ago
  • Updated almost 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Java completions for Sublime Text 2

Plugin discontinued

If something is broken, submit a pull request and we'll consider merging it.

Eventually it will be replaced by https://github.com/quarnster/completion. If you'd like to see that project move along quicker, submit a pull request and/or participate in its discussions.

Description

A plugin that provides a Java code completion view inside of Sublime Text 2. It also provides import insertion/completion and goto source/javadocs.

Known issues and feature requests

Please go here to see the currently known issues and feature request, or to file a new.

Prerequisites

  1. You need to have java installed on your system and the java binary in your path

Installation

  • The easiest way to install SublimeJava is via the excellent Package Control Plugin
    • See http://wbond.net/sublime_packages/package_control#Installation
      • Once package control has been installed, bring up the command palette (cmd+shift+P or ctrl+shift+P)
      • Type Install and select "Package Control: Install Package"
      • Select SublimeJava from the list. Package Control will keep it automatically updated for you
  • If you want to manually install it using git instead:
    • Go to your packages directory and type:
    • To update to the latest commit, use this command in the SublimeJava directory:
      • git pull && git submodule foreach --recursive git pull origin master
    • Once you have the sources pulled, you'll need to compile the SublimeJava java source file:
      • javac SublimeJava.java
  • You most likely want to configure the "sublimejava_classpath" setting to your own, issue 23 details how this is done.
  • Also, you would mostly likely want to configure the "sublimejava_srcpath" and "sublimejava_docpath" to use source and doc search. NOTE: At present, this does not handle jar files.

Optional Key Bindings

You might want to add some keybindings to your user key bindings like the following:

    {"keys": ["ctrl+j", "d"], "command": "open_java_doc", "args": {"under_cursor": true }},
    {"keys": ["ctrl+j", "s"], "command": "open_java_source", "args": {"under_cursor": true }},
    {"keys": ["ctrl+j", "i"], "command": "import_java_class"},

Usage

Once installed it'll try to provide reasonable completion suggestions when you trigger autocompletion. Please note that it accomplishes this with the use of reflection so it can only complete compiled classes that are in your classpath.

To import a class, type the class name wherever it is that you will be using it. Then, with the cursor on class name, run the "Java: Import Class Under Cursor" command. If the class is found in the classpath, the possible imports will be presented to you in a quicklist. You can then choose the correct match for your import, and it will be inserted after the final import statement, or, if no imports are found, after the package declaration. If none of the presented classes are the class that you wanted to import, check your "sublime_classpath" setting.

To go to source or javadocs, you may either look for the source under the cursor (using the "Java: Open Source/Javadoc Under Cursor" command, or simply open up a quicklist and filter through all sources ("Java: Open Source/Javadoc" command).

License

This plugin is using the zlib license

Copyright (c) 2012 Fredrik Ehnbom

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

   1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.

   2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.

   3. This notice may not be removed or altered from any source
   distribution.

More Repositories

1

completion

This project aims to implement an editor and language agnostic backend
Go
670
star
2

SublimeClang

C/C++/ObjC/ObjC++ autocompletions and code navigation
C++
650
star
3

SublimeGDB

GDB integration with Sublime Text 2
Python
331
star
4

boxeebox-xbmc

Aiming to get xbmc up and running on the boxee box
C++
118
star
5

ADBView

Android Debug Bridge Logcat view plugin for Sublime Text 2
Python
87
star
6

CompleteSharp

C# completion for SublimeText 2
C#
81
star
7

asaot

AngelScript Ahead Of Time compiler
C
24
star
8

PlatformSettings

A Sublime Text 2 plugin enabling platform specific settings
Python
13
star
9

util

Various Go utility code
Go
10
star
10

parser

Self-generating Parser expression grammar (PEG) parser + tools
Go
9
star
11

nanojit

C++
8
star
12

ff6

Final Fantasy VI mobile save game mod
Go
8
star
13

TTF

C++
8
star
14

emu-ex-plus-alpha

C
8
star
15

boll

A Sega Dreamcast Game I made for the "dreamon" 2004 competition. Very unfinished
C++
7
star
16

dcintros

My old Sega Dreamcast 128/256 byte intros (2002-2005)
Assembly
5
star
17

angelscript

Clone of the AngelScript svn repo with my own tweaks applied to it
C++
5
star
18

vmusnake

A snake game for the Dreamcast VMU. My special project in High School (2001-2002, only partial history available)
Assembly
5
star
19

luftvarg

Sega dreamcast 4k intro (February 2002)
C
4
star
20

SublimeCompletionCommon

Some common code between my various Sublime Text completion plugins
Python
4
star
21

karma

Old vst software synth I wrote 2003-2004
C++
3
star
22

asarmjit

A work in progress AngelScript JIT compiler for ARM. Hasn't been touched since 2009..
C++
3
star
23

libq3d

Q3D - quarns quick and dirty 3d-engine ;). A very old (and not very good) Sega dreamcast 3D engine.
C
2
star
24

Hyena

My bachelor thesis project; A tile-based triangle rasterizer in hardware. (2005)
VHDL
2
star
25

boxeebox-intel-sdk

Un-modified driver sources from the boxeebox intel-sdk + CMakelists.txt to build everything
C
2
star
26

asgenbindings

A python script to generate bindings for AngelScript with the help of libclang
C
2
star
27

parsehelp

Provides parsing help for C/C++/Java and similar languages. Used by SublimeClang, SublimeJava and CompleteSharp
Python
2
star
28

yamm

Java
1
star
29

silence

A Java music player (2000-2005)
Java
1
star
30

CGCOnSave

Plugin for SublimeText 2 that runs cgc on shader files after they are saved
Python
1
star
31

freetype-gl

Mirror of http://code.google.com/p/freetype-gl (with proper git tags and branches)
C
1
star