Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Editor issues: reading text files(reading text files)
Editor issues: reading text files [message #1771529] Sat, 26 August 2017 22:23 Go to next message
joseph newcomer is currently offline joseph newcomerFriend
Messages: 15
Registered: July 2017
Junior Member
I am using a program to analyze text files. It will issue error messages based upon the line number of the file. I want to be able to edit the text file using the Eclipse editor; in particular, I want line numbers so I can correlate the error messages to the input (I am not going to count 1,256 lines from the start just to get to the text line number).

Unfortunately, when I "open" the file, it does not treat it as a text file, but as an invocation of an application which is associated with that file extension. I want a way to open a file, any file, no matter what other associations it might have, as simple text. TextEdit works just fine, but does not allow the display of line numbers. Since I am now applying my tool to files generated by another tool, the files are quite large--in excess of 10,000 lines--and figuring out whether the input file is wrong or my code is wrong is difficult if I can't just read the file, and see line numbers attached.
Re: Editor issues: reading text files [message #1771531 is a reply to message #1771529] Sat, 26 August 2017 23:47 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
You can use the Open with right click context menu entry on the file and select Text Editor to open the file in the text editor.
Re: Editor issues: reading text files [message #1771533 is a reply to message #1771531] Sun, 27 August 2017 00:43 Go to previous messageGo to next message
joseph newcomer is currently offline joseph newcomerFriend
Messages: 15
Registered: July 2017
Junior Member
I am running on a MacBook Air. The pad does distinguish between right and left clicks, but not in the case of File>Open. And the only context menu that comes up with control+click says nothing about opening the file as text. So this does not help. So, I return again to the original question, more correctly phrased: how can I, running Eclipse on a MacBook Air, open an arbitrary file as a text file in the Eclipse editor?
joe
Re: Editor issues: reading text files [message #1771546 is a reply to message #1771533] Sun, 27 August 2017 16:05 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

As David mentioned, there should be an Open With... submenu in the popup menu for files appearing in the workspace. Inside that is where you'll be able to choose the internal Text Editor.

The new Open Projects... wizard can let you make an arbitrary existing directory into a project, making its contents appear in the workspace without copying or moving them.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Sun, 27 August 2017 16:06]

Report message to a moderator

Previous Topic:jms problem
Next Topic:Import statements in wrong order
Goto Forum:
  


Current Time: Fri Mar 29 08:16:20 GMT 2024

Powered by FUDForum. Page generated in 0.04721 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top