Eclipse auto activation only showing beg, cast etc - eclipse

Running into an odd issue with Eclipse. After installing 2022-12, auto activation only shows the below list. In this particular instance, tOBC is a thread and it should be listing all functions. This happens with any function regardless of package or scope.
One other, probably unrelated issue, was the tasks list was throwing an error with Mylyn and I haven't been able to resolve it. I don't use it but unsure if it's related to this oddity or not.

Related

hot swapped warning without making any changes (Spring tool suite 3.9)

When running my code in debug mode, I keep getting 2 error messages:
Could not delete [path_to]\productiondb.log. May be locked by another process
I don't know what process might be locking it. It comes when I make changes to the code while my Pivotal tc Server is running in debug mode, but it dosent seem to create a lot's of trouble. Sometimes however, I get this warning:
Also due to some changes. I usally just restart the server and move on. This isen't the real problem, the real problem is that I get these messages when I havent doen any changes. Somethimes it accures when I run a certen part of the code, other times i occurs when I open certen codes in sts, however, it doen't seem to stop at the same place twice.
I am suspecting that this has something to do with git. I am using git to change between versions and doing tests. So I am thinking that STS has some of the code in memory from before I changed branche with git, and isen't updating it before I run or open the file with that code. But I am rather new to both sts and git, and can't be certan that it would work that way. If it is, does anyone know how to update sts after I have changed branch? If it is not, does anyone know what might causing it?
If you run an app in debug mode, the Eclipse Debugger tells the application when code gets changed and tries to use the debug API to swap in the new code into the running application. This is especially useful if you debug your code, hit a breakpoint, step through the code, fit the issue, change the code, and press save. At that moment, the Eclipse compiler updates the class file and tells the running JVM to swap in the new code. If that succeeds, the debugger will jump back to the last stack frame and the execution of your app will continue with the beginning of the method that you entered. This allows you to directly continue to debug and step through the updated code without restarting the app.
While this is a great feature of the JVM, it is very limited in terms of what scope of changes to the classes the JVM can deal with while doing this hot-swap. It is usually limited to method implementations. So adding new methods, adding or deleting members of the class, etc, are not supported. As a result, the above screenshot will appear. It means that the JVM wasn't able to hot-swap the changed code and will continue to run with the previously loaded code instead of the changed one.

How to add logging to an existing Eclipse plugin to work in 2019-12?

I'm trying to fix a problem in an Eclipse plugin at https://github.com/davidmichaelkarr/e4macs . The repo is a fork of the original application, which is now abandonware.
I have a couple problems with this, but I'm going to limit the scope of the question, hopefully making it simpler for someone to provide an answer.
The main problem I'm having with the plugin is that some operations (the operation "split-window-vertically" in particular) simply do nothing when I execute them. This didn't used to be the case. In some recent versions of Eclipse, this was working fine. It stopped working about 2019-09.
What I want to do first is add log statements that show it's at least getting to the handler method. I've concluded that I don't know how to add logging to an Eclipse plugin. The existing code for the plugin doesn't do any logging, so I don't have an example to go by. I've searched the net for documentation on how to do this, but all the articles I've found are either incomplete or just don't work.
I know of at least one handler that IS working properly. I added what I thought was the correct logging code to that handler, and it never appeared in the ".metadata/.log" file, so I assume that that was not the correct way to do logging.
I saw a reference to using "Activator.getDefault()", but that posting didn't say what the FQCN is, and all the completion offerings I found didn't have a "getDefault()" method.
Update:
I added something like the following to two classes:
private ILog logger = Platform.getLog(<ContainingClass>.class);
And then in a method in each of these classes, I used logger.info("message");
I ran this in my debug instance and tested the operations in both classes. The log messages appeared.
I then uninstalled the plugin from the main installation, then built the plugin in my RPC instance, then reinstalled the plugin in the main installation, from the local update site defined by the "...Update" project.
I then tested both operations, and I saw nothing in the log.
I may have solved my logging problem at this point, but I'm still having some sort of problem with deployment. I have a feeling that the process I went through to reinstall the changed plugin is not working.
To get an activator with a getDefault() method you must specify that the plugin contributes to the UI when you create it and that you want an Activator to be created. This should create an activator class extending AbstractUIPlugin and with a getDefault() static method.
In any plugin you can always use:
IStatus status = new Status(....);
ILog log = Platform.getLog(getClass());
log.log(status);
to log a status object.
Status has numerous constructors. A simple one just to log a message is:
new Status(IStatus.INFO, "plugin id", "message");
Platform is org.eclipse.core.runtime.Platform
Status is org.eclipse.core.runtime.Status

Process files crash unexpectedly

I am working on a project in Drools6. I have defined a few custom tasks using workitemhandler. When I create a new process file(*.bpmn file) and model it by adding my custom tasks and other inbuilt blocks, everything works fine in the beginning. But, if the complexity of the .bpmn flow diagram increase i.e, I add about 4-5 custom tasks, create sub-processes, add a few gateways etc, the program crashes and I will not be able to open my flow diagram again. It says there is a parse error.
I have tried reinstalling eclipse, but it still gives me the same error. I have not used exception handling in the java class of my custom tasks. Could this be why my program is crashing.
please guys, if anyone has come across a similar issue, let me know how you resolved it.
Thank you
it seems that for some reason your business process is corrupted and it cannot be opened by the editor. Do you have a previous version of your process? Try opening another process.
You can also try the web designer, which is usually more powerful than the eclipse one.
Regards

Eclipse auto refresh (after custom builder) does not discover new files

This is not another of many "how do I have Eclipse auto refresh" questions. My problem is that it does but not entirely.
In a workspace with multiple projects the compilation of one causes source code to be generated in other(s) (that exist purely for this purpose - no manually written source code there). Source code is generated during the main compilation itself (i.e. not a custom builder, but a plugin for the Scala compiler, but that should be irrelevant).
What I've done so far is:
Add a dummy custom (ant) builder AFTER the standard one and set it to "refresh selected resources" - the source folder of those generated projects.
Also add a dummy custom (ant) builder BEFORE the standard (Java) builder of generated projects that refresh the same thing. Actually I tried various versions - just the source folder, the entire project, or the entire workspace with the same outcome. Note that those generated projects are set to depend on the project whose compilation generates their source code.
In Window -> Preferences -> General -> Workspace enabled "Refresh using native hooks or polling" in addition to "Refresh on access". I also tried disabling "Refresh on access" (leaving only the other one). Same outcome.
Tried with Eclipse Indigo (3.7 SR2 20120216-1857) and Juno (4.2.2 M20130204-1200), both 64-bit Windows versions. Additional plugins are installed, most notably Scala IDE (multiple different versions both for Scala 2.9 and 2.10 ending with Scala IDE 3.0.0). Same outcome.
... and that outcome is that Eclipse does indeed notice the files that have been modified. In whatever was the best combination of settings of the above (forgot) I was even able to get it to notice that some files that used to be generated no longer are and have them disappear (although I still had to collapse the tree and re-expand it, but no F5 was needed).
However, I never got to have it automatically discover that a brand new file that did not exist before was created. In my case that also yields compilation errors (since the modified files that it does discover have changed refer to the code in new files it does not notice).
Simple F5 solves the problem, but it is killing me, as I am trying to roll this environment to other developers and I'd hate having to tell them "You know, you have to (keep) push(ing) F5 every time you...".
Is it possible that this is still impossible in Eclipse? Does anyone know of a plugin (if not a direct solution) that can help?
As I noted in comments, discovering new folders (Java packages) also does not seem to be a problem. Just new files in existing folders.
Thanks!
UPDATE
With all the refresh things I did in place I noticed something I did not before.
I make the change in the project that causes code generation (was trying to test if it is the re-appearance of previously disappearing file is an issue or otherwise). This time I was just renaming one method which caused a name of the generated source file (Java class) to be changed as well.
As "Build automatically" is enabled, Eclipse begins the build. Very quickly it discovers an error and complains about it - one generated class that was modified now refers to a class Eclipse does not see yet (because refresh is incomplete - saw the modified file, but still believed that the file that no longer exists is there and did not see the new file).
Build actually continues. Progress goes up and down, appears and disappears a number of times, building other dependent projects. All the time the error is listed and marked in the Package Explorer on the modified class.
After the build seemingly completes (with that error in it, some minutes later), the refresh completes (!!!). Package Explorer is updated, the old file disappears, the new file appears, the error disappears, etc. I initially attributed this to me switching windows and triggering the refresh that way but I made sure I touched nothing the last time - just made the change and pushed Ctrl+S to save it.
This may mean that the 'condition' is not so bad (one just has to be very patient and have nerves of steel). Investigating further. Thanks to all who are or may be doing the same! The question is still why are there two refreshes with the first one being incomplete?

Flex Builder Debugger doesn't display local variables

I am using the Flex Builder 3 debugger almost every day and it's starting to be a real pain that the 'Variables' tab in the 'Flex Debugging' view doesn't show local variables, only 'this' is displayed.
Also I can not add Watch Expressions for local variables.
Am I forgetting something here or is the debugger just very limited?
Thanks
I have the same problem that motto described. Local variables are not displayed when debugging, "hover" method doesn't work either. You can always use trace() or Loging API.
The problem occurred to me yesterday and the only thing I noticed is that the project stopped to compile using ant script due to OutOfMemoryError (I usually build project using FB, but sometimes FlexBuilder doesn't show errors/warnings and compiling via ant script is the only way I know to find them).
To see if Flex Builder is even tracking your local variables properly, set a breakpoint somewhere in a function. Once you hit that breakpoint, you can also "hover" over a variable in your source code, and a tooltip should show the current value of that variable.
Sometimes, FB has problems if the current function is further down in a larger file. Moving the function code up solves the problem (but exposes the same for another funciton further doen then). It seems that FB can only gather a certain amount of metadata for the currently open file.