Eclipse CDT override popup tooltip message won't go away even across other windows on Ubuntu - eclipse

Ubuntu 18.04, Eclipse 2019.09, files:
cat.hpp
#include <string>
class Cat : public Animal {
public:
std::string noise();
};
animal.hpp
#include <string>
class Animal {
public:
virtual std::string noise() = 0;
std::string poo();
};
Example on a Git repo.
Now from the cat.hpp file, I want to go to the parent method declaration on Animal. So I click the triangle to the left of the line as shown at: How to find the overridden method in Eclipse?
However, if I move the mouse over the triangle quickly and click it, I do go to Animal, but the tooltip saying:
Implements Animal::noise via Animal
stays visible.
The hover has to be relatively quick, around less than 1 second, or else you can't reproduce. But this just happens to be the natural speed at which I would click it most of the time.
Even worse, it remains visible on top of other non Eclipse windows, e.g. the browser as I am writing this answer.
Is there any workaround for this, or an existing bug report that I can upvote?
There is this closed old bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=20987 but it was marked as resolved.

As a workaround, I just go to any one of those triangle symbols, and hover it without clicking for a second. The message then finally goes away.

Related

UPROPOERTY variables not showing in details

I´ve been trying to show some variables that I created in a C++ class and then create a Blueprint class based on it. But when I see the details of the object or try to find this variables in the Blueprints they do not show up.
I´ve basically copy and paste code from UE4 documentation see here: https://docs.unrealengine.com/en-us/Programming/Introduction, but the variables are not showing up for me.
// MyActor.cpp
#include "MyActor.h"
// Sets default values
AMyActor::AMyActor()
{
//PrimaryActorTick.bCanEverTick = true;
TotalDamage = 200.0f;
}
// Called when the game starts or when spawned
void AMyActor::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AMyActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
// MyActor.h
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class MYPROJECT3_API AMyActor : public AActor
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere)
float TotalDamage;
// Sets default values for this actor's properties
AMyActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
I want to modify this variables from the Event Graph. Please help me find what I did wrong, if you need anymore information I will gladly provide it to you.
Use BlueprintReadWrite or BlueprintReadOnly
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float TotalDamage;
This just happened to me and feels like this is what might have happened to Juan Esteban as well, if you think your code is correct (and in my case it was):
"Hot Reloading" of the project was "stuck" in Unreal (i.e. changes made to the project didn't reflect in the editor), despite rebuilding the project and running "Refresh Visual Studio Project" from the file menu.
So... restarting Unreal actually fixed it.

breakpoints location change by modifying code

in eclipse and Visual studio, I find that placing a break point in certain line
1- public class HelloWorld {
* 2- public static void main(String[] args) {
3- System.out.println("Hello, World");
4- }
5- }
if i placed breakpoint in line 3 and edited the code in notepad editor to add anything before that line then open back eclipse it'll point automatically to line 4 with the breakpoint as it adapted the line I chose before.
1- public class HelloWorld {
2- public static void main(String[] args) {
3- int i=0;
* 4- System.out.println("Hello, World");
5- }
6- }
I need to know the location of the code in eclipse source code that handle this case? or is there any known algorithm that is used to adapt the breakpoint location after modifying the code ?
I don't think it searches for the line by text as when I change the content of the line it does go to it w'ever the change
To control syntax, types etc., modern IDE creates tree-model of your source code (similar what compiler does before compiling).
The changes in code - inside or outside IDE - does not require rebuilding the entire tree, therefore it is able to remember at which node of "source tree" the breakpoint is, rather than remembering only line.
It is quite handy, if you are actively debugging and changing the code, you do not have to move all your breakpoint up or down, if the code few lines up or down.
It looks like this , the breakpoint is (probably) attached not to line, but to one of those nodes.

Configure dwm (Linux) to peek when MODKEY is held

I just installed dwm on Arch and am loving it. However, I found that I have no use for the status bar except when I'm switching tags, so I thought a useful feature would be to only display it while MODKEY is pressed.
I know that MODKEY+b toggles the bar, but I'd like to be able to peek at it while MODKEY's being held down. I'd also prefer that this doesn't consume the event, so I'll still be able to chain additional keys onto the sequence.
The only thing I found online about this was a post from Lokichaos (https://warosu.org/g/thread/24122078):
I split the difference with "peek" behavior. When I hold down Mod4 (my main dwm modkey) it shows the bar (but does not reserve space for it). The bar also auto-shows when there is an urgent client waiting (so I can see the highlighted tag). [...]
Is there any way I could implement this with my config.h file, or would I need to get into the nitty-gritty dwm.c? Any ideas as to how this could be done in an organized fashion so that I could bind other actions to key presses and releases?
Thanks for your help!
--EDIT--
This patch allows you to listen to release events, (they even show you how to toggle the bar with pressing/releasing MODKEY+b), but I'm only able to listen to presses and releases on non-mod keys. Again, my goal is to have the bar display when I press MODKEY, and disappear again when I release it.
Here are the three things I've tried in config.h:
type modifier key function argument
{ KeyRelease,MODKEY, 0, togglebar, {0} },
{ KeyRelease,MODKEY, NULL, togglebar, {0} },
{ KeyRelease,MODKEY, XK_Super_L, togglebar, {0} },
...to no avail.
You may try holdbar patch to serve your purpose. I am using this and it is working seamlessly without any errors.
Note that after using this, togglebar will not work any more and bar will be always hidden. Also you cannot map HOLDKEY to simply MODKEY as it takes keysym bindings. You can get them by running xev and pressing the required key. It's keysym value in hexadecimal will be displayed. I use the Super (Windows) key and it's keysym value is 0xffeb. I have applied the same patch. If you want to see, you can view it on Github.

8051 include file setting in eclipse

I am running Eclispe IDE Kepler C/C++Developers, because I would like to programming a 8051 based microcontroller. I start Eclipse, File>New>C Project. Select MCS51 family (SDCC) under Project type and SDCC Tool Chain under Toolchains. Click next, leave Release and Debug selected, click Finish. The project is created. I want to try a simple code:
#include <8051.h>
void delay()
{
int i,j;
for (i = 0;i<=100;i++)
for (j = 0;j<=100;j++);
}
void main()
{
while (1)
{
P1_0 =0; // led glow
delay();
P1_0 = 1; // led off
delay();
}
}
When I build it there was a question mark before #inlude<8051.h> , and when I double click on it, I had got a messsage: No Inludes Found, "No include files were found that matched that name."
So, as I think Eclipse did not find the 8051 header file. I tried to find an example how to solve this problem, but I failed. The question is how to set the right path for 8051.h? If anyone of you can offer me a right solution I would be greatful.
Inside the folder where the toolchain is installed, you should have a folder called "include". Check if 8051.h is in the "root" folder, inside /include. If not, look for it. You must add the path to the include. Let's say the file is in /arch/8051.h, your include becomes:
#include <arch/8051.h>
void delay()
{
//stuff

how to map a gtk window to data

We're writing a diagnosis tool using GTK. You should watch several properties of different ojects, each in an own window. So you should be able to open several equal windows, each 'attached' to a specific object. When for example a button is clicked the appropriate GTK callback is called. But since all windows are equal there is no natural way to see which object should be altered. How could we map each window to its object in a good way?
Right now we use a map, mapping from the gtk windows to an object, but that feels more like a hack. Can we hand over the information about the object in a more elegant way?
GtkWindow is an indirect subclass of GObject, so you can use the family of functions g_object_set and g_object_get (and g_object_set_data, etc.).
I'm one of the team mentioned above looking for a solution. Here is what I got to work so far: I create a Gvalue object and want to add it to GTKWindow window.
int pid = 12345;
GValue val = G_VALUE_INIT;
g_value_init (&val, G_TYPE_INT);
g_value_set_int (&val, pid);
g_object_set (G_OBJECT(window), "pID", &val, NULL); //add to GTKWindow
When pressing a button in this window the following signalfunction is used:
extern "C" G_MODULE_EXPORT void onButtonStepClicked(GtkObject* caller, gpointer data){
GValue _pid;
GtkWidget* window = gtk_widget_get_toplevel (GTK_WIDGET(caller));
g_object_get_property(G_OBJECT(window), "processID", &_pid);
cout << (int)g_value_get_int(&pID) << endl;
}
But now i get the warning to my terminal:
GLib-GObject-WARNING **: g_object_set_valist: object class GtkWindow' has no property namedpID'
So i googled a while and found an example where i first have to install this Properties to a class. Does this makes sense, or did i miss something here?