Eclipse issues

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

Eclipse issues

Postby antonio » Sun Nov 17, 2013 8:36 am

I'm hitting two problems with Eclipse, don't know if they're related but they began about the same time. Hoping for some pointers to troubleshoot.
I'm developing with Servoy 5.2.16 on Mac OSX10.8.5, Java 1.6.0_51-b11-457. The java version is the one Mac offers to download after a recent OS update. (I haven't made the jump to Mavericks after reading the forum).

The first problem is a recurring one with the workspace. From time to time Eclipse chokes about 90% through on the splash screen when opening. I can see that servoy server is running. I've had a poke around for logs but not sure what I am looking for, nothing sticks out. If I force-quit and rename the workspace, then Eclipse can open with out trouble to a new empty workspace. If I then switch to the renamed workspace it chokes again, suggesting that something is corrupt in the workspace. My workaround is to load my solution from the SVN in to a fresh workspace - something I'm getting good at ;-)

I'm aware that large files can cause issues, so I am particular to close all files before closing Eclipse.

The second issue has become more frequent, and may be the cause of the first. When I open a .js file in Eclipse it will sometimes crash, with the spinning rainbow beachball of death. Only option here is to force quit. I thought file size might be an issue, but I checked and it also dies on small files of just a few kb. I believe it's related to the DLTK, because I can open .js files from the Search or the Resource Perspective by right-clicking on the filename and choosing Open With > Text Editor rather than DLTK Javascript Editor. Trying to edit JS in plain vanilla isn't much fun, so I'd like to figure out why I can't open with DTLK editor.

Thanks for any tips that might get me to the bottom of this.
Tony
Servoy 8 - 2022.03 LTS
antonio
 
Posts: 638
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

Re: Eclipse issues

Postby mboegem » Sun Nov 17, 2013 6:27 pm

Hi Tony,

your issues sound familiar, but can be easily avoided.
Both the issues are related to opening larger js files.

1) Always close ALL editor tab panels before you quit Eclipse.
2) Before opening any editor in Eclipse, make sure you first fire up a debug client.

You will notice you don't have the spinning beach ball anymore.

Now to solve your problem with the startup, this is because you didn't follow rule nr. 1
So now Eclipse is trying to open a JS file before you could apply rule nr. 2
The good news is: you can close your open editor tab panels from outside Eclipse.
Therefor you need to:
- edit the file workbench.xml, which is located in <MyWorkspaceFolder>/.metadata/.plugins/org.eclipse.ui.workbench (you can get there via CMD-SHIFT-G in Finder)
- open the xml file with a (text)editor of your choice.
- you'll see a part which looks like this:
Code: Select all
<editors>
<editorArea activeWorkbook="DefaultEditorWorkbook">
<info part="DefaultEditorWorkbook">
<folder appearance="1" expanded="2">
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
</presentation>
</folder>
</info>
</editorArea>
<editor activePart="true" focus="true" id="org.eclipse.dltk.javascript.ui.editor.JavascriptEditor" name="globals.js" partName="globals.js" path="/Servoy_All/Workspace_5/mysolution/globals.js" title="globals.js" tooltip="mysolution/globals.js" workbook="DefaultEditorWorkbook">
<input factoryID="org.eclipse.ui.part.FileEditorInputFactory" path="/mysolution/globals.js"/>
<editorState selectionHorizontalPixel="0" selectionLength="27" selectionOffset="23370" selectionTopPixel="8205"/>
</editor>
</editors>

- delete the parts between the <editor> tags, so in this case:
Code: Select all
<editor activePart="true" focus="true" id="org.eclipse.dltk.javascript.ui.editor.JavascriptEditor" name="globals.js" partName="globals.js" path="/Servoy_All/Workspace_5/mysolution/globals.js" title="globals.js" tooltip="mysolution/globals.js" workbook="DefaultEditorWorkbook">
<input factoryID="org.eclipse.ui.part.FileEditorInputFactory" path="/mysolution/globals.js"/>
<editorState selectionHorizontalPixel="0" selectionLength="27" selectionOffset="23370" selectionTopPixel="8205"/>
</editor>

- now save the file and start eclipse.

TIP: backup the workbench.xml file in case you screw up the first time(s)

Hope this helps!
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Eclipse issues

Postby antonio » Sun Nov 17, 2013 10:38 pm

Thanks Marc!

FWIW, my workbench.xml looks different, there's no <editor> tags. The section that mentions file names looks like
Code: Select all
<mruList>
<file factoryID="com.servoy.eclipse.core.resource.EditorInputFactory" id="com.servoy.eclipse.ui.editors.TableEditor" name="solution_global" tooltip="cesoft.solution_global">
<persistable name="solution_global" serverName="cesoft" type="table"/>
</file>
<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.ui.DefaultTextEditor" name="ca_lst_claims.js" tooltip="mod_client_adaptor/forms/ca_lst_claims.js">
<persistable path="/mod_client_adaptor/forms/ca_lst_claims.js"/>
</file>
<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.ui.DefaultTextEditor" name="globals.js" tooltip="mod_cron_jobs/globals.js">
<persistable path="/mod_cron_jobs/globals.js"/>
</file>
</mruList>


Deleting that whole section allows Eclipse to open the workspace, as you've described, thanks*10^6, that's a real time saver.

However, problem #2 persists. After opening Eclipse with a clean workbench, no files open in editor, I can only open most .js files with the Text Editor
Screen Shot 2013-11-18 at 7.18.53 AM.png
Screen Shot 2013-11-18 at 7.18.53 AM.png (86.02 KiB) Viewed 4996 times

If I try to open a file by other means, I get the beachball again on some files that I could previously open fine, eg
    double-clicking on a method name in the Servoy Solution Explorer window
    double-clicking in the Search Results window
    using the Locate Servoy Resource window with Cmd Shift L

Really small files (a few hundred bytes) will open in DLTK, but larger files in the kB range won't open, even though I've had no problems with them in the past. Previously, only some really big files (100s of kb) were problematic, and I've trimmed those ones.

Any further insights?
Tony
Servoy 8 - 2022.03 LTS
antonio
 
Posts: 638
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

Re: Eclipse issues

Postby mboegem » Sun Nov 17, 2013 11:11 pm

Did you fire up a smart client before trying to open any editor?
This is the real 'key action' in order to open anything without spinning ball.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Eclipse issues

Postby antonio » Mon Nov 18, 2013 12:01 am

Smart client... no, I had opened a webclient without success.
And when I when to launch the SC, I realised I had recently changed the solution type to Webclient only, while I was tweaking the login process after reading up on enhanced security.
Changed it back, opened a SC and now all seems well!
So now I know the cause of the problem, and the cure. Thanks for helping me to join the dots.
My solution is WC only, so it's a bit of a workaround, but at least it works!

Any idea why opening a SC helps with the DLTK editor? I'm curious to know if there's some settings in Eclipse that will allow me to work without opening a SC.

Tony
Tony
Servoy 8 - 2022.03 LTS
antonio
 
Posts: 638
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

Re: Eclipse issues

Postby mboegem » Mon Nov 18, 2013 12:09 am

antonio wrote:Any idea why opening a SC helps with the DLTK editor? I'm curious to know if there's some settings in Eclipse that will allow me to work without opening a SC.


Not exactly, Johan Compagner has mentioned this as a solution once…
It has improved over time, I don't need it anymore in the 6.1.x+ branch
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 5 guests

cron