Strange form behavior in IntelliJ's UI Designer - java

I'm using IntelliJ's UI designer and now I'm stuck as the designer has decided to chop off half of my form. In the UI Designer pane where it shows the components you have added to your form, I can clearly see all my components as expected. But in the main editor window where you see the form itself, IntelliJ has decided to chop off half of it!
Has anyone seen this behavior before and/or know how to resolve it? I have tried doing things like invalidating the cache and restarting IntelliJ several times (which worked once but the problem has come back and I can't seem to resolve it again). I fixed it the one time by restarting IntelliJ and then there was a little anchor to expand the form a little more to reveal the components that were in the white space, but that anchor no longer appears at the bottom of the form to expand.
I am using IntelliJ 9.0.3 Ultimate.

I found the anchors again used to make the form bigger. You can right click the form and choose "Expand Selection" (CTL+W) and then you can increase the size of the form in the editor. I'm not sure why it doesn't expand as you add more components automatically but this solution seems to do the trick.

Related

Problem with JFace Application in design mode

I installed Eclipse IDE for Enterprise Java Developers 2020-09 with WindowBuilder 1.9.4. Then I tried to create a test application: SWT/JFace Java Project with a JFace ApplicationWindow.
My problem is that I cannot drop anything on the window directly in design mode. It is possible to add widgets to the main container in the components tree. But they seem to be hidden behind the parent shell (I could see this from setting a background color for it and when I add them I can see their bounds, but then no longer). It is not possible to resize the application window in design mode either.
However, when I do "Test/Preview...", the widgets are there. And also when I run the program, as they should as they are in the code. In the latter case also the resizing works (not with "Test/Preview..."). The resizing seems to work at first, but then it snaps back to a minimal size where only the menu and toolbar fit in the window,
This is so with any such project. I first tried to import a program I had written in an older version of Eclipse. There I have tabs in a composite in the container. They seem to be hidden, too (and misplaced, also behind the toolbar). But when I run the program, everything is fine. I first thought I might have messed something up in the program, so parsing gets sidetracked. But that cannot be it as the problem already arises in the simple test program where I have just one widget and the default code.
I have tried quite a few things to get around this, eg. reinstalled the IDE, installed an older version, installed an older version of WindowsBuilder in case this is a bug in either. But to no avail. Has anyone experienced the same problem? Seems like there is a simple mistake on my part. Something I would have to change in the settings or maybe the program?
But I have no idea where to look. Could it have to do with the JRE (OpenJDK15U-jdk_x64_windows_hotspot_15_36)? Had to take that as the download from Oracle does not work for some reason. There is a warning that it is not exactly compatible. But then the program works fine, so it cannot be at such a basic level? Any ideas very much appreciated as I am totally stuck at this point.
There is no problem with designing eg. a JFace dialog. Everything works as expected, I can drop widgets, resize, etc.
Here is how it looks:
Brute force "workaround": I go back to Oxygen where things are working fine. But somewhat of a defeat because I am stuck with an old version, which is a deadend. IIRC already going to Photon posed insurmountable problems for me (certainly my fault as I am not that good at the nitty-gritty). Would still be very interested in an answer to my question. Urgency is now lower as I can at least keep working on my program and let my frustration die down after two days of futile attempts.
[Edit: I only tried the resizing in Oxygen 32-bit, that worked, but did not check whether the problem with dropping a widget on the application window was also there. Then I tried to get the 64-bit version to run, which I could not do. There is apparently a problem with Java > 8. Installation of Photon worked finally. However, while resizing is okay there, I get the same problem with dropping widgets and that they appear to be misplaced (upper left corner of the area seems to be behind the toolbar. The "workaround" unfortunately went nowhere. So I am again more interested in an answer than I thought.]
[Edit 2 as per Oct 12: Since I could not solve this problem, I decided to redo the GUI with a SWT Application window. That lacks some of the functionality of a JFace Application window (I especially miss the ease of Actions). So it seems like a step backwards, and it caused some extra effort. But then the upside is that I had to rethink a few things about the structure anyway, which means I was forced to do that sooner than later. But still would like to get also JFace Application windows to run. Pressure is no longer there, but out of interest what went wrong.]

In Eclipse the text goes beyond page

I have a problem in Java Eclipse in that when I type a long sentence it goes beyond the border of my PC screen, so that I have to scroll to the right to be able to read a long sentence. I would like the text to stay within the screen, or within specific parameters, so that I don't have to scroll. Is there a way to do this?
I tried Googling a solution but can't find a way to get text to stay within screen limits :(
I found a button on the Toolbar.
In Eclipse ide 2019-03:
Toggle Word Wrap: Alt+Shift+Y
Depending on which version of Eclipse you use, there may be a way to enable Word Wrap.
In the question How do you enable word-wrap by default in Eclipse? Emmanuel Guiton explains that there is a setting which can be added manually to a preference file. Mickael states that Eclipse Neon uses the aforementioned shortcut.
Edit: Changed "Eclipse Oxygen ide 2019-03" to "Eclipse ide 2019-03"

Viewpart Eclipse RCP resize

I'm writing an Eclipse RCP 3 application. The application contains a menu on the left and the working view on the right. When the application starts the two viewparts are splitting the screen in two parts. Now I'm searching for a way to set the width of the menu so that it not use the full half part of the screen.
I have already done some tests with ISizeProvider but without any luck. What is the easiest way to set a default width on a viewpart?
I can't find anything in the Eclipse source that actually uses the ISizeProvider so it looks like it may have been dropped for Eclipse 4.
If you want to set the relative sizes of views you put then in a Perspective and use the perspective layout factory to set the proportions of the window use by each view.
I started all over again with the mailexample in Eclipse. Now I hava it and without any need to code something.

Eclipse Debugger will not show the shared area

I've had this error before in pydev perspectives in the past, and the only solution I've ever managed was to remove the broken perspective and start a new one.
The problem is this:
Normally the different panes of the workspace can be minimized, maximized, and regular size. Right now, I cannot get the "shared area" code section of the debug perspective to show up at all. I can peak at it while it's minimized, but that's all I can manage.
What's more, eclipse automatically switches to debug, so it's basically impossible for me to debug code right now.
I'd really like to know why this is happening to me, and how to avoid and/or fix it.
Also, I'm currently running java 7, I have not updated yet.
You can go to Window, Reset Perspective which will give you your shared area back, although also obviously reset any other views you may have.

Disable showing of run window in IntelliJ

In IntelliJ every time I make a change in code and I run the app afterwards, "run window" is automatically popped up. Is there any way to disable this annoying behaviour or how to make it less distracting?
I finally could solve this one. At least it worked for me. At the bottom of "Run/Debug configurations" window and in "Before launch" part, uncheck "Activate tool window" check box.
There is currently no solution to do this permanently. However, there is a workaround to prevent it from popping up. Try this:
After the first time the window pops-up simply resize it all the way to the bottom (i.e. grab the TOP and drag down until the window disappears). This will prevent it from popping up again until you manually click one of the buttons to open any window in the same area (i.e. Run, TODO, Android, Terminal, Messages, (and Find Results) - or whatever you have in that same area if you've customized it).
To keep it from popping up, never click the hide button on any of these windows but rather use the same "drag from top to bottom" to hide them (the effect is the same).
This is annoying, to say the least, but once you get used to it it works fine and is much less annoying than dealing with that blasted Run popup window :)
NOTE
I should mention that this is completely safe to do as the windows are only hidden when you do this, and clicking the window's button at the bottom will show it in its original size - so nothing goes missing or breaks using this method :-)
These are called Tool Windows. Right-click the tool window, it pops up a menu, the last option of which is 'Hide'.
Alternatively,
You can install the plugin ToolWindow Manager to show/hide the Tool Window of your choice.
Either
1. Set the run window to be in either split and then shrink it down to be as small as possible.
2. Set the windows to be in floating mode and then shrink it down and move it somewhere less distracting.
disabling checkboxes in "Window | Background tasks solved my problem.
It is soooo annoying oO I just dragged the windows to an other screen and/or set their height to a minimum.. Not "best practise" but it is better than nothing -.-
In intellij go to main menu windows->active tool window->disable floating mode option there.
thanks
For those who are facing this issue with "Run" window they can follow below instruction
From dropdown select "Edit Configuration":
Open Logs tab:
Uncheck these 2 checkboxes:
I have found a solution!!!!
There old plugin for Intellij IDE called "Hide Tool Window Ex".
It hides any tool windows that being opened just after you click in editor again.
(plugin page)
visual example

Categories