no design view in eclipse? - java

I'm working on a group project with Github and Eclipse. My partner has done a lot of work on a GUI and put his work on Github and then I have imported his work through eclipse. For some reason I can not open a design view at all, theres no buttons down the bottom to switch between design and source, trying to open in windowbuilder editor just opens up the code, running the project just says "Unable to Launch, the selection can not be launched". I know I have everything installed properly because I made a test project with a GUI and it has everything above working fine. We both have same versions of everything so I'm really just not sure what to do beyond manually restarting it on my end and copying and pasting code to get it to work.

You can try: Right click in class -> Open With -> Select your design view editor

Okay, I got it to work.
I was importing it directly through eclipse > GIT > Clone. and it wasnt working. but for whatever reason when I cloned it through git onto my desktop and then imported it that way through eclipse, Import > General > Projects from folder. it worked fine.

Related

Intellij doesn't show run button

Intellij doesn't show run button even if that file is in src folder.
Maybe do you know what to do?
P. s. It's strange because that file used to show run button but after recloning git repository it just doesn't show any more.
Right click on src directory and select option Mark Directory As > Sources Root.
There is an Intellij bug that will result to an intermittent disappearance of that little tiny green run button on the left side of the source code (on same column where the red circle breakpoints are). Yes, you can right-click on the mouse and can do the run via the menu, BUT we love that tiny green button so bring it back!! From time to time, i see this green friend and then suddenly it vanish mysteriously and comes back again. I did all, such as rm -rf .idea and other weird stuff, but no explanation has ever been achieved to explain the vanishing green button and it's sudden re-appearance intermittently.
I am drafting this answer, because all of the above answers seems to claim that there is a logical explanation of the intermittent disappearance of our little green friend and that a sequence of steps exists to make our little green friend re-appear, when in fact, there is no such steps and we just have to accept this is a bug to save the remaining hairs in our scalp.
In my case Run/Debug buttons disappeared for all projects after updating from IDEA 2019.2 to 2019.3. Tried checking Sources Root, Invalidate Caches, Run/Debug configurations etc - no luck. Only restoring Run/Debug action group helped:
Right click on main toolbar (where the button disappeared) > Customize Menus and Toolbars... > select Run/Debug > Restore Run/Debug.
I got the same problem with intellij 2019.3 and 2020.1 and found the solution here : https://youtrack.jetbrains.com/issue/IDEA-228180.
Basically, in the IDE the buttons run/debug and the error detection in the code were missing.
The fix was to disable the plugin 'Gradle' (I don't need it anyway) :
Settings > Plugins > Gradle and click disable and apply.
After restarting your IDE it should work
I had this issue when building a microservice with SpringBoot.
I added a new microservice into the root folder and I could not run it.I am using Maven.
Step:
Open pom.xml
right click and select "Add as maven project"
It should resolve it immediately but you can reload the IDE if it does not update immediately.
IDE: Idea 2021.2.3
Build tool: Gradle
I removed the .idea and reimported the project from the Gradle source. Worked fine after.
Another reason could be the Highlighting Level set to None, it should be set at least to Syntax.
First, make the folder as source root.
Second, make sure you set the project’s sdk correctly. For example, if you set the sdk correctly then import java.util.Scanner can be analyzed by IDEA.
Tip:
try not setting the SDK to IDEA’s bundled JDK. I set the project’s SDK to JDK 11 bundled by IDEA at first then found it couldn’t resolve import java.util.Scanner. Setting to JDK 16 which is installed by the OS’s package manager solved this problem, then the “run” button showed up.
If IDEA can index a java file then the file icon will show with a small “c”, indicating a java class. If not, the file icon will show with a small “j”, as this problem’s image shows, indicating a java file which IDEA doesn’t index.
In my case there was a plugin (springboot helper) which I had to disable.
Reinstall the IDE, it solved my problem.
I also applied all these methods but it still didn't work so I stopped my window firewall and allowed access for this application. I don't know how it worked out for me but it just got displayed on top of my screen that window defender firewall has stopped some of this app's features and there was an option to allow so I clicked on it and it now works just fine.

Java classes won't open in Eclipse

I've tried cleaning and validating my project, restarting both Eclipse and my computer and my java class files won't open in the editor. Also, I've tried deleting the project from my workspace and reimporting it and no luck. Does anyone know what it might be?
Window -> Reset Perspective worked for me
Try this Right Click on File -> Open With -> Java Editor
Make sure you are in the Java perspective.
Try cleaning eclipse. Start eclipse with
eclipse --clean
Hope this helps.
make sure that a single click is selected for open mode. if you go to preference setting, it will be the first thing you will see

Non-existing MySql message error

I have to build a Decision Support System, but dont have much experience in Java. So after I connected to MySql with Eclipse (with Connector/J) eclipse started to mess up my other projects. Now, when i try to run other projects in eclipse (that are not related to MySql, ex. Guessing Game) the following error message apperars:
Launch configuration DocsConnectionPropsHelper references non-existing project MySql connection test.
Can anyone help me to resolve this problem please?
UPDATE. it seems that when i press "RUN" elcipse is not running the project that im working with, but other
Your update indicates the issue is actually running the wrong project. To avoid that you may want to close projects you're not working on (right click them in package explorer and select close).
If you do need multiple projects open then when clicking the run icon (which defaults to re-run whatever was ran last among your open projects) make sure you have open in the editor window something that can be ran (and is from the project you want to run).
Then click the drop down arrow to the right of the icon. This will open up a small menu with options to change your build configurations or how it should run your program (i.e. as an application or on a server).
To solve the problem:
-click right botton on the project package you want to work on (run)
-choose Run As
-choose Run Configurations...
-choose DocsConnectionPropsHelper - if in the Project box you see not correct title just remove it. Also remove anything what is in the Main Class box.
-click Apply
-the best option is to close Eclipse and reopen it to make sure that all the settings were configured
It worked for me. Hopefully it will work for you too.

Adding SWT nature to eclipse project

I have exported a SWT project from eclipse under Linux and tried to import it under Windows. So far everything works fine except that I seem to have lost the "SWT nature" of the project. Running the project with the SWT gui works fine but when I try to edit the GUI source, I don't have the Source/Design/Bindings tabs below my source window and cannot do any graphical editing. Does anyone know how to fix this?
I guess you are using WindowBuilder. If this is the case, use the following:
Right click class file → Open With → WindowBuilder Editor

Can't see files in project explorer in Eclipse android project

I'm working on an Android project. Something happened with my Eclipse project and I can no longer "see" any of my source files in the project explorer. The project explorer only shows :
src (clicking and trying to open yields nothing -- I can right click and open in a new window and see a bit more, but still can't decend the directory and see files)
gen
android.jar
usb.jar
maps.jar
My java files are still in the directory.
It looks like the project is corrupted somehow? I have tried deleting everything in .metadata/.plugins/org.eclipse.core.resources per some suggestions I've found but that doesn't seem to fix it. I created a new test project and it looked ok last night when I created it, although now, it to shows the same behavior as above. I'm using eclipse indigo service release 1. See the image bellow:
It's because you have the wrong view open. Try to open the Package Explorer
Window > Show View > Package Explorer

Categories