jbushmaster007 / anyedittools

Automatically exported from code.google.com/p/anyedittools
Other
1 stars 0 forks source link

Saving file using <ctrl>-s changes indentation from hard tabs to spaces #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.Start with sample code, which has been read from a file
static char *get_mime_type(char *file) {
    int i = 0;
    char *ext = rindex(file, '.');

    while(ext && mimetypes[i].extension) {
        if(strcmp(ext, mimetypes[i].extension) == 0)
            return mimetypes[i].mime;

        i++;
    }
    return "application/octet-stream";
}
Indentation is done using a hard tab, which corresponds to 8 spaces

2.Modify code in some way, and save the file using <ctrl>-s. Indentation is 
changed:
static char *get_mime_type(char *file) {
    int i = 0;
    char *ext = rindex(file, '.');

    while(ext && mimetypes[i].extension) {
        if(strcmp(ext, mimetypes[i].extension) == 0)
            return mimetypes[i].mime;

        i++;
    }
    return "application/octet-stream";
}
The indentation is changed, by replacing each tab using 4 spaces.

3. Note that if I use the option File->Close to close and save the file, the 
tab indentation of the saved file is left unchanged.

What is the expected output? What do you see instead?
The tabbing should be unchanged

What version of the product are you using? On what operating system?
Ubuntu 
Eclipse 3.7.0
Unknown AnyEdit version. Most recently downloaded, December 2011.

Please provide any additional information below.
I have attached three screenshots:
C/C++ Code Style preferences
AnyEdit Auto-Convert preferences
AnyEdit Convert preferences

Regards,
Paul Moore
polomora@gmail.com

Original issue reported on code.google.com by polom...@gmail.com on 20 Dec 2011 at 10:04

Attachments:

GoogleCodeExporter commented 8 years ago
Paul,
please open the same file in the Eclipse default *plain text* editor (NOT CDT 
editor) and try to reproduce again.

Usually AnyEdit doesn't do anything if one doesn't want it. I wrote the tool 
for me and I use the tool by myself since years with no "surprises".

Please also check the error log view if you see something strange there.
Please also check the Anyedit version you use via Help->About->Eclipse. I would 
recommend you to update to the latest one.

Regards,
Andrey

Original comment by iloveeclipse on 20 Dec 2011 at 2:59

GoogleCodeExporter commented 8 years ago
Hi Andrey,

Thanks for the quick response.

The version of AnyEdit I'm using is 2.4.0.201101292156
When installing, I was offered the following options:
Eclipse 3.3 - 3.4 plugins
Eclipse 3.5 - 3.7 plugins
Eclipse 3.5 plugins
Eclipse 3.6 - 3.7 plugins
I selected all these options.

I opened the file as follows:
Right-click -> Open With -> Text Editor. => Same problem
Right-click -> Open With -> System Editor => File was opened using gedit

There were no AnyEditTools errors in the error log.

I removed the tool, and the problem disappeared.
When I reinstall, I see the four plugin options listed above. I select them all.
From the list of displayed packages, I select AnyEditTools v2.4.0.201101292156, 
and click on Next.
I select "I accept the terms...", and the Next/Finish buttons remain greyed out.

Can you help further? I'm completely blocked.

Thanks, Paul

Original comment by polom...@gmail.com on 20 Dec 2011 at 3:35

GoogleCodeExporter commented 8 years ago
Please uninstall AnyEdit and install only the one from the "3.6 - 3.7 plugins" 
group.
This must be most recent one. Please also check if the project itself has 
different options than the workspace: go to Project->Properties->Anyedit. If 
both Workspace / Project properties are configured properly, no convert on save 
should happen.

Original comment by iloveeclipse on 20 Dec 2011 at 6:03

GoogleCodeExporter commented 8 years ago
Any feedback to my last question? Is it working now?

Original comment by iloveeclipse on 11 Apr 2012 at 9:49

GoogleCodeExporter commented 8 years ago
No further work planned, as the reported doesn't provided requested feedback.

Original comment by iloveeclipse on 24 Apr 2012 at 6:52