mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Use passed filepath as is, don't attempt to use absolute file — in our tests we don't specify sometimes full path — we use "foo.iml" for example.
This commit is contained in:
@@ -70,8 +70,8 @@ public class MultiModuleEditingTest extends ModuleTestCase {
|
||||
|
||||
{
|
||||
final ModifiableModuleModel modifiableModel = moduleManager.getModifiableModel();
|
||||
moduleA = modifiableModel.newModule(new File("a.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId());
|
||||
moduleB = modifiableModel.newModule(new File("b.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId());
|
||||
moduleA = modifiableModel.newModule("a.iml", StdModuleTypes.JAVA.getId());
|
||||
moduleB = modifiableModel.newModule("b.iml", StdModuleTypes.JAVA.getId());
|
||||
assertEquals("Changes are not applied until commit", 0, moduleManager.getModules().length);
|
||||
//noinspection SSBasedInspection
|
||||
moduleListener.assertCorrectEvents(new String[0][]);
|
||||
@@ -107,8 +107,8 @@ public class MultiModuleEditingTest extends ModuleTestCase {
|
||||
final Module moduleB;
|
||||
{
|
||||
final ModifiableModuleModel moduleModel = moduleManager.getModifiableModel();
|
||||
moduleA = moduleModel.newModule(new File("a.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId());
|
||||
moduleB = moduleModel.newModule(new File("b.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId());
|
||||
moduleA = moduleModel.newModule("a.iml", StdModuleTypes.JAVA.getId());
|
||||
moduleB = moduleModel.newModule("b.iml", StdModuleTypes.JAVA.getId());
|
||||
final ModifiableRootModel rootModelA = ModuleRootManager.getInstance(moduleA).getModifiableModel();
|
||||
final ModifiableRootModel rootModelB = ModuleRootManager.getInstance(moduleB).getModifiableModel();
|
||||
rootModelB.addModuleOrderEntry(moduleA);
|
||||
@@ -146,9 +146,9 @@ public class MultiModuleEditingTest extends ModuleTestCase {
|
||||
|
||||
{
|
||||
final ModifiableModuleModel moduleModel = moduleManager.getModifiableModel();
|
||||
moduleA = moduleModel.newModule(new File("a.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId());
|
||||
moduleB = moduleModel.newModule(new File("b.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId());
|
||||
final Module moduleC = moduleModel.newModule(new File("c.iml").getAbsolutePath(), StdModuleTypes.JAVA.getId());
|
||||
moduleA = moduleModel.newModule("a.iml", StdModuleTypes.JAVA.getId());
|
||||
moduleB = moduleModel.newModule("b.iml", StdModuleTypes.JAVA.getId());
|
||||
final Module moduleC = moduleModel.newModule("c.iml", StdModuleTypes.JAVA.getId());
|
||||
final ModifiableRootModel rootModelB = ModuleRootManager.getInstance(moduleB).getModifiableModel();
|
||||
rootModelB.addModuleOrderEntry(moduleC);
|
||||
moduleModel.disposeModule(moduleC);
|
||||
|
||||
+4
-5
@@ -175,14 +175,13 @@ public abstract class StateStorageManagerImpl implements StateStorageManager, Di
|
||||
((MutablePicoContainer)myPicoContainer).registerComponentImplementation(key, storageClass);
|
||||
return (StateStorage)myPicoContainer.getComponentInstance(key);
|
||||
}
|
||||
final String filePath = expandMacros(fileSpec);
|
||||
File file = new File(filePath).getAbsoluteFile();
|
||||
|
||||
String filePath = expandMacros(fileSpec);
|
||||
File file = new File(filePath);
|
||||
|
||||
//noinspection deprecation
|
||||
if (!stateSplitter.equals(StateSplitter.class) && !stateSplitter.equals(StateSplitterEx.class)) {
|
||||
@SuppressWarnings("deprecation")
|
||||
StateSplitter splitter = ReflectionUtil.newInstance(stateSplitter);
|
||||
return new DirectoryBasedStorage(myPathMacroSubstitutor, file, splitter, this, createStorageTopicListener());
|
||||
return new DirectoryBasedStorage(myPathMacroSubstitutor, file, ReflectionUtil.newInstance(stateSplitter), this, createStorageTopicListener());
|
||||
}
|
||||
|
||||
if (!ApplicationManager.getApplication().isHeadlessEnvironment() && PathUtilRt.getFileName(filePath).lastIndexOf('.') < 0) {
|
||||
|
||||
Reference in New Issue
Block a user