Failed to create the part's controls in Eclipse with Salesforce
Asked Answered
K

14

19

I have Eclipse Juno and Force.com IDE. When I try to create new classes they always show: failed to create the part's controls. It worked for the first time, but now they always show this. Same happens if I create them inside the force.com platform.

Error details:
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)

etc ...

I would appreciate all help.

Kierkegaard answered 11/1, 2013 at 14:39 Comment(2)
Is this all of the error details, or did you truncate some of them? Better to add the entire trace if possible. Also look in your workspace directory, there should be a .log file, see if any exceptions are logged right after to perform the problem causing stepsSweaty
One answer has a ton of upvotes and is clearly correct. Consider checking it?Cankered
T
62

I had the same error. I fixed it by switching the eclipse workspace. Go to menu File->Switch Workspace->Other, and then select the same workspace you were working with. Eclipse will restart and you should not get the error.

Trauma answered 28/2, 2013 at 7:59 Comment(7)
Thank you so much for this workaround! Now how am I going to remember it?!Johnsen
This works for me and seems to be, in effect, the same as closing and re-opening eclipse.Satang
nope neither switching workspace nor restarting eclipse works. Also I deleted project. Created a new one, created new code files and copy pasted code in them. It compiled and ran. But when I close file and reopen it, it starts giving same error. One more observation: only this project is messed up, others are just fine.Piscary
Thanks for workaround. I also faced same issue, after my eclipse is not responding while syn with svn so i closed it from StartTaskManager.Cadi
My error seemed to have to do with one file and even the content of the file. After deleting and re-pulling the repo, the file would save, but if I pasted in the new changes, the save would fail again. This would happen even if I only pasted in a very small section (a few lines) of the new code. So I typed out my changes again to those lines and the saving never failed.Cankered
did not work for me, but it happens for me with the Data Source view on some table choosing Edit Schema... when it tries to dispay the db schema in the editor (Eclipse Neon 3, 4.6.3)Nupercaine
This has worked for me in Eclipse IDE for C/C++ Developers, 2023-03, and I am extremely surprised to see that I have to do this while working on something that seems completely unrelated but triggers the failed to create the part's controls error. Thank you for your answer!Tungsten
H
9

I faced the same issue my default editor for JSP was Web page editor. Which I changed to JSP editor and everything is fine.

PS: To change to JSP editor Right click on JSP page -->open with jsp .

Hertz answered 24/6, 2015 at 15:15 Comment(1)
I had selected 'JBOSS JSP Editor' and can't open with 'Failed to create the part's controls' error. I switched to JSP Editor and it opened correctly¡ Thx so much¡ ;)Outcaste
M
4

I solved my problem like this:

myeclipse

Manville answered 15/3, 2017 at 2:58 Comment(0)
M
2

I got the "failed to create the part's controls" error one day when I opened Eclipse and tried to view a java file I had been working on. When I opened the file I needed, it showed a red X and NullPointerException instead of the code. The error log mentioned "event loop exception" for some reason.
I restarted Eclipse, and the error was still there. I cleaned the project, updated the project, deleted and re-imported the project, deleted and re-imported the file, and the error still was there. As a last resort, I restarted Eclipse again and then the file was fine. So one of the clean/update/delete/import steps worked but I don't know which one.

Mendelsohn answered 27/1, 2015 at 17:31 Comment(1)
I suspect you're correct. Much of this sort of work got it going for me on a javascript file. I think the problem is in the workspace. I had to physically remove the folder to a temporary location, clean the workspace, restart eclipse, close eclipse, move the folder back into the workspace and restart eclipse. I did a workspace clean to no effect, similarly a maven clean did not help. There is a maven eclipse clean that I did not try that might have helped.Reeba
W
2

Use eclipse -clean from command prompt to solve this problem.

Within answered 19/8, 2015 at 6:48 Comment(0)
G
1

This problem occur because of in eclipse default editor is not able to identify extension of that file. If you right click on file and open it with respective text editor ,problem will be solved

Gunpowder answered 12/1, 2015 at 10:40 Comment(0)
N
1

enter image description hereIn ecllipse, every file types has some associated default formats and one of the default format set to the particular file type.

You can see this in General -> Editors -> File Associations-

This issue generally occurs when we open any file in the format which is not the default format of the particular types.

I got same issue when I opened one of the Java file in text format in ecllipse and then I started getting the same issue. After research, I observed that AspectJ/Java Editor was setting as default. After reset it to Java Editor, the problem got resolved.

Steps : 1. General -> Editors -> File Associations- 2. Select the content type and choose the default format for it. 3. Restart the ecllipse.

In general, it is some default file format that set in ecllipse causing the same issue.

Natural answered 2/10, 2016 at 6:55 Comment(0)
H
1

I solved the problem.

(1)Open the filed with TXT.

(2)Search and Delete the underline between number like:

int a = 10_000;

It works when i compile and run as others used, but it will fail if i save and open again.

Holm answered 9/4, 2021 at 1:15 Comment(0)
A
1

This worked for me----> Right click on pom.xml-->open with-->xml editor

Agnail answered 6/6, 2022 at 6:10 Comment(0)
S
1

In my case, the file wouldn't open because there was an extra parenthesis. I removed it in another editor and after restarting eclipse, it worked...

Sturdivant answered 17/4, 2023 at 9:6 Comment(0)
R
0

in my case problem was that the server was resin and I didn't have the resin server extension installed

Ranite answered 7/3, 2014 at 12:17 Comment(0)
O
0

I also had for the same problem and fixed it by updating eclipse. Help > Check for Updates.

Organizer answered 25/5, 2022 at 2:46 Comment(0)
B
0

Had a similar stacktrace on failed to create the part's controls while trying to open Git repositories view in Git perspective.

enter image description here

My case (cause) is different since I was migrating an Eclipse workspace from an Ubuntu VM to Windows.

Many thing were copied like projects, .git folders, or also .metadata Eclipse folder.

Tried with no success:

  • uninstall all egit component (installation details, then, install new software
  • restart eclipse -clean
  • reset Git repository perspective

I searched and found this invalid UNIX : separator in .metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.egit.core.prefs file.

GitRepositoriesView.GitDirectories=/path1/.git\:/path2/.git

Here, the : is invalid path separator on Windows.

I simply removed the value in this line, saved file, and restarted Eclipse:

GitRepositoriesView.GitDirectories=

(alternative: if needed, try to migrate those linux paths to their Windows equivalent too)

Git repositories view is back.

enter image description here

Bleareyed answered 9/6, 2022 at 18:2 Comment(0)
D
0

If you are encountering this issue after installed Lombok plugin in your Eclipse, remember clean all the classes file if not the Java file can't be opened, it is due to mis-match of compiled class with the Java source.

Delaminate answered 7/6, 2023 at 6:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.