Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313172

Summary: JSP Editor setting fails to "stick"
Product: [WebTools] WTP Source Editing Reporter: alexandra <astehman>
Component: jst.jspAssignee: jst.jsp <jst.jsp-inbox>
Status: RESOLVED WORKSFORME QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: nsand.dev, rakes123, remy.suen
Version: 3.1.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
This is the default that is always set when I restart Eclipse.
none
This is what the config looks like after I remove the Web page Editor.
none
This is the web page editor error I am trying to avoid by setting the editor default for .JSP filetypes. none

Description alexandra CLA 2010-05-17 11:41:04 EDT
Build Identifier:  20100218-1602

The Web Page Editor throws an exception whenever I attempt to open a JSP file.  So, I am trying to avert this by setting the default editor to be the JSP editor for the .JSP file type in Preferences using General->Editors->File Associations.  (Please reference the screenshots. ) After every Eclipse restart, this setting is reset so the Web Page editor is back in there, even after I delete it, as the default.

Reproducible: Always

Steps to Reproduce:
1.Attempt to open a JSP file using dbl-click in navigator or ctrl-R (open resource) dialog.
2.Get the error.
3.Open the preferences window.
4.Remove the Web Page Editor as an option for .JSP files
5.Open the JSP file. JSP editor opens just fine.
6.Shut down Eclipse.
7. Start Eclipse with the same project.
8. Attempt to open JSP file again.
9. See error in step 2. Repeat steps 3-9 as many times as you like.
Comment 1 alexandra CLA 2010-05-17 11:44:12 EDT
Created attachment 168753 [details]
This is the default that is always set when I restart Eclipse.
Comment 2 alexandra CLA 2010-05-17 11:45:02 EDT
Created attachment 168754 [details]
This is what the config looks like after I remove the Web page Editor.
Comment 3 Remy Suen CLA 2010-05-17 11:45:49 EDT
The IDE bucket is for generic IDE operations and views in the Eclipse platform such as the 'Problems' view.
Comment 4 alexandra CLA 2010-05-17 11:50:32 EDT
Created attachment 168756 [details]
This is the web page editor error I am trying to avoid by setting the editor default for .JSP filetypes.
Comment 5 Remy Suen CLA 2010-05-17 11:52:32 EDT
(In reply to comment #3)
> The IDE bucket is for generic IDE operations and views in the Eclipse platform
> such as the 'Problems' view.

Although now that I look at it in more detail it's possible this is an issue
with content type detection or the editor registry. Anyway, I tried something
similar on 3.6RC1 and the removal seems to stick. Maybe you can try the M7 Java
EE package and see how that flies for you?
http://eclipse.org/downloads/packages/release/helios/m7
Comment 6 Rakesh CLA 2010-07-12 04:58:39 EDT
It is not reproducible on  I20100608-0911 .Change in perference seems to stick.
Comment 7 alexandra CLA 2010-07-20 10:08:45 EDT
This happens also for HTML files, every single time after a restart/fresh start of Eclipse.  The setting is overwritten for both JSP and HTML files on restart.

One important note which may or may not be a factor is that I am using a CUSTOM perspective.
Comment 8 Rakesh CLA 2010-08-10 07:35:05 EDT
(In reply to comment #7)
> This happens also for HTML files, every single time after a restart/fresh start
> of Eclipse.  The setting is overwritten for both JSP and HTML files on restart.
> 
> One important note which may or may not be a factor is that I am using a CUSTOM
> perspective.
Still not able to reproduce on M20100806-0800.Did you try on latest?
Comment 9 Rakesh CLA 2010-11-10 23:09:51 EST
Two points here:
1)I am not able to reproduce it again on wtp 3.2.3.v201010160450 ,using eclipse build M20100909-0800. 
2)That preference page is handled by FileEditorsPreferencePage, which is in org.eclipse.ui.workbench plugin.I debugged it, SSE is not at all involved here.Are you by any chance changing values of EditorRegistry at runtime?It is the class where all values are set etc by this preference page.

Nick, can we close this as not reproducible, or transfer it to team handling org.eclipse.ui.workbench ? I think there is not much we can do here.
Comment 10 Nick Sandonato CLA 2011-05-25 17:18:48 EDT
Rakesh and I have been unable to reproduce this in WTP 3.2.4 and WTP 3.3. If you're still seeing the problem with these versions, please reopen the defect. Thanks!