Eclipse editor unable to display file contents - eclipse

I've run into a very strange issue with my Eclipse installation. In fact, I've tried installing three different instances and the problem persists, so something must be seriously messed up with my machine.
The best way I can describe it is this. When I open a file in Eclipse (regardless of file type - I've tried .java, .js, .xml, etc.), the file appears to open and the filename is shown at the top of the editor panel as normal. But the file itself appears to be empty or blank.
Upon clicking in the editor window to attempt typing, it gets even more strange. The normal blinking black cursor is the full height of the window. Typing doesn't actually do anything. No text shows up, but it appears as if the file is being edited because the (*) symbol displays next to the filename as if it hasn't been saved since it was last changed.
I would provide a screenshot, but it's simply a blank window with a giant typing cursor. My current environment information is below, but like I said, I've had the issue with three different versions of Eclipse. Also, it's peculiar that this started happening seemingly randomly. Everything was fine but my machine was overdue for a restart. After restarting I opened up my workspace and this just sort of happened. I haven't been able to find any suggestions that aren't "reinstall" or "run Eclipse with the -clean tag" (neither of which worked).
Windows 7 Enterprise
Service Pack 1
Processor: Intel(R) Xeon(R) CPU E5-2695 v2 # 2.40GHz
RAM: 8GB
System type: 64-bit
Eclipse Mars 4.5.2

Related

Minizinc IDE does not open anymore

I am using Minizinc IDE (the latest version) on Windows 10. I have been using it for a time and everything was fine. All of a sudden, when I wanted to open Minizinc IDE, it shows that it is open in the taskbar, but the IDE windows does not appear! when I hover the mouse over the icon in the taskbar, it shows a white rectangle! I waited for an hour and no change, restarted my PC, uninstalled Minizinc software, and re-installed it again, but none of these have helped! Any suggestions?
Their might be a problem with your search path. Or some dynamic link libararies (DLL) might be missing or hidden.
You could try a dependency checker like https://github.com/lucasg/Dependencies to find and solve the problem.
Start at file "...\MiniZinc\MiniZincIDE.exe"
Here are the dependencies listed on my Windows 10 PC:

How can I get Eclipse IDE to default to "Selected lines" in the Find/Replace dialogue when multiple lines are selected?

When working in Eclipse and hitting Ctrl+F with lines of code selected, the default behavior I expect is for the Find/Replace dialogue to open with the "Selected lines" option and, perhaps, either buffer contents or a previous search query in the "Find" prompt. On my home machine, what happens instead is the entire selection gets automatically copied to the "Find" prompt and Scope is reset to "All" instead of "Selected lines" every time.
I somehow do have this working by default on my work machine: "Selected Lines" scope option is chosen automatically when more than one line is selected in the editor.
Possibly unrelated: I do have CDT installed and I work mostly with C++ in Eclipse. Home machine is running Ubuntu 18.10, work machine is running Ubuntu 18.04.
I tried:
Re-downloading Eclipse, reinstalling CDT & cmake4eclipse
Changing to a new Workspace in Eclipse (without copying settings)
Searching high and low online for recipes on how to control this.
How do I change the IDE at home to the desired "Selected Lines" behavior?
[Edit 1 hour later]: I am now almost convinced the issue has to do with the Ubuntu version somehow. I'm running 18.04 on my Laptop (same as my work computer) and I just upgraded CDT & Eclipse Platform to latest stable versions (9.7 and 4.11/2019-03, respectively), which I have everywhere else. The new "wrong" behavior didn't appear. I will also start a thread on the Eclipse forums or perhaps even open a bug report. I don't want to reinstall the whole system or downgrade it (slim chance of success) just to get this back; if it's an Eclipse bug, I'd rather work on fixing it.
[Edit 2 days later] The bug did not manifest on a fresh install of Ubuntu 18.10. I still have no idea what was different on the 'culprit' machine. I ended up wiping the drive and reinstalling 18.04 on the same machine and the problem went away.

eclipse - swt - using windowbuilder in xfce env

I have some problems with eclipse indigo x64 Linux; The problem is using windowbuilder (the SWT); I tried using gwt or swing but they both cause either windowbuilder freeze or even eclipse crash...
The alike issue it seems I found related info in official eclipse indigo offline Help which says :
How can I prevent the preview window from flashing under Linux using Metacity
In order to create the graphics that you see in the design view,
WindowBuilder Pro creates an off screen window containing the various
widgets and they takes a screen snapshot of them. This works very well
under Windows, OSX and some versions of Linux. Recent versions of the
Metacity window manager (more recent than 2.1.4), however, have been
modified/"fixed" to disallow windows to be opened off screen. This
forces the preview window to appear on screen leading to an annoying
flashing effect any time you make a change. The solution is to disable
the Metacity "fully_onscreen" constraint by patching the Metacity
source code and rebuilding and installing the patched version into
your system.
Here are the steps to follow:
Download the Metacity source code from ftp://ftp.gnome.org/pub/gnome/sources/metacity/
Unpack the source code tarball into any temporary directory.
Chdir into this directory (with the unpacked code).
Find window.c file and open it with your favourite texteditor.
Find a line with "window->require_fully_onscreen = TRUE;"
Replace it with "window->require_fully_onscreen = FALSE;"
Save the changes and close the editor.
Open a terminal and chdir into the directory with the source code (nice if you have already done this)
Run "./configure".
Run "make all".
Make sure that steps 9 & 10 completed without errors.
Become root (or execute the next command via "sudo" depending on the Linux you are running)
Run "make install" (or "sudo make install").
Save your work and close any application you are working with.
End your session (or press Ctrl-Alt-Delete to restart the x-server) and log in again.
You are done!
well seems like I have the snapshot really but, as I can get it, the snapshot doesn't want to dispose or similar so I have either resize the whole eclipse or press F5 to refresh (which works not at once);
I am not sure how to fix the issue in case I have xfce+adwaita installed? I don't have metacity installed; Seems like xfce works with gtk instead of metacity (correct me if I am wrong);
So my question is... how to fix the "window flashing or freezing" if I have :
xfce4
adwaita-dark theme
linux arch x64ce
Thanks
Try to install install libswt-gtk-3-jni and libswt-gtk-3-java.

Eclipse cannot save python2.7 interpretor

Though this is strange but happening with me. I add python3.2 in in the Pydev> interpreter-python it is saved for always. I can run my scripts pretty well. But when I add a 'python2.7' in the Pydev> interpreter-python it shows there till preferences window is open and once I close the preferences window it disappears and takes other interpreters with it. I mean an empty 'interpreter-python' setting.
I save my workspace in dropbox so that I can use share my settings on different systems both using Ubuntu 12.04 X64. I am sure it is not a Dropbox ACL setting issue as 'Python3.2' settings save and work pretty well until I add 'python2.7' which removes all the interpreters including itself.
Please Help. Unable to code.
AK

How to make Eclipse behave well in the Windows 7 taskbar?

All other apps that can be pinned to the taskbar behave well.
But Eclipse doesn't show recently open projects when I right click it.
It also doesn't allow to pin some projects inside it.
Note that I have the JS version of Eclipse Helios. Which spawns a new and different taskbar icon after loading.
Specify the latest available Java VM in your eclipse.ini. I.e.:
-vm
jdk1.6.0_10\jre\bin\client\jvm.dll
Make sure they are on separate lines
Anything after the "vmargs" is taken to be vm arguments
(More info)
Or alternatively add the java bin folder to your Windows PATH before the "windows32" folder, because otherwise eclipse uses "javaw.exe" in the win32 folder instead of the JDK one.
Riccardo's solution from the Eclipse bug report worked for me, but I don't get recently opened projects, etc. from the task bar. Is anyone experiencing that these workarounds restore that behavior?
I have the same problem on Windows 7 x64 with Helios x64, but for me
the following workaround works with the option "Always combine, hide
labels" for taskbar buttons.
Check your "eclipse.ini" for the specified VM and make sure the path points to the bin directory of your JDK or JRE (and not to javaw.exe).
For me the argument is "D:/Development/Languages/Java/Development
Kit/bin/" without quotes.
Unpin Eclipse from the taskbar or delete the shortcut
Run "eclipse.exe" from the explorer and choose your workspace
Pin Eclipse to the taskbar after the splash screen was loaded and when the main window is shown
setting eclipse.exe to compatibility mode works
I just want to add this for the Win10 users.
Edit eclipse.ini to add these lines at the end before the line --launcher.appendVmargs:
-vm
C:/Program Files/Java/jdk1.8.0/jre/bin/server/jvm.dll
You need set the compatibility to Windows Vista as well in order for it to work.
I think it's important to mention that at least for me it was important to add the path to the vm in the eclipse.ini with forward slashes, even though I'm working with Windows (7, that is). Eclipse didn't start when I used backslashes.
The solutions offered here on StackOverflow so far, don't have an easy fix for running multiple Eclipses while each having their own Application ID, and making grouping of icons work as expected. The answer here does provide a reference to the underlying System.AppUserModel.ID property.
Here's a quick HOWTO:
Do the -vm setting as plenty of people here have mentioned
Run the eclipse app
Right click on the running taskbar icon, Pin this program to taskbar
Navigate to %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\Taskbar
Copy the newly created shortcut to another location. It will be named eclipse, eclipse (2), or eclipse (3) and so on
Right click on the running taskbar icon, Unpin this program from taskbar
Use the Shortcut Properties dialog to copy all individual fields (target + parameters, workdir, icon, anything else) to the new shortcut
Rename the new shortcut
Drag the new shortcut to the Windows Taskbar
Done
Here's an extended HOWTO, helpful if you want icon grouping separated per individual Eclipse instance (if you have multiple instances running):
Find out what your startup plugin is, for example org.eclipse.epp.package.java_2.0.1.20130919-0803. Open the plugin.xml file of that folder.
Edit the following XML location in that file: /plugin/extension/product/property[#name="appName"], set attribute value to something else. Don't use spaces, keep length below (up until) 40.
Optionally also set the window title: /plugin/extension/product/property[#name], set attribute name to something else.
In your existing Eclipse shortcut, append -clean and run it once. You will notice the //product/property[#name] attribute being used in the Eclipse window title. Afterwards, you can remove -clean again.
Follow the quick HOWTO above
A quick explanation on What's going on here:
Inside the .lnk file, an attribute is stored, which can't be entered by using the windows Shortcut Property dialog. If you copy a .lnk file, the attribute will copy with it.
Windows groups by identical System.AppUserModel.ID property, AppID for short
Eclipse does not have an AppID at startup. First the JVM is started, then the eclipse core/platform is started, and then the startup plugin is loaded. In this last stage, an API call is done to set the AppID to the value inside a plugin.xml file. See above: extended HOWTO item 2
When you drag a manually created shortcut .lnk file to the taskbar, it makes sense that windows can't put this AppID into the new 'pinned' version of the .lnk file. It can only be detected at runtime.
When you start an Eclipse application, right click on the running taskbar icon, Pin this program to taskbar -> then Windows will detect the AppID and store it in the 'pinned' .lnk. But, partly because of the JVM process redirection, Windows does not detect the command-line parameters, environment, working folder (at startup at least), and the icon path + icon index. So you have to:
Do a file copy of the .lnk file and fill in the missing gaps yourself
Or, use a shortcut creation tool that understands System.AppUserModel.ID properties (there are plenty)
Or, use the Windows API directly
Sincerely hope this will reduce the amount of haywire Eclipse taskbars icons on the workstations around me,
Cheers, TW
Recently Timo Kinnunen has pinpointed the problem
Edit eclipse.ini find the line:
--launcher.appendVmargs:
and change it to
--launcher.appendVmargs:-vm <PATH_TO_JAVA>/jdk1.8.0/jre/bin/server/jvm.dll
This causes the JVM to be launched in the same process as eclipse.exe rather than as a child process and avoids the intricacies of Host Processes with AppUserModelIDs.
And it works !!!