mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
new Flex project configuration: modifiable model
This commit is contained in:
@@ -362,7 +362,7 @@ public abstract class ModuleEditor implements Place.Navigator, Disposable {
|
||||
try {
|
||||
final Object result = method.invoke(myDelegateTable, unwrapParams(params));
|
||||
if (result instanceof Library) {
|
||||
return Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{Library.class},
|
||||
return Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{result instanceof LibraryEx ? LibraryEx.class : Library.class},
|
||||
new LibraryInvocationHandler((Library)result));
|
||||
}
|
||||
else if (result instanceof LibraryTable.ModifiableModel) {
|
||||
@@ -374,7 +374,7 @@ public abstract class ModuleEditor implements Place.Navigator, Disposable {
|
||||
for (int idx = 0; idx < libraries.length; idx++) {
|
||||
Library library = libraries[idx];
|
||||
libraries[idx] =
|
||||
(Library)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{Library.class},
|
||||
(Library)Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{library instanceof LibraryEx ? LibraryEx.class : Library.class},
|
||||
new LibraryInvocationHandler(library));
|
||||
}
|
||||
}
|
||||
|
||||
+5
-4
@@ -345,15 +345,16 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
|
||||
roots.add(myRoot);
|
||||
checkApply(roots, ProjectBundle.message("rename.message.prefix.module"), ProjectBundle.message("rename.module.title"));
|
||||
|
||||
if (myContext.myModulesConfigurator.isModified()) {
|
||||
myContext.myModulesConfigurator.apply();
|
||||
}
|
||||
|
||||
// let's apply extensions first, since they can write to/commit modifiable models
|
||||
for (final ModuleStructureExtension extension : ModuleStructureExtension.EP_NAME.getExtensions()) {
|
||||
if (extension.isModified()) {
|
||||
extension.apply();
|
||||
}
|
||||
}
|
||||
|
||||
if (myContext.myModulesConfigurator.isModified()) {
|
||||
myContext.myModulesConfigurator.apply();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
|
||||
Reference in New Issue
Block a user