# Include one TeX file into another

I have main.tex file with:

\documentclass[]{report}
\begin{document}
\input{filename.tex}
\end{document}

Let say filename.tex have the following content:

\begin{abstract}
text
\end{abstract}

Everything works, by TeXstudio IDE don't recognize any commands in filename.tex, because it doesn't have declaration of the document class. And so, it becomes inconvenient to work with this file.

Is there any better way to include files one into another?

-