Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Can you make templates?
Can you make templates? [message #1858809] Mon, 24 April 2023 07:58 Go to next message
Tim Kangas is currently offline Tim KangasFriend
Messages: 6
Registered: April 2023
Junior Member
Let's say I'm doing Java or Python in Eclipse and I'm making GUI programs. So I type all the code needed to bring up a window to the screen.

Well I may have 40 or more GUI programs I'd like to write, so I'm wondering if Eclipse would be able to save the code that I typed in a template. That way I'm not typing the same code 40 times over.
Re: Can you make templates? [message #1858825 is a reply to message #1858809] Tue, 25 April 2023 05:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32866
Registered: July 2009
Senior Member
There are template languages such as Epsilon, JET, or Xtend you might use to generate something from some inputs (model).

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Can you make templates? [message #1858829 is a reply to message #1858825] Tue, 25 April 2023 13:41 Go to previous message
Kabiru Usman is currently offline Kabiru UsmanFriend
Messages: 41
Registered: April 2023
Member
Hope that I understand what you are searching for. :D You can definitely do that in Eclipse using code templates. Just follow these steps:


  1. Go to Window > Preferences.
  2. Choose Java > Editor > Templates or PyDev > Editor > Templates.
  3. Click New, give your template a name, and paste your GUI code in the "Pattern" field.


Now, when you're in the editor, press Ctrl + Space, start typing the template name, and select it from the list to insert the code.
Hope this helps!
Previous Topic:Can't install Papyrus
Next Topic:The way of working concerning posting topics
Goto Forum:
  


Current Time: Thu Jul 13 03:42:51 GMT 2023

Powered by FUDForum. Page generated in 0.03662 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top