You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by Nicholas DiPiazza <ni...@gmail.com> on 2021/03/13 15:22:06 UTC

IntelliJ - order imports same for Tika code changes?

I am an IntelliJ user and I use the auto-organize imports feature.

This constantly changes the order of imports in files when I modify them
when doing Tika development because my imports do not happen in same order
as eclipse.

Has anyone else already fixed this issue? If there some magic way I can get
this to stop happening, that would save me a lot of time.

-Nicholas

Re: IntelliJ - order imports same for Tika code changes?

Posted by Nicholas DiPiazza <ni...@gmail.com>.
Yeah the checkstyle would not have to be enforced, but if you check it into
the project people can plug in the Checkstyle plugin for
Eclipse/Intellij/etc and have the correct formatting when they use auto
formatting.

And no, it appears that attachment was scrubbed out.

On Sat, Mar 13, 2021 at 8:01 PM Tim Allison <ta...@apache.org> wrote:

> We don't use checkstyle on Tika...I've thought about it, but then the
> sun rises and sets again on another day.
>
> I'm not against it, and I think it would help with code consistency
> quite a bit.  The initial lift is daunting...
>
> I also use Intellij.  I'm attaching an .editorconfig file.  I don't
> know if it will come through on the dev list.  If there's something
> that we can add to the project...like the .editorconfig to help, let
> me know.  I'm hesitant to add IDE-specific stuff, but I'm open to
> discussion.
>
> On Sat, Mar 13, 2021 at 12:24 PM Nicholas DiPiazza
> <ni...@gmail.com> wrote:
> >
> > Does Apache Tika use a checkstyle configuration? Maybe I can import that
> > into the java code formatter and it will magically make my auto imports
> > agree with the ones that are used in the codebase
> >
> > On Sat, Mar 13, 2021 at 9:39 AM Maxim Solodovnik <so...@gmail.com>
> > wrote:
> >
> > > Additionally you can disable "reorganize imports" in IntellyJ (if I do
> > > remember correctly) :)
> > >
> > > On Sat, 13 Mar 2021 at 22:35, Maxim Solodovnik <so...@gmail.com>
> > > wrote:
> > > >
> > > > Maybe this article can help?
> > > >
> > >
> https://omindu.medium.com/configuring-intellij-idea-to-overcome-checkstyle-wrong-order-for-import-issues-91a32b5096c7#:~:text=Open%20the%20'Settings'%20(or,done%20apply%20the%20new%20settings
> > > .
> > > >
> > > > On Sat, 13 Mar 2021 at 22:22, Nicholas DiPiazza
> > > > <ni...@gmail.com> wrote:
> > > > >
> > > > > I am an IntelliJ user and I use the auto-organize imports feature.
> > > > >
> > > > > This constantly changes the order of imports in files when I modify
> > > them
> > > > > when doing Tika development because my imports do not happen in
> same
> > > order
> > > > > as eclipse.
> > > > >
> > > > > Has anyone else already fixed this issue? If there some magic way I
> > > can get
> > > > > this to stop happening, that would save me a lot of time.
> > > > >
> > > > > -Nicholas
> > > >
> > > >
> > > >
> > > > --
> > > > Best regards,
> > > > Maxim
> > >
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
>

Re: IntelliJ - order imports same for Tika code changes?

Posted by Tim Allison <ta...@apache.org>.
We don't use checkstyle on Tika...I've thought about it, but then the
sun rises and sets again on another day.

I'm not against it, and I think it would help with code consistency
quite a bit.  The initial lift is daunting...

I also use Intellij.  I'm attaching an .editorconfig file.  I don't
know if it will come through on the dev list.  If there's something
that we can add to the project...like the .editorconfig to help, let
me know.  I'm hesitant to add IDE-specific stuff, but I'm open to
discussion.

On Sat, Mar 13, 2021 at 12:24 PM Nicholas DiPiazza
<ni...@gmail.com> wrote:
>
> Does Apache Tika use a checkstyle configuration? Maybe I can import that
> into the java code formatter and it will magically make my auto imports
> agree with the ones that are used in the codebase
>
> On Sat, Mar 13, 2021 at 9:39 AM Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > Additionally you can disable "reorganize imports" in IntellyJ (if I do
> > remember correctly) :)
> >
> > On Sat, 13 Mar 2021 at 22:35, Maxim Solodovnik <so...@gmail.com>
> > wrote:
> > >
> > > Maybe this article can help?
> > >
> > https://omindu.medium.com/configuring-intellij-idea-to-overcome-checkstyle-wrong-order-for-import-issues-91a32b5096c7#:~:text=Open%20the%20'Settings'%20(or,done%20apply%20the%20new%20settings
> > .
> > >
> > > On Sat, 13 Mar 2021 at 22:22, Nicholas DiPiazza
> > > <ni...@gmail.com> wrote:
> > > >
> > > > I am an IntelliJ user and I use the auto-organize imports feature.
> > > >
> > > > This constantly changes the order of imports in files when I modify
> > them
> > > > when doing Tika development because my imports do not happen in same
> > order
> > > > as eclipse.
> > > >
> > > > Has anyone else already fixed this issue? If there some magic way I
> > can get
> > > > this to stop happening, that would save me a lot of time.
> > > >
> > > > -Nicholas
> > >
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> >
> >
> >
> > --
> > Best regards,
> > Maxim
> >

Re: IntelliJ - order imports same for Tika code changes?

Posted by Nicholas DiPiazza <ni...@gmail.com>.
Does Apache Tika use a checkstyle configuration? Maybe I can import that
into the java code formatter and it will magically make my auto imports
agree with the ones that are used in the codebase

On Sat, Mar 13, 2021 at 9:39 AM Maxim Solodovnik <so...@gmail.com>
wrote:

> Additionally you can disable "reorganize imports" in IntellyJ (if I do
> remember correctly) :)
>
> On Sat, 13 Mar 2021 at 22:35, Maxim Solodovnik <so...@gmail.com>
> wrote:
> >
> > Maybe this article can help?
> >
> https://omindu.medium.com/configuring-intellij-idea-to-overcome-checkstyle-wrong-order-for-import-issues-91a32b5096c7#:~:text=Open%20the%20'Settings'%20(or,done%20apply%20the%20new%20settings
> .
> >
> > On Sat, 13 Mar 2021 at 22:22, Nicholas DiPiazza
> > <ni...@gmail.com> wrote:
> > >
> > > I am an IntelliJ user and I use the auto-organize imports feature.
> > >
> > > This constantly changes the order of imports in files when I modify
> them
> > > when doing Tika development because my imports do not happen in same
> order
> > > as eclipse.
> > >
> > > Has anyone else already fixed this issue? If there some magic way I
> can get
> > > this to stop happening, that would save me a lot of time.
> > >
> > > -Nicholas
> >
> >
> >
> > --
> > Best regards,
> > Maxim
>
>
>
> --
> Best regards,
> Maxim
>

Re: IntelliJ - order imports same for Tika code changes?

Posted by Maxim Solodovnik <so...@gmail.com>.
Additionally you can disable "reorganize imports" in IntellyJ (if I do
remember correctly) :)

On Sat, 13 Mar 2021 at 22:35, Maxim Solodovnik <so...@gmail.com> wrote:
>
> Maybe this article can help?
> https://omindu.medium.com/configuring-intellij-idea-to-overcome-checkstyle-wrong-order-for-import-issues-91a32b5096c7#:~:text=Open%20the%20'Settings'%20(or,done%20apply%20the%20new%20settings.
>
> On Sat, 13 Mar 2021 at 22:22, Nicholas DiPiazza
> <ni...@gmail.com> wrote:
> >
> > I am an IntelliJ user and I use the auto-organize imports feature.
> >
> > This constantly changes the order of imports in files when I modify them
> > when doing Tika development because my imports do not happen in same order
> > as eclipse.
> >
> > Has anyone else already fixed this issue? If there some magic way I can get
> > this to stop happening, that would save me a lot of time.
> >
> > -Nicholas
>
>
>
> --
> Best regards,
> Maxim



-- 
Best regards,
Maxim

Re: IntelliJ - order imports same for Tika code changes?

Posted by Maxim Solodovnik <so...@gmail.com>.
Maybe this article can help?
https://omindu.medium.com/configuring-intellij-idea-to-overcome-checkstyle-wrong-order-for-import-issues-91a32b5096c7#:~:text=Open%20the%20'Settings'%20(or,done%20apply%20the%20new%20settings.

On Sat, 13 Mar 2021 at 22:22, Nicholas DiPiazza
<ni...@gmail.com> wrote:
>
> I am an IntelliJ user and I use the auto-organize imports feature.
>
> This constantly changes the order of imports in files when I modify them
> when doing Tika development because my imports do not happen in same order
> as eclipse.
>
> Has anyone else already fixed this issue? If there some magic way I can get
> this to stop happening, that would save me a lot of time.
>
> -Nicholas



-- 
Best regards,
Maxim