Skip to content

Latest commit

 

History

History
executable file
·
72 lines (57 loc) · 5.79 KB

malabar-cheatsheet.org

File metadata and controls

executable file
·
72 lines (57 loc) · 5.79 KB

malabar-mode cheat sheet

Abbrevs

AbbrevExpansionAbbrevExpansion
pupublicmainCreate a main method
priprivate#Test@Test template
proprotectedsysoutSystem.out.printf(“_%n”);
ststatic
vovoid
ababstract
boboolean
clclass
implimplements
extextends
papackage
rereturn

Building

BindingFunctionDescription
C-c C-v C-cmalabar-http-compile-fileCompile the file in the current buffer
C-c C-v pmalabar-package-projectRun ‘mvn package’
C-c C-v C-bmalabar-install-projectRun ‘mvn install’
C-c C-v M-tmalabar-run-all-testsRun ‘mvn test’

Class Inspection

BindingFunctionDescription
C-c C-v *malabar-fully-qualified-class-name-kill-ring-saveCopy the binary class name current buffer to the kill ring
C-c C-v wmalabar-whichCopy the location of the binary class name to the kill ring

Navigation

BindingFunctionDescription
C-M-fforward-sexpMove to next interesting thing
C-M-bbackward-sexpMove to previous interesting thing
C-c , msemantic-complete-jump-local-membersJump to a method, variable or class. Use space to cycle between methods
C-c , Jsemantic-complete-jumpJump to a method, variable or class. Use space to cycle between methods
c-c , ,semantic-force-refreshRefresh the navigation tags
c-c , nsenator-next-tagNavigate to the next semantic tags
c-c , psenator-previous-tagNavigate to the previous semantic tags
C-c C-v C-ymalabar-jump-to-thingJump to the definition of the thing at point
C-x C-SPACEpop-global-markUse after malabar-jump-to-thing to pop back to previous point
C-c C-v C-pmalabar-visit-project-fileOpen the project file for this buffer, ei nearest pom.xml

Code Generation

BindingFunctionDescription
C-c C-v C-emalabar-extend-classPrompts for a class, adds stub implementations of all that class’s abstract methods and accessible constructors and inserts the appropriate extends clause.
C-c C-v C-imalabar-implement-interfacePrompts for an interface, adds stub implementations of all that interface’s methods and adds the interface to the class’s implements clause.
C-c C-v C-gmalabar-insert-getsetInsert a getter/setter for a field, adding the field if needed
C-c C-v C-.semantic-ia-complete-symbolComplete the current symbol
C-c C-v .semantic-ia-complete-symbol-menuComplete the current symbol with menu
malabar-delegate-interfaceSimilar to malabar-implement-interface and creates a delegate field
malabar-update-packageAdd or update the package statement to match the current directory

Developing malabar-mode

Debug logging

Turn on debug logging with ‘malabar-project-logging-debug’ Turn off debug logging with ‘malabar-project-logging-info’