As the work on FreshLib progress, I begin to think about the new Fresh source editor. It is key component for the next step - portable Fresh IDE, so I want to consider and design it carefully before starting to write the code.
Note, I am talking here, about the "editor" as a component, not as a program. The features of the IDE are subject of another discussion (probably very long).

What features the editor component should provide:

1. Should be able to interpret some special parts of the text and to display and edit them visually (for example bitmap defined as "db" of "file" directives is displayed as an image in the editor and can be edited in place)
This functionality should be provided through plug-in interface that to allow arbitrary data format to be supported. Actually all "visual programming" will be provided this way - forms, menus, pictures etc.
Of course, in any moment the user should be able to switch to "source" view and to edit the source manually.

2. Besides of colors and fonts customizations, it should support customization of the keyboard shortcuts.

3. Should support some plug-in interface that to allow processing of the text from external add-ons. For example - searching in the text will be implemented through external search tool.

4. Should support multiply syntax highlighters for different languages.

5. One interesting feature, that allows use of proportional fonts for programming: elastic tabstops. As long as the assembly is "column based language" this feature could be really useful, even with mono spaced fonts. What you think about it?

6. ... suggest what you think the editor component should be able to do...

07 Apr 2011, 20:50

MHajduk

Joined: 30 Mar 2006
Posts: 6034
Location: Poland

MHajduk

Does the Fresh support the UTF-8 encoded source files? I didn't notice this feature when I had this IDE installed about a month or two ago.

I'd like to have such an opportunity. The best solution I've found till now is PSPad which allows me to edit fasm source files containing strings in a few languages.

08 Apr 2011, 11:28

JohnFound

Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria

JohnFound

Yes, I simply forgot to enumerate it in the first post. (Actually FreshLib uses UTF-8 as internal string format.)

6. Should process UTF-8 encoded source files.

7. ....

08 Apr 2011, 12:45

Tomasz Grysztar

Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland

Tomasz Grysztar

"Elastic tabstops" is a really great idea. fasm's edit control uses the "smart tabs" technique derived frm DOS Navigator because of the limitations of DOS format I wanted to follow; but for modern edit control the elastic tabstops look like a must-have.

Especially since fixed-width fonts and full Unicode support do not really pair well in the general case, IMO.
That makes me wonder: how should one deal with elastic tabstops in mixed RTL/LTR text? I never thought about this one before.

08 Apr 2011, 12:52

JohnFound

Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria

JohnFound

Tomasz Grysztar wrote:

"Elastic tabstops" is a really great idea.

I like it very much. But there is something not very proper with the presented algorithm implementation.
I tried to type some FASM code, but the result was far from ideal. The main problem is that the empty lines breaks the column size and as a whole the source code ends separated in blocks with different column sizes.
IMHO, the algorithm needs some adaptation to assembly language syntax.

08 Apr 2011, 13:31

Teehee

Joined: 05 Aug 2009
Posts: 568
Location: Brazil

Teehee

7. highlight all references of the current selected word.

You can see it in notepad++. I like this feature.

_________________Sorry if bad english.

11 Apr 2011, 19:08

JohnFound

Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria

JohnFound

The work on FreshEdit is in progress now. Here you can see one of the first screen shots.
At the front is the test application in ELF format, running in Ubuntu Linux.
At the back - the same application compiled to EXE and running in Win32.
The loaded file is UTF8 encoded.
The Unicode font is "Fixedsys Excelsior 3.01".

The FreshEdit component is fully portable. It does not contains any OS dependent code, besides of FreshLib library.
Actually I am little bit surprised how easy is to create portable assembly code with FreshLib.

The work continues. The next goal is to make syntax highlighter interface that to works for any language syntax.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum