This commit is contained in:
Alexey Kudravtsev
2012-10-16 19:09:00 +04:00
parent f2298c83e8
commit cb8a385d0d
5 changed files with 9 additions and 11 deletions
@@ -291,6 +291,7 @@ public class GridImpl extends Wrapper implements Grid, Disposable, DataProvider
break;
case bottom:
mySplitter.setProportion(tab.getBottomProportion());
break;
case center:
break;
}
@@ -18,13 +18,13 @@ package com.intellij.usages.impl;
import com.intellij.icons.AllIcons;
import com.intellij.usageView.UsageViewBundle;
import com.intellij.usages.UsageViewSettings;
import org.jetbrains.annotations.NotNull;
/**
* @author cdr
*/
class PreviewUsageAction extends RuleAction {
PreviewUsageAction(UsageViewImpl usageView) {
PreviewUsageAction(@NotNull UsageViewImpl usageView) {
super(usageView, UsageViewBundle.message("preview.usages.action.text"), AllIcons.Actions.Preview);
}
@@ -21,6 +21,7 @@ import com.intellij.openapi.actionSystem.ToggleAction;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.usages.rules.UsageFilteringRuleProvider;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -28,11 +29,11 @@ import javax.swing.*;
* @author Eugene Zhuravlev
* Date: Jan 19, 2005
*/
public abstract class RuleAction extends ToggleAction implements DumbAware {
abstract class RuleAction extends ToggleAction implements DumbAware {
private final UsageViewImpl myView;
private boolean myState;
public RuleAction(UsageViewImpl view, final String text, final Icon icon) {
RuleAction(@NotNull UsageViewImpl view, @NotNull String text, @NotNull Icon icon) {
super(text, null, icon);
myView = view;
myState = getOptionValue();
@@ -58,6 +58,7 @@ public class UsageTargetNode extends Node {
return myTarget.getPresentation().getPresentableText();
}
@NotNull
public UsageTarget getTarget() {
return myTarget;
}
@@ -23,24 +23,19 @@ public interface NullableComponent {
boolean isNull();
class Check {
private Check() {
}
public static boolean isNull(Component c) {
if (c == null) return true;
if (c instanceof NullableComponent) return ((NullableComponent)c).isNull();
return false;
return c == null || c instanceof NullableComponent && ((NullableComponent)c).isNull();
}
public static boolean isNullOrHidden(Component c) {
if (c != null && !c.isShowing()) return true;
return isNull(c);
return c != null && !c.isShowing() || isNull(c);
}
public static boolean isNotNullAndVisible(Component c) {
return !isNull(c) && c.isVisible();
}
}
}