Tips and Tricks - Development with PDS OE

Posted by DivyaTheja on 24-Feb-2015 08:09

With the hundreds of preferences and options available in PDS OE, there will always be a time when we are not sure of some of the options or how best to use them. Last year, when we gave a session in Exchange on PDS OE tips and tricks, there were requests from customers to post these tips in communities and also any other tips that were not covered in the session.

 So here goes the first list of tips and tricks and we are expecting to post a few of these every few months. Please do post your comments/suggestions and also any other related tips/tricks that you use in your daily work (will surely be many). Note that these are a combination of options provided by PDS OE as well as Eclipse.

Shortcuts – Hundreds of shortcuts, one master shortcut to list them all                       

There are shortcuts available for each and every useful action in PDS OE. We often find it hard to recollect a specific shortcut. To make this easy, we have a master shortcut key “Ctrl+Shift+L” which will list all the available shortcuts in PDS OE. This list not only shows PDS OE shortcuts, but also shows all Eclipse shortcuts. Exploring this list will help us in finding many useful shortcuts.

Link view with Editor – Easy option to navigate to multiple files in Editor

Often during development, we open many files in the Editor and at some point it is hard to keep track of related files in Project Explorer. When “Link with editor option” is enabled, the file we are working on will be visible and highlighted in Project Explorer. This option is available in Project Explorer view menu and also in any navigation view.

ABL Scratchpad – A place to test our ABL code, a scratchpad as the name indicates

Many a times, we experiment with different logic and syntax during development. What was missing in PDS OE is a place where we can do this without actually creating a file. Well if we have 11.2 in our machine, we now have access to Scratchpad view where we can write our sample code, compile and run the code without actually creating a file. Once done, we have the option to save the ABL code snippet for future use or just throw away. What is more interesting is that we can run the code by attaching an existing AVM. ABL Scratchpad is provided as a view in PDS OE, which can be opened from Windows->Show View menu. Most of the Editor functionality is available in Scratchpad.

Quick Access Quick way to find anything

Imagine we want to access a specific preference or open a specific wizard or a view. Instead of doing Window -> Preferences -> Progress OpenEdge -> Editor -> Build, we can just type build and the options will be presented to us. This is same if we want to open a view or any other UI element, just type in Quick access text field and we will get it. Starting 11.4, we have a Quick Access text field in PDS OE Toolbar and for prior releases, we can access this search bar from Navigation menu.

Bookmarks – Access important places in the code anytime

When we are working on code, we often run into a nice piece of code or logic which we want to remember for future use or say we are searching for something specific (like calling a certain service) and we found it and want to remember this. Bookmarks is used exactly for this purpose, to keep track of important places in our code and to get back to this code whenever we want to. These are similar to the bookmarks that we add in our browser. To add a bookmark, just right click on the Editor’s marker bar  (a small bar that appears on the left side of the Editor) and select “Add Bookmark” option. After this, whenever we double click a bookmark in Bookmarks view, the file will be opened and we will be taken to that particular code section.

Refresh on access – Automatic refresh of resources to keep them in sync

Have you ever encountered a message saying “Resource out of sync” in your development environment wherein you need to manually refresh the file and then reopen the file? Every time, when a file content gets changed externally, we will be asked to refresh the file explicitly. Starting 11.2, an option was introduced to make this refresh happen automatically when we access the file. So if we are seeing “Resource out of sync” message often, we might consider turning ON this option. This option is available in Preferences -> General -> Workspace -> Refresh on Access.

Quick Outline View – Another variant of Outline view, an inline view within the Editor

Usually, while writing code in the Editor, we want to make use of whole space in PDS OE by maximizing ABL Editor. When ABL editor is in maximized mode, no views will be visible. In such cases, navigating through code sections will be difficult since Outline view is not visible. Instead of maximizing and minimizing the Editor, we can use Quick Outline View which shows up inline in Editor and lists all code sections, ABL elements and also pre-processors and its evaluated values. This is available by pressing Ctrl+O. When we click on any ABL element in the view, it will directly take us to that particular code section in the file. Otherwise, a simple ESC will make it disappear.

Working Sets Convenience of working with smaller set of files in large/different projects

Sometimes, we need to work with only a small subset of files, a few files from different projects in the workspace or few set of files from a large project. In this case, we can create a working set which acts as a group and  we will then have the option to only compile this set and all other views can be filtered to show only elements corresponding to the working set. Say, in Problem’s view, we can filter errors corresponding to that particular working set and when build automatically is triggered only that particular set of files will be compiled. Working Sets can be created from Select Working Set dialog available by selecting view menu in Project Explorer.

Formatting and keeping the code clean, as you type or at one go – Increase your productivity many folds

Readability is one of the most important aspect. Keeping our code clean is important as writing new code. PDS OE provides options which helps in formatting and keeping the code clean and organized while writing the code. There are several options available under Editor section in Preferences which helps in casing, auto formatting and expanding the keywords. Each developer preferences may vary and so there were many options provided here. Choosing the right options will help in keeping our code clean and well organized.

 

That’s all for now.

Hope to hear from you.

DivyaTheja

All Replies

Posted by James Palmer on 24-Feb-2015 08:20

I regularly refer back to this Presentation from [mention:6e3b17cb0ff148039a2aabb4c7834ce4:e9ed411860ed4f2ba0265705b8793d05] at the EMEA PUG in 2012. It's a little outdated, but still has some very helpful hints and tips.

www.dropbox.com/.../emea_pug_challenge_2012_customising_openedge_architect.pdf

Posted by Torben on 26-Feb-2015 02:57

We are currently using OE Architect on 10.2B

But we plan to shift to PDS OD 11.5 within the next few weeks.

One of the things we struggle with is to find out which of the directories / files that is created for OE Projects should be put under management of SCM and which should be ignored when more developers need to work on same project (And possible have different local configurations)

Regards,

Torben

Posted by asthomas on 26-Feb-2015 03:11

Hi Torben,

Depending on how your team works, you could look into using Roundtable and their plugin for Eclipse for this.

Roundtable uses a central repository and centralized codebase (workspaces) to work with for everyone on the team.

When you create a project for a workspace, a small lightweight OpenEdge project is created with the necessary database connections and propath - all inherited from the central RTB repository.

The project is local to your eclipse installation and only contains files for code you are working on, everything else is picked up from the PROPATH. There is no need to worry about managing the contents of the project, as this is all done by the plug-in and the RTB backend - where the files you need to have under SCM are centrally managed.

HTH

Posted by Matt Baker on 26-Feb-2015 07:50

 
The general rule is “all of them”.  This includes any .settings, .dbconnections, .propath or other dot (.)  files as they are part of the project configuration, it also includes any files related to building your project such as ant scripts like build.xml or .properties files.  Also includes any launch config files and .ini files needed by the developers.
 
Allow the developers to hijack or make local checkouts so they can customize them locally (but not checkin their changes).
 
There are a few exceptions.
 

1.       Don’t check your database data files into SCM.  Timestamps aren’t perfect with SCM tools and you can’t mix-n-match different versions.  Do check in the source for the database such  .df, .st, .pf and related files.  Checkin the script files necessary to recreate that database.

2.       Don’t check your r-code into SCM.  Use a build tool to generate them as part of your release process so you have a reproducible process, not based on whatever the developer happened to have on their disk in some strange state.

3.       Check in the .properties files needed for any appserver, webspeed, and so-on setups.  Including necessary scripts that call mergeprops to recreate them.

 
 
 
[collapse]
From: Torben [mailto:bounce-tjc@community.progress.com]
Sent: Thursday, February 26, 2015 3:58 AM
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Tips and Tricks - Development with PDS OE
 
Reply by Torben

We are currently using OE Architect on 10.2B

But we plan to shift to PDS OD 11.5 within the next few weeks.

One of the things we struggle with is to find out which of the directories / files that is created for OE Projects should be put under management of SCM and which should be ignored when more developers need to work on same project (And possible have different local configurations)

Regards,

Torben

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Torben on 27-Feb-2015 05:44

Seems like I'm not precise enough in my concerns.

With the project facets we want enabled, "AppServer,GUI for .NET,OpenEdge,Progress Adapters,REST", we get a lot of stuff generated.

Which part of this generated stuff should be put under source control and which part should be allowed to be generated again on each client when configuring the same OpenEdge project. (Possibly on another OE Version)

Also it seems like some of the generated stuff are OpenEdge version dependent! (And we typically have deployed to customer on a different OpenEdge version from the OpenEdge version we use for next release of our application.

With our current approach it is only stuff we edit manually that is under control of SCM. This enables us to check out any project developed with any OpenEdge version to DevStudio on any other OpenEdge version without the files under control of SCM will be automatic modified.

New project with no source yet looks like this in Dev Studio:

And when looking on Windows Explore on same project it is even more confusing!

Regards,

Torben

Posted by cverbiest on 06-Mar-2015 07:34

Usefull list, some remarks based on my experience

The most useful short-cut (after ctrl-shift-L) : ctrl-shift-R
Open resource, allows you to search in all open projects on resource name. You can use wildcards and  if your resource name is UpperCamelCased you can search using the capital letters only : e.g. EH will show ErrorHelper.cls

Build tip : http://geek-and-poke.com/geekandpoke/2014/11/29/developers-madness

Link view with Editor – Easy option to navigate to multiple files in Editor

should be avoided as it can cause serious performance degradation , use alt-shift-w instead to link the Project explorer when you need it instead of having it switch all the time.

Formatting and keeping the code clean, as you type or at one go – Increase your productivity many folds

  1. auto correct case during  save can cause serious ( 2 minutes) delay during save. correct casing from the menu and save separate does not have this issue (see bug OE00241262), not sure if it's fixed, I don't use that setting any more
  2. correct indentation is not useful as it cannot be configured to match coding conventions , e.g. the way it indents "then"  , our convention  has "then do:"  on one line and "else if "/ "else do:"  with the same indent.

Posted by DivyaTheja on 09-Mar-2015 06:59

@cverbiest,

Thanks for the tips and disclaimers in using these tips. About the delay while doing auto correct on save operation, there were many performance improvements done for 11.3.2 and 11.4 releases. I hope this delay problem has been fixed in these releases.

-DivyaTheja

Posted by Toni Perätalo on 09-Mar-2015 08:08

[quote user="cverbiest"]

Link view with Editor – Easy option to navigate to multiple files in Editor 

should be avoided as it can cause serious performance degradation , use alt-shift-w instead to link the Project explorer when you need it instead of having it switch all the time.

[/quote]

Thank you for the tip! I need to try this immediately. (We usually have this "link with editor" turned on).  Everything that help us to improve the performance is very welcomed :)

Posted by Toni Perätalo on 09-Mar-2015 08:15

Also thank you for all the other tips too!

My tips are:

alt+shift+A : block select (since 11.2 ?)

Using Linked folders to add folders/files into project that cannot (or not needed to) be directly under the project in file system. (i.e. the code of base version that is not tailored).

This thread is closed