mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 09:03:31 +07:00
Find In Path: return back to 'old' setup FindModel from DataContext
This commit is contained in:
@@ -1077,14 +1077,15 @@ public class FindManagerTest extends DaemonAnalyzerTestCase {
|
||||
String dirName = directory.getPresentableUrl();
|
||||
|
||||
FindModel model = new FindModel();
|
||||
checkContext(model, myProject, null, null, true, null, null, false);
|
||||
model.setDirectoryName("initialDirectoryName");
|
||||
model.setModuleName("initialModuleName");
|
||||
model.setProjectScope(false);
|
||||
model.setCustomScopeName("initialScopeName");
|
||||
|
||||
checkContext(model, myProject, directory, module, false, null, moduleName, false);
|
||||
checkContext(model, myProject, directory, null, false, dirName, moduleName, false);//prev module state
|
||||
checkContext(model, myProject, null, null, true, dirName, moduleName, false);//prev module and dir state
|
||||
checkContext(model, myProject, directory, module, false, dirName, moduleName, false);
|
||||
checkContext(model, myProject, directory, null, false, dirName, moduleName, false);//prev directory state
|
||||
checkContext(model, myProject, null, null, false, dirName, moduleName, false);//prev module and dir state
|
||||
model.setCustomScope(scope);
|
||||
model.setCustomScope(true);
|
||||
checkContext(model, myProject, null, null, false, dirName, moduleName, true);//prev module and dir state
|
||||
|
||||
@@ -113,9 +113,6 @@ public class FindInProjectUtil {
|
||||
// apply explicit settings from context
|
||||
if (module != null) {
|
||||
model.setModuleName(module.getName());
|
||||
directoryName = null;// Explicit 'module' scope is more specific than 'module directory' scope
|
||||
model.setCustomScope(false);
|
||||
model.setDirectoryName(null);
|
||||
}
|
||||
|
||||
Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
|
||||
@@ -127,7 +124,7 @@ public class FindInProjectUtil {
|
||||
}
|
||||
|
||||
// set project scope if we have no other settings
|
||||
model.setProjectScope(directoryName == null && module == null && !model.isCustomScope());
|
||||
model.setProjectScope(model.getDirectoryName() == null && model.getModuleName() == null && !model.isCustomScope());
|
||||
}
|
||||
|
||||
/** @deprecated to remove in IDEA 2018 */
|
||||
|
||||
Reference in New Issue
Block a user