SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 11/12/2017, 11:12 PM   #1
MadeMan
High-roller
 
MadeMan's Avatar
 
Join Date: Jun 2007
Posts: 3,500
Reputation: 254
Default Eclipse plugin for Pawn 1.1.0

This is Pawn Editor plugin for Eclipse IDE.
Eclipse is an integrated development environment (IDE) for Java apps, but also for many other programming languages.
This plugin extends Eclipse for Pawn editing.

Features
  • Syntax highlighting
  • Auto-complete
  • File outline
  • Code templates

Syntax highlighting
Colors can be changed from menu: Window -> Preferences -> Pawn Editor

Auto-complete
Activate with Ctrl + Space (key binding can be changed in Eclipse preferences)
Includes variables, functions, constants, #defines declared in current file and in #included files.
Auto-completions are cached, so the plugin does not have to parse all the include files every time you open Eclipse. This means that if some include files change, you need to delete the completions.txt file in workspace folder: .metadata/.plugins/ee.jb.pawn/

File outline
Shows overview of current file.
Click on outline item to select it in editor.
If Outline view is not visible, you can fix it using the menu: Window -> Show View -> Outline

Code templates
Activate with Ctrl + Space (key binding can be changed in Eclipse preferences)
Includes common Pawn statements like if, else, for, while etc
Templates can be changed from menu: Window -> Preferences -> Pawn Editor -> Templates

Install

Download Eclipse IDE from https://www.eclipse.org/downloads/eclipse-packages/ (I tested with Eclipse Oxygen.1a (4.7.1a) IDE for Java Developers)
Download Pawn Editor plugin JAR file (ZIP is in attached files, contains plugin and Java source code) and put it to dropins folder.
Start Eclipse IDE.
Create new project from main menu: File -> New -> Project... -> General/Project

Pawn compiler

Configure compiler
Select from main menu: Run -> External Tools -> External Tools Configurations...
Add new launch configuration for Program
Name: Pawn compiler
Location: ${project_loc}/pawno/pawncc.exe
Working Directory: ${container_loc}
Arguments: "${resource_loc}" -; -(

Configure auto-refresh (optional)
Select Refresh tab
Check "Refresh resources upon completion"
Select "The folder containing the selected resource"

Press "Apply" and then "Close"

Run compiler
Select the .pwn file you want to compile (or put cursor inside editor)
Select from main menu: Run -> External Tools -> Pawn compiler

Screenshots






Changelog

1.1.0

Added code templates

1.0.0

Initial release


Any feedback (comments, bugs, suggestions etc) is welcome.
Attached Files
File Type: zip eclipse-pawn-plugin-1.1.0.zip (62.6 KB, 32 views)

Last edited by MadeMan; 27/12/2017 at 03:17 PM.
MadeMan is offline   Reply With Quote
Old 11/12/2017, 11:23 PM   #2
Chaser98
Little Clucker
 
Join Date: Nov 2010
Posts: 49
Reputation: 21
Default Re: Eclipse plugin for Pawn

Although I would prefer an IntelliJ plugin, this is the next best thing. You're awesome. Thanks!
Chaser98 is offline   Reply With Quote
Old 12/12/2017, 08:46 PM   #3
cuber
Gangsta
 
cuber's Avatar
 
Join Date: Oct 2016
Posts: 747
Reputation: 121
Default Re: Eclipse plugin for Pawn

Well done!
cuber is offline   Reply With Quote
Old 12/12/2017, 09:17 PM   #4
Xeon™
Banned
 
Join Date: Jul 2017
Location: Earth
Posts: 530
Reputation: 96
Default Re: Eclipse plugin for Pawn

Good job!
Xeon™ is offline   Reply With Quote
Old 13/12/2017, 02:23 AM   #5
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,723
Reputation: 780
Default Re: Eclipse plugin for Pawn

This is great. I like using eclipse, will surely give it a go.
__________________
Gammix is online now   Reply With Quote
Old 27/12/2017, 03:20 PM   #6
MadeMan
High-roller
 
MadeMan's Avatar
 
Join Date: Jun 2007
Posts: 3,500
Reputation: 254
Default Re: Eclipse plugin for Pawn

New version (1.1.0) released, added code templates.
Before installing the new version, delete the completions.txt file in workspace folder: .metadata/.plugins/ee.jb.pawn/
MadeMan is offline   Reply With Quote
Old 24/01/2018, 08:50 AM   #7
yugecin
Big Clucker
 
Join Date: Oct 2009
Location: Belgium
Posts: 83
Reputation: 82
Default Re: Eclipse plugin for Pawn

Impressive, good work. I thought of doing this too (for either eclipse or intellij) but never made time for it and I use vim for pawn anyways.
__________________
robin_be
yugecin is offline   Reply With Quote
Old 24/01/2018, 12:00 PM   #8
iLearner
Gangsta
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 540
Reputation: 113
Default Re: Eclipse plugin for Pawn

Looks good, GJ.
iLearner is offline   Reply With Quote
Old 26/01/2018, 03:22 AM   #9
SeanDenZYR
Big Clucker
 
Join Date: May 2016
Location: Philippines!!
Posts: 135
Reputation: 14
Default Re: Eclipse plugin for Pawn

Quote:
Originally Posted by Chaser98 View Post
Although I would prefer an IntelliJ plugin, this is the next best thing. You're awesome. Thanks!
+1 on that
__________________
SeanDenZYR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tool/Web/Other] Eclipse goes PAWN | Teamsearch MaxBerger Plugin Development 8 12/05/2014 04:06 PM
Pawn > Eclipse? DanRellex General 1 27/09/2013 08:58 PM
PAWN in Eclipse?? Kyle_Olsen Scripting Help 5 12/07/2012 03:49 PM
Plugin vs Pawn script zgintasz Everything and Nothing 10 18/06/2012 05:52 PM
[PAWN] Plugin? Rokzlive Everything and Nothing 2 07/01/2011 08:15 PM


All times are GMT. The time now is 05:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.