× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jim

Here's help text from 5.1.2:
=================================
Completing code with content assist

Content assist is available for both ILE RPG, ILE COBOL, and C++ programs. You can use it along with specialized templates to help you complete your code. ILE COBOL provides Content Assist for all its four divisions - Identification, Environment, Data, and Procedure. ILE COBOL also extends the scope of Content Assist to include support for compiler-directing statements.

To use content assist:

- While in the Remote System Explorer, open a file you want to edit.
- From the Edit menu, select Content Assist or press Ctrl+Space
- Double-click on a possible completion from the list

If you are editing an RPGLE member in the LPEX editor, you can type the partial text for a template alias and press Ctrl+Space to view a list of valid completions. For example, if you type if in ILE COBOL, followed by Ctrl+Space a list of completions appears in the content assist popup. One of the completions is the IF - ELSE - END-IF template. When that template is selected, the actual text will be inserted in the LPEX editor.

Creating a new template

Template support is is available for both ILE RPG, ILE COBOL, and C++ programs. You can use templates to predefine a structured description of coding patterns that reoccur in your source code. The LPEX editor supports the use of templates to fill in commonly used source patterns. For example, if you often use a particular coding pattern, you could avoid typing it each time that you want to use it by starting with a template. Invoking content assist at the point of this pattern in your code gives you a list of possible templates. Selecting a template will insert the code into the LPEX editor.

Restriction: For RPG source, you can only use templates for free-form RPG.

To create a template:

- Select Window and click Preferences.
- Expand Remote Systems > iSeries.
- Select Templates.
- Click New.
- In the new template dialog, type the name of the template, and select a language from the Context drop-down list.
- In the Content field, type the code that you want content assist to insert.
- Click OK twice.


To insert this new template, type the template name in your code, and press Ctrl+Space.

[image here]

The new template name that you created appears in a pop-up window. Double-click on this completion to insert the contents of the template into your code.
================================


And some more from C/C++ help (CDT plugin, I think):
================================

Code templates are stored in templates.xml in the org.eclipse.cdt.ui and org.eclipse.jdt.ui folders.

To create a code template:

- Click Window > Preferences.
- Expand C/C++, and click Code Templates.
- Click New.

- Do the following:
-- In the Name field, enter a template name.
-- Click the Context button and select a template type: C or C++.
-- In the Description field, enter a description for your new code template.
-- In the Pattern field, enter the code for your template.
-- Click Insert Variable to add a variable from the list to the code you have entered in the Pattern box.
- Click OK.


The new code template is now displayed in the list.
================================

Change the references above to the appropriate item under Remote Systems.

Also, it appears that the "Insert Variable" feature is not implemented in the iSeries template editor. Someone (Aaron Bartell?) mentioned that it seemed the $(cursor) variable did not work. It's too bad if these are not available. I found the possible variables in the Java Templates item in Preferences - maybe some will work.

Looks like a lot of experimentation.

HTH and hope it matters in your release.
Vern

At 06:03 PM 9/10/2004, you wrote:
   Thanks Vern, I got this in my inbox.  This is what started me looking at
   Content Assist, and templates.  The tech tip did not go into more detail
   than what I have in my post.  I'm looking for some in depth insight, or
   how others use it to advantage.  I like that it will pull a list of my
   fields for me, but wish that I could jump down the list easier when I
   don't remember the exact name of the field I want.

   Jim

   At 04:33 PM 9/10/2004, you wrote:

     The August 12, 2004 Programming Tips newsletter at
     www.iseriesnetwork.com has a short article on templates in WDSC - you
     need only join at the free associate level to see it.

     HTH
     Vern

     At 05:04 PM 9/10/2004, you wrote:

       Oh Revered Listers;

       I'm trying to get comfortable using the LPEX editor in WDSCi version
       5.1.0.3, and I just came across the Content Assist functions.  I am
       trying to become familiar with that function, and was wondering a
       couple of things.

       1)  When using Ctrl + Space, I get the pop up window with possible
       commands.  How is the best way to navigate thru that list?  I have
       tried typing the first letter of the command I would like to do, like
       EVALUATE, but the list goes away, and leaves me with a letter E typed
       into the source.  I do know that you can type EV and then the Ctrl +
       Space and get just the evaluate permutations.  This works great with
       program reserved words, but not so great with the field list,
       especially when there are 100 or more fields defined in working
       storage.

       2)  I was wanting to edit the templates that are provided so they look
       more like how I code.  I went to Window > Preferences > Remote Systems
       > iSeries > Templates to try and edit the templates, but all I found
       were ILE RPG FREE-FORM context templates.  Is there a way to edit the
       provided templates for ILE COBOL? , or ILE RPG? (I don't even know if
       you would want to edit the RPG templates)

       Are there any other hints, tips or techniques that you would suggest
       for getting the most from this tool?  It seems like it could be such a
       big help, but I want more control!

       Thanks!

       ----------------------------------------------------------

       Jim Essinger
       Senior Programmer/Analyst
       UnLtd / SLFI / IMA
       PO Box 730
       Fruitland, ID 83619

       208-452-4058 Extension 133
       esinger@xxxxxxxx

------------------------------------------------------------
_______________________________________________
This is the Websphere Development Studio Client for iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.