mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+3
-2
@@ -92,8 +92,9 @@ public class CodeStyleSchemesImpl extends CodeStyleSchemes implements Exportable
|
||||
}
|
||||
|
||||
public void setCurrentScheme(CodeStyleScheme scheme) {
|
||||
mySchemesManager.setCurrentSchemeName(scheme == null ? null : scheme.getName());
|
||||
CURRENT_SCHEME_NAME = scheme.getName();
|
||||
String schemeName = scheme == null ? null : scheme.getName();
|
||||
mySchemesManager.setCurrentSchemeName(schemeName);
|
||||
CURRENT_SCHEME_NAME = schemeName;
|
||||
}
|
||||
|
||||
public CodeStyleScheme createNewScheme(String preferredName, CodeStyleScheme parentScheme) {
|
||||
|
||||
+3
-2
@@ -1159,9 +1159,10 @@ public final class ActionManagerImpl extends ActionManagerEx implements Applicat
|
||||
}
|
||||
|
||||
private void preloadActionGroup(final ActionGroup group) {
|
||||
final AnAction[] children = ApplicationManager.getApplication().runReadAction(new Computable<AnAction[]>() {
|
||||
final Application application = ApplicationManager.getApplication();
|
||||
final AnAction[] children = application.runReadAction(new Computable<AnAction[]>() {
|
||||
public AnAction[] compute() {
|
||||
if (ApplicationManager.getApplication().isDisposed()) {
|
||||
if (application.isDisposed()) {
|
||||
return AnAction.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
|
||||
@@ -564,8 +564,7 @@ public class UndoManagerImpl extends UndoManager implements ProjectComponent, Ap
|
||||
@TestOnly
|
||||
private void flushMergers() {
|
||||
// Run dummy command in order to flush all mergers...
|
||||
CommandProcessor.getInstance()
|
||||
.executeCommand(myProject, EmptyRunnable.getInstance(), CommonBundle.message("drop.undo.history.command.name"), null);
|
||||
CommandProcessor.getInstance().executeCommand(myProject, EmptyRunnable.getInstance(), CommonBundle.message("drop.undo.history.command.name"), null);
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
|
||||
@@ -64,7 +64,7 @@ public final class ObjectNode<T> {
|
||||
myChildren.add(child);
|
||||
myTree.putNode(child.getObject(), child);
|
||||
|
||||
propogateChildModification(child.getModification());
|
||||
propagateChildModification(child.getModification());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public final class ObjectNode<T> {
|
||||
if (myChildren.remove(child)) {
|
||||
child.setParent(null);
|
||||
myTree.putNode(child.getObject(), null);
|
||||
propogateChildModification(myTree.getNextModification());
|
||||
propagateChildModification(myTree.getNextModification());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public final class ObjectNode<T> {
|
||||
action.beforeTreeExecution(myObject);
|
||||
|
||||
ObjectNode<T>[] childrenArray = getChildrenArray();
|
||||
//todo: [kirillk] optimize
|
||||
//todo: [kirillk] optimize
|
||||
|
||||
for (int i = childrenArray.length - 1; i >= 0; i--) {
|
||||
childrenArray[i].execute(disposeTree, action);
|
||||
@@ -187,11 +187,11 @@ public final class ObjectNode<T> {
|
||||
return myChildModification;
|
||||
}
|
||||
|
||||
private void propogateChildModification(long stamp) {
|
||||
private void propagateChildModification(long stamp) {
|
||||
if (myChildModification < stamp) {
|
||||
myChildModification = stamp;
|
||||
if (getParent() != null) {
|
||||
getParent().propogateChildModification(stamp);
|
||||
getParent().propagateChildModification(stamp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user