2 * Copyright 2000-2012 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.intellij.application.options.codeStyle.arrangement;
18 import com.intellij.application.options.codeStyle.arrangement.match.ArrangementMatchingRulesControl;
19 import com.intellij.openapi.actionSystem.DataKey;
20 import com.intellij.util.Consumer;
21 import com.intellij.util.NotNullFunction;
22 import org.jetbrains.annotations.NonNls;
25 * @author Denis Zhdanov
26 * @since 8/13/12 11:48 AM
28 public class ArrangementConstants {
30 public static final DataKey<ArrangementMatchingRulesControl> MATCHING_RULES_CONTROL_KEY = DataKey.create("Arrangement.RuleEditor");
32 @NonNls public static final String ACTION_GROUP_MATCHING_RULES_CONTEXT_MENU = "Arrangement.Rule.Match.Control.Context.Menu";
33 @NonNls public static final String ACTION_GROUP_MATCHING_RULES_CONTROL_TOOLBAR = "Arrangement.Rule.Match.Control.ToolBar";
35 @NonNls public static final String RULE_EDITOR_PLACE = "Arrangement.RuleEditor.Place";
36 @NonNls public static final String MATCHING_RULES_CONTROL_TOOLBAR_PLACE = "Arrangement.Rule.Match.Control.ToolBar.Place";
37 @NonNls public static final String MATCHING_RULES_CONTROL_PLACE = "Arrangement.Rule.Match.Control.Place";
39 public static final int HORIZONTAL_PADDING = 8;
40 public static final int VERTICAL_PADDING = 4;
41 public static final int HORIZONTAL_GAP = 5;
42 public static final int VERTICAL_GAP = 3;
43 public static final int CALLOUT_BORDER_HEIGHT = 10;
44 public static final int BORDER_ARC_SIZE = 12;
46 public static final int ANIMATION_ITERATION_PIXEL_STEP = 5;
47 public static final int ANIMATION_STEPS_TIME_GAP_MILLIS = 40;
49 public static final boolean LOG_RULE_MODIFICATION = Boolean.parseBoolean(System.getProperty("log.arrangement.rule.modification"));
51 public static final DataKey<NotNullFunction<Boolean/* move up? */, Boolean/* is enabled */>> UPDATE_MOVE_RULE_FUNCTION_KEY
52 = DataKey.create("Arrangement.Rule.Function.Update.Move");
53 public static final DataKey<Consumer<Boolean/* move up? */>> MOVE_RULE_FUNCTION_KEY = DataKey.create("Arrangement.Rule.Function.Move");
55 private ArrangementConstants() {