Bug 41099 - [misc] Opening what seems to be a non-java file with the Java Editor causes an error.
Summary: [misc] Opening what seems to be a non-java file with the Java Editor causes a...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 41583
  Show dependency tree
 
Reported: 2003-08-04 11:59 EDT by Noah Vihinen CLA
Modified: 2003-09-16 06:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noah Vihinen CLA 2003-08-04 11:59:08 EDT
I apologize if I've filed this bug against the wrong component - please let me know of the correct 
component if this is not it, as the bug seems to be fairly major.

When I try to open an xml file with the Java editor, I get the following error message:

Error
An error has occurred when activating this view
Comment 1 Rafael Chaves CLA 2003-08-04 13:54:06 EDT
Reproduced with 3.0 M2 on Motif.

Moving to JDT/UI.

This happens if you associate file extensions other than .java to the Java
Editor and try to open a file having such extension with that editor. I don't
think that it is a very useful thing to do (since most features require a valid
Java compilation unit to work properly), but it could fail more gracefully.

By the way, why do you want to do that?
Comment 2 Noah Vihinen CLA 2003-08-04 14:03:35 EDT
The reason I use the Java editor for editing files other than java files, is because it is the only editor 
that seems to support the 'spaces for tabs' option.  In my company, our code standards prohibit 
tabs.  Exactly four spaces must be used for indentation, and the easiest way to do this in eclipse is 
to just use the Java Editor.  This would be an excellent feature to include with the Ant editor, as 
well as all other code editors.  Should I file a feature or bug request for this?
Comment 3 Dani Megert CLA 2003-08-11 12:27:45 EDT
This is not a major bug because:
- the editor comes up and you can work with the editor
- the Java editor is designed to edit Java files

Agree with comment 3.

Yes, filing a feature request against Ant is the right approach if you want to
see this feature in the Ant editor.
Comment 4 Dani Megert CLA 2003-09-16 06:05:12 EDT
This has been fixed.