How to find in files without the dialog ?

Hi,

Is it possible to perform the find in file but without the dialog ?

I want to initialize the findModel by myself and then perform the actual find operation,
but without showing the find dialog.

Thanks,
Jacob

2 comments

Hello Jacob,

JB> Is it possible to perform the find in file but without the dialog ?
JB>
JB> I want to initialize the findModel by myself and then perform the
JB> actual find operation, but without showing the find dialog.

The relevant code is not part of OpenAPI. You can add a JIRA request to provide
OpenAPI for this.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

request created: http://www.jetbrains.net/jira/browse/IDEA-10006

So, for now I'll see the find dialog with my settings and it's ok.

But I can't force the dialog to select the scope to directory.
Am I missing something?

FindModel model = (FindModel)FindManager.getInstance(project).getFindInProjectModel();
model.setDirectoryName(path);
model.setGlobal(false);
model.setReplaceState(false);
model.setProjectScope(false);
model.setModuleName(null);
model.setWithSubdirectories(true);
model.setMultipleFiles(true);
model.setStringToFind(toFind);
model.setFileFilter(fileFilter);

FindInProjectManager.getInstance(project).findInProject(dataContext);

and now in the dialog the scope in always set to 'Whole project'.


Thank you, Dmitry.

0

Please sign in to leave a comment.