Reflection in OpenEdge ABL / Progress 4GL - progress-4gl

I am not able to find anything on reflection in OpenEdge ABL and how to do it. Is it even possible?

It is possible. There are not as many possibilities in OpenEdge as in languagaes like Java or C#, but since version 11 it has basic functionality.
To use reflection look at Progress.Lang.Object which has a method GetClass() that returns an instance of Progress.Lang.Class.
These are the members of Progress.Lang.Class from the OpenEdge Help (Version 11.1, should be the same for all 11.x versions):
In earlier versions of OpenEdge the reflection capabilities were even worse. But it was possible to invoke methods and create instances dynamically.
You should also have a look at the DYNAMIC-NEW statement and the DYNAMIC-INVOKE function.

It hasn't been implemented yet.

And don't forget the GET-SIGNATURE() method and the INTERNAL-ENTRIES attribute.

I was looking for Reflection in OpenEdge ABL in 2021 and I found that there are more possibilities now (I'm using OE 11.6). I wasn't able to find extensive documentation but here is a start: https://docs.progress.com/bundle/openedge-oo-abl-develop-applications/page/Reflection.html
When using Progress Developer Studio you will able to see the possibilities when using auto-complete (Ctrl + Space).

Related

Eclipse Source Editor: Some items are Shown as StrikeThrough. How Come? [duplicate]

While I'm making an Android app, Eclipse will strike out some things. More specifically, Gallery. Here is a screen shot:
When I hover my mouse over the warnings, it says The type Gallery is deprecated. I don't know what Deprecated means, but I do know that it's a Java term. Any help would be appreciated. Thanks!
(From the question before editing: The term is deprecated, not depreciated. It's a common typo, but worth being aware of for searching purposes :)
It's basically a bit like "obsolete" - you're encouraged not to use classes or methods which are deprecated. Typically the documentation will explain why you're not meant to use them, and give you a better alternative. The deprecated version is only present for backward compatibility, usually.
It's worth taking this seriously - a lot of the time if you're using a deprecated API, you're coming at something from a fundamentally flawed approach. Date is the clearest example of this, where the Java 1.0 API was almost entirely deprecated in 1.1, when Calendar was introduced. Using the deprecated methods in Date is a sure way of storing up problems for yourself.
See the Oracle "How and when to deprecate APIs" page for more information.
Deprecated means it used to support older SDK, but not anymore. Thats why you get the warning.
It is just a warning most of the times it works, but you most be careful because it could cause problem with newer versions.
Deprecated isn't a Java term. It is used in many other things but a lot in programming. It simply means that it is no longer supported...normally replaced with something else. The Android Docs will help you adapt it to what you need depending on what you're doing

Is there a way to automatically create doc for classes and Methods in OpenEdge Developer Studio?

OpenEdge Developer Studio is built on Eclipse where usually the shortcut Ctrl+Alt+J can be used to create JavaDoc for classes and methods.
For Progress however I am unable to figure out how this should work.
Could someone help me out here?
To create an html documentation (like http://help.consultingwerkcloud.com/smartcomponent_library/release/) use this here:
https://github.com/Riverside-Software/pct/wiki/ClassDocumentation
https://github.com/Riverside-Software/pct/wiki/HtmlDocumentation
For documentation comments in PDSOE, I'd suggest you have a look at:
https://www.hh-berlin.de/oedt/features/editor
It's going to be commercial. I'm beta-testing it since a while. And it's working really, really nice.

Scala Help needed - Code completion

I am working on writing an IDE for Scala and need some help. I would like to implement coding assistance so that I could present a list of options when a user presses a period (".") or a space (" "). e.g. if projects is a List, as soon as user types "projects." or "projects ", I would like to show all methods of scala.List that he could use (regular IDE stuff). I know that scala.tools.nsc.interactive package provides this capability, but I am unable to figure out how to do it. Besides, it seems that the interactive package would use REPL and would be slow for this purpose. Is that a fair assumption, and if yes, are there any alternatives?
Also, is there a way I could get a call reference tree for a literal/ method (where all is the method referred to in a code base) ?
Thanks and Best regards
Aishwarya
Well, your best bet is going through the same set of links I provided in answer to this question, even though the questions are different.
Yes, the presentation compiler under scala.tools.nsc.interactive is where the reusable functionality would be.
The presentation compiler is used by Eclipse and ENSIME. May be ENSIME itself which in addition to providing emacs support also provides a server as a backend for an editor would be a good avenue.
The presentation compiler is not slow. It was designed from the ground up to provide good performance for Eclipse and it has largely delivered on this goal.
For some of the presentation compiler capabilities, see scala.tools.nsc.interactive.CompilerControl.
For another project using ENSIME, look at Daniel Spiewak's plugin for jEdit.

Is it possible to make Visual Studio C++ 2008 check for errors as you type like Eclipse?

To be more precise, when I used eclipse for java, every time I typed it would check for errors. For example, if I typed a line and forgot a semi-colon, eclipse underlined the area in red and gave me an error, same with misspellings, variable names that have not been defined, etc, etc, etc.
I'm now using Visual Studio 2008 (as the teacher requires it for C++) and I was wondering if there is a way to have it do the same as eclipse does? This feature is really handy and cuts my coding time in nearly a third as I don't have to backtrack near as much.
Thanks in advance for the heads up!
PS: Sorry if it's not called "auto-compile", was the only descriptive term I could think of that made a remote amount of sense!
No, there is not support for full background compilation, but it will try to check your syntax for you, although it's not great at it. Visual Studio 2010 does a better job at catching errors before compile time, but it's not exactly something to rely on. C++ is a much, much more complex language than Java...
Visual Assist X has such a feature. Unfortunately it's not cheap, and doesn't work with Express editions...
You can use the ReSharper plug-in to do it (and ReSharper offers a -lot- of other functionality also). It would be great functionality to have out-of-the-box though.
http://www.jetbrains.com/resharper/index.html

How to extend windows explorer functionality?

How would I go about extending the functionality of windows explorer in XP?
Is there some way whereby I could create a "plugin" of some sorts that could hook into explore.exe to add additional folder browsing functionality? What language could I use to achieve this?
This is an expansion of a question I asked here.
There's a great series of tutorials on CodeProject which might help you. C++ is required there.
There is an old O'reilly book called 'Visual Basic Shell Programming' that explains the API's for this in some detail. While taken from a VB6-centric point of view, the API's are all exposed through COM, so they can be used from any language that supports this. This article discusses using the windows shell with .Net and a tool to build an interop assembly.