javax.swing.text.html.ImageView#com.intellij.ide.DataManager源码实例Demo

下面列出了javax.swing.text.html.ImageView#com.intellij.ide.DataManager 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: consulo   文件: BranchActionGroupPopup.java
public BranchActionGroupPopup(@Nonnull String title, @Nonnull Project project, @Nonnull Condition<AnAction> preselectActionCondition, @Nonnull ActionGroup actions, @Nullable String dimensionKey) {
  super(title, createBranchSpeedSearchActionGroup(actions), SimpleDataContext.getProjectContext(project), preselectActionCondition, true);
  myProject = project;
  DataManager.registerDataProvider(getList(), dataId -> POPUP_MODEL == dataId ? getListModel() : null);
  myKey = dimensionKey;
  if (myKey != null) {
    Dimension storedSize = WindowStateService.getInstance(myProject).getSizeFor(myProject, myKey);
    if (storedSize != null) {
      //set forced size before component is shown
      setSize(storedSize);
      myUserSizeChanged = true;
    }
    createTitlePanelToolbar(myKey);
  }
  myMeanRowHeight = getList().getCellBounds(0, 0).height + UIUtil.getListCellVPadding() * 2;
}
 
源代码2 项目: flutter-intellij   文件: WidgetEditToolbar.java
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
  final AnAction action = ActionManager.getInstance().getAction("Flutter.ExtractWidget");
  if (action != null) {
    TransactionGuard.submitTransaction(project, () -> {
      final Editor editor = getCurrentEditor();
      if (editor == null) {
        // It is a race condition if we hit this. Gracefully assume
        // the action has just been canceled.
        return;
      }
      final JComponent editorComponent = editor.getComponent();
      final DataContext editorContext = DataManager.getInstance().getDataContext(editorComponent);
      final AnActionEvent editorEvent = AnActionEvent.createFromDataContext(ActionPlaces.UNKNOWN, null, editorContext);

      action.actionPerformed(editorEvent);
    });
  }
}
 
源代码3 项目: consulo   文件: PathEditor.java
private VirtualFile[] doAdd() {
  VirtualFile baseDir = myAddBaseDir;
  Project project = DataManager.getInstance().getDataContext(myComponent).getData(CommonDataKeys.PROJECT);
  if (baseDir == null && project != null) {
    baseDir = project.getBaseDir();
  }
  VirtualFile[] files = FileChooser.chooseFiles(myDescriptor, myComponent, project, baseDir);
  files = adjustAddedFileSet(myComponent, files);
  List<VirtualFile> added = new ArrayList<VirtualFile>(files.length);
  for (VirtualFile vFile : files) {
    if (addElement(vFile)) {
      added.add(vFile);
    }
  }
  return VfsUtil.toVirtualFileArray(added);
}
 
源代码4 项目: consulo   文件: NavBarUpdateQueue.java
private void requestModelUpdateFromContextOrObject(DataContext dataContext, Object object) {
  try {
    final NavBarModel model = myPanel.getModel();
    if (dataContext != null) {
      if (dataContext.getData(CommonDataKeys.PROJECT) != myPanel.getProject() || myPanel.isNodePopupActive()) {
        requestModelUpdate(null, myPanel.getContextObject(), true);
        return;
      }
      final Window window = SwingUtilities.getWindowAncestor(myPanel);
      if (window != null && !window.isFocused()) {
        model.updateModel(DataManager.getInstance().getDataContext(myPanel));
      }
      else {
        model.updateModel(dataContext);
      }
    }
    else {
      model.updateModel(object);
    }

    queueRebuildUi();
  }
  finally {
    myModelUpdating.set(false);
  }
}
 
源代码5 项目: consulo   文件: DesktopContentManagerImpl.java
@Override
@Nullable
public Object getData(@Nonnull @NonNls Key<?> dataId) {
  if (PlatformDataKeys.CONTENT_MANAGER == dataId || PlatformDataKeys.NONEMPTY_CONTENT_MANAGER == dataId && getContentCount() > 1) {
    return DesktopContentManagerImpl.this;
  }

  for (DataProvider dataProvider : myDataProviders) {
    Object data = dataProvider.getData(dataId);
    if (data != null) {
      return data;
    }
  }

  if (myUI instanceof DataProvider) {
    return ((DataProvider)myUI).getData(dataId);
  }

  DataProvider provider = DataManager.getDataProvider(this);
  return provider == null ? null : provider.getData(dataId);
}
 
源代码6 项目: consulo   文件: ActionsTree.java
private void reset(final Keymap keymap, final QuickList[] allQuickLists, String filter, @Nullable KeyboardShortcut shortcut) {
  myKeymap = keymap;

  final PathsKeeper pathsKeeper = new PathsKeeper();
  pathsKeeper.storePaths();

  myRoot.removeAllChildren();

  ActionManager actionManager = ActionManager.getInstance();
  Project project = DataManager.getInstance().getDataContext(myComponent).getData(CommonDataKeys.PROJECT);
  Group mainGroup = ActionsTreeUtil.createMainGroup(project, myKeymap, allQuickLists, filter, true, filter != null && filter.length() > 0 ?
                                                                                                    ActionsTreeUtil.isActionFiltered(filter, true) :
                                                                                                    (shortcut != null ? ActionsTreeUtil.isActionFiltered(actionManager, myKeymap, shortcut) : null));
  if ((filter != null && filter.length() > 0 || shortcut != null) && mainGroup.initIds().isEmpty()){
    mainGroup = ActionsTreeUtil.createMainGroup(project, myKeymap, allQuickLists, filter, false, filter != null && filter.length() > 0 ?
                                                                                                 ActionsTreeUtil.isActionFiltered(filter, false) :
                                                                                                 ActionsTreeUtil.isActionFiltered(actionManager, myKeymap, shortcut));
  }
  myRoot = ActionsTreeUtil.createNode(mainGroup);
  myMainGroup = mainGroup;
  MyModel model = (MyModel)myTree.getModel();
  model.setRoot(myRoot);
  model.nodeStructureChanged(myRoot);

  pathsKeeper.restorePaths();
}
 
源代码7 项目: consulo   文件: ButtonToolbarImpl.java
ActionJButton(final AnAction action) {
  super(action.getTemplatePresentation().getText());
  myAction = action;
  setMnemonic(action.getTemplatePresentation().getMnemonic());
  setDisplayedMnemonicIndex(action.getTemplatePresentation().getDisplayedMnemonicIndex());

  addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      AnActionEvent event = new AnActionEvent(null, ((BaseDataManager)DataManager.getInstance()).getDataContextTest(ButtonToolbarImpl.this), myPlace, myPresentationFactory.getPresentation(action),
                                              ActionManager.getInstance(), e.getModifiers());
      if (ActionUtil.lastUpdateAndCheckDumb(action, event, false)) {
        ActionUtil.performActionDumbAware(action, event);
      }
    }
  });

}
 
源代码8 项目: consulo   文件: CloseActiveTabAction.java
public void actionPerformed(AnActionEvent e) {
  ContentManager contentManager = ContentManagerUtil.getContentManagerFromContext(e.getDataContext(), true);
  boolean processed = false;
  if (contentManager != null && contentManager.canCloseContents()) {
    final Content selectedContent = contentManager.getSelectedContent();
    if (selectedContent != null && selectedContent.isCloseable()) {
      contentManager.removeContent(selectedContent, true);
      processed = true;
    }
  }

  if (!processed && contentManager != null) {
    final DataContext context = DataManager.getInstance().getDataContext(contentManager.getComponent());
    final ToolWindow tw = context.getData(PlatformDataKeys.TOOL_WINDOW);
    if (tw != null) {
      tw.hide(null);
    }
  }
}
 
源代码9 项目: consulo   文件: MacOSDefaultMenuInitializer.java
@Inject
@ReviewAfterMigrationToJRE(9)
public MacOSDefaultMenuInitializer(AboutManager aboutManager, DataManager dataManager, WindowManager windowManager) {
  myAboutManager = aboutManager;
  myDataManager = dataManager;
  myWindowManager = windowManager;
  if (SystemInfo.isMac) {
    try {
      ThrowableRunnable<Throwable> task = SystemInfo.isJavaVersionAtLeast(9) ? new Java9Worker(this::showAbout) : new PreJava9Worker(this::showAbout);

      task.run();

      installAutoUpdateMenu();
    }
    catch (Throwable t) {
      LOGGER.warn(t);
    }
  }
}
 
源代码10 项目: consulo   文件: XDebuggerEditorBase.java
private ListPopup createLanguagePopup() {
  DefaultActionGroup actions = new DefaultActionGroup();
  for (Language language : getSupportedLanguages()) {
    //noinspection ConstantConditions
    actions.add(new AnAction(language.getDisplayName(), null, language.getAssociatedFileType().getIcon()) {
      @RequiredUIAccess
      @Override
      public void actionPerformed(@Nonnull AnActionEvent e) {
        XExpression currentExpression = getExpression();
        setExpression(new XExpressionImpl(currentExpression.getExpression(), language, currentExpression.getCustomInfo()));
        requestFocusInEditor();
      }
    });
  }

  DataContext dataContext = DataManager.getInstance().getDataContext(getComponent());
  return JBPopupFactory.getInstance().createActionGroupPopup("Choose Language", actions, dataContext,
                                                             JBPopupFactory.ActionSelectionAid.SPEEDSEARCH,
                                                             false);
}
 
源代码11 项目: consulo   文件: LightPlatformCodeInsightTestCase.java
protected static DataContext getCurrentEditorDataContext() {
  final DataContext defaultContext = DataManager.getInstance().getDataContext();
  return new DataContext() {
    @Override
    @javax.annotation.Nullable
    public Object getData(@NonNls Key dataId) {
      if (PlatformDataKeys.EDITOR == dataId) {
        return getEditor();
      }
      if (CommonDataKeys.PROJECT == dataId) {
        return getProject();
      }
      if (LangDataKeys.PSI_FILE == dataId) {
        return getFile();
      }
      if (LangDataKeys.PSI_ELEMENT == dataId) {
        PsiFile file = getFile();
        if (file == null) return null;
        Editor editor = getEditor();
        if (editor == null) return null;
        return file.findElementAt(editor.getCaretModel().getOffset());
      }
      return defaultContext.getData(dataId);
    }
  };
}
 
源代码12 项目: ycy-intellij-plugin   文件: RemindStrategy.java
/**
 * {@inheritDoc}
 */
@Override
public void remind() {
    DataManager.getInstance().getDataContextFromFocus()
        .doWhenDone((Consumer<DataContext>) (dataContext -> new OpenImageConsumer().accept(dataContext)))
        .doWhenRejected((Consumer<String>) LOG::error);
}
 
源代码13 项目: consulo   文件: ActionPopupMenuImpl.java
@Override
public void show(final Component component, int x, int y) {
  if (!component.isShowing()) {
    //noinspection HardCodedStringLiteral
    throw new IllegalArgumentException("component must be shown on the screen");
  }

  removeAll();

  // Fill menu. Only after filling menu has non zero size.

  int x2 = Math.max(0, Math.min(x, component.getWidth() - 1)); // fit x into [0, width-1]
  int y2 = Math.max(0, Math.min(y, component.getHeight() - 1)); // fit y into [0, height-1]

  myContext = myDataContextProvider != null ? myDataContextProvider.get() : DataManager.getInstance().getDataContext(component, x2, y2);
  Utils.fillMenu(myGroup, this, true, myPresentationFactory, myContext, myPlace, false, false, LaterInvocator.isInModalContext());
  if (getComponentCount() == 0) {
    return;
  }
  if (myApp != null) {
    if (myApp.isActive()) {
      Component frame = UIUtil.findUltimateParent(component);
      if (frame instanceof Window) {
        consulo.ui.Window uiWindow = TargetAWT.from((Window)frame);
        myFrame = uiWindow.getUserData(IdeFrame.KEY);
      }
      myConnection = myApp.getMessageBus().connect();
      myConnection.subscribe(ApplicationActivationListener.TOPIC, ActionPopupMenuImpl.this);
    }
  }

  super.show(component, x, y);
}
 
源代码14 项目: consulo   文件: SelectWordHandler.java
@Override
public void execute(@Nonnull Editor editor, DataContext dataContext) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("enter: execute(editor='" + editor + "')");
  }
  Project project = DataManager.getInstance().getDataContext(editor.getComponent()).getData(CommonDataKeys.PROJECT);
  if (project == null) {
    if (myOriginalHandler != null) {
      myOriginalHandler.execute(editor, dataContext);
    }
    return;
  }
  PsiDocumentManager.getInstance(project).commitAllDocuments();

  TextRange range = selectWord(editor, project);
  if (editor instanceof EditorWindow) {
    if (range == null || !isInsideEditableInjection((EditorWindow)editor, range, project) || TextRange.from(0, editor.getDocument().getTextLength()).equals(
            new TextRange(editor.getSelectionModel().getSelectionStart(), editor.getSelectionModel().getSelectionEnd()))) {
      editor = ((EditorWindow)editor).getDelegate();
      range = selectWord(editor, project);
    }
  }
  if (range == null) {
    if (myOriginalHandler != null) {
      myOriginalHandler.execute(editor, dataContext);
    }
  }
  else {
    editor.getSelectionModel().setSelection(range.getStartOffset(), range.getEndOffset());
  }
}
 
源代码15 项目: CppTools   文件: ExtractFunctionDialog.java
private void createUIComponents() {
  functionMethodNameTextField = new NameSuggestionsField(
    new String[] {"fun"},
    (Project) DataManager.getInstance().getDataContext().getData(DataConstants.PROJECT),
    CppSupportLoader.CPP_FILETYPE
  );
}
 
源代码16 项目: consulo   文件: RunDashboardContent.java
private JComponent createToolbar() {
  JPanel toolBarPanel = new JPanel(new GridLayout());
  DefaultActionGroup leftGroup = new DefaultActionGroup();
  leftGroup.add(ActionManager.getInstance().getAction(RUN_DASHBOARD_TOOLBAR));
  // TODO [konstantin.aleev] provide context help ID
  //leftGroup.add(new Separator());
  //leftGroup.add(new ContextHelpAction(HELP_ID));

  ActionToolbar leftActionToolBar = ActionManager.getInstance().createActionToolbar(PLACE_TOOLBAR, leftGroup, false);
  toolBarPanel.add(leftActionToolBar.getComponent());

  myTree.putClientProperty(DataManager.CLIENT_PROPERTY_DATA_PROVIDER, new DataProvider() {
    @Override
    public Object getData(@Nonnull @NonNls Key dataId) {
      if (KEY == dataId) {
        return RunDashboardContent.this;
      }
      return null;
    }
  });
  leftActionToolBar.setTargetComponent(myTree);

  DefaultActionGroup rightGroup = new DefaultActionGroup();

  TreeExpander treeExpander = new DefaultTreeExpander(myTree);
  AnAction expandAllAction = CommonActionsManager.getInstance().createExpandAllAction(treeExpander, this);
  rightGroup.add(expandAllAction);

  AnAction collapseAllAction = CommonActionsManager.getInstance().createCollapseAllAction(treeExpander, this);
  rightGroup.add(collapseAllAction);

  rightGroup.add(new AnSeparator());
  myGroupers.stream().filter(grouper -> !grouper.getRule().isAlwaysEnabled()).forEach(grouper -> rightGroup.add(new GroupAction(grouper)));

  ActionToolbar rightActionToolBar = ActionManager.getInstance().createActionToolbar(PLACE_TOOLBAR, rightGroup, false);
  toolBarPanel.add(rightActionToolBar.getComponent());
  rightActionToolBar.setTargetComponent(myTree);
  return toolBarPanel;
}
 
源代码17 项目: consulo   文件: DesktopWindowWatcher.java
/**
 * This method should get notifications abount changes of focused window.
 * Only <code>focusedWindow</code> property is acceptable.
 *
 * @throws IllegalArgumentException if property name isn't <code>focusedWindow</code>.
 */
@Override
public final void propertyChange(final PropertyChangeEvent e) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("enter: propertyChange(" + e + ")");
  }
  if (!FOCUSED_WINDOW_PROPERTY.equals(e.getPropertyName())) {
    throw new IllegalArgumentException("unknown property name: " + e.getPropertyName());
  }
  synchronized (myLock) {
    final consulo.ui.Window window = TargetAWT.from((Window)e.getNewValue());
    if (window == null || myApplication.isDisposed()) {
      return;
    }
    if (!myWindow2Info.containsKey(window)) {
      myWindow2Info.put(window, new WindowInfo(window, true));
    }
    myFocusedWindow = window;
    final Project project = DataManager.getInstance().getDataContext(myFocusedWindow).getData(CommonDataKeys.PROJECT);
    for (Iterator<consulo.ui.Window> i = myFocusedWindows.iterator(); i.hasNext(); ) {
      final consulo.ui.Window w = i.next();
      final DataContext dataContext = DataManager.getInstance().getDataContext(TargetAWT.to(w));
      if (project == dataContext.getData(CommonDataKeys.PROJECT)) {
        i.remove();
      }
    }
    myFocusedWindows.add(myFocusedWindow);
    // Set new root frame
    final IdeFrame frame = IdeFrameUtil.findRootIdeFrame(window);

    if (frame != null) {
      JOptionPane.setRootFrame((Frame)TargetAWT.to(frame.getWindow()));
    }
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("exit: propertyChange()");
  }
}
 
源代码18 项目: consulo   文件: BaseLabel.java
public BaseLabel(DesktopToolWindowContentUi ui, boolean bold) {
  myUi = ui;
  setOpaque(false);
  myBold = bold;

  DataManager.registerDataProvider(this, dataId -> {
    if (dataId == ToolWindowDataKeys.CONTENT) {
      return getContent();
    }

    return null;
  });
}
 
源代码19 项目: consulo   文件: ConfigurationContext.java
@Nonnull
@RequiredUIAccess
public static ConfigurationContext getFromContext(DataContext dataContext) {
  final ConfigurationContext context = new ConfigurationContext(dataContext);
  final DataManager dataManager = DataManager.getInstance();
  ConfigurationContext sharedContext = dataManager.loadFromDataContext(dataContext, SHARED_CONTEXT);
  if (sharedContext == null ||
      sharedContext.getLocation() == null ||
      context.getLocation() == null ||
      !Comparing.equal(sharedContext.getLocation().getPsiElement(), context.getLocation().getPsiElement())) {
    sharedContext = context;
    dataManager.saveInDataContext(dataContext, SHARED_CONTEXT, sharedContext);
  }
  return sharedContext;
}
 
private Optional<DataContext> getDataContext() {
    try {
        return Optional.ofNullable(
                DataManager.getInstance()
                        .getDataContextFromFocusAsync()
                        .blockingGet(100, TimeUnit.MILLISECONDS));
    } catch (TimeoutException | ExecutionException e) {
        return Optional.empty();
    }

}
 
源代码21 项目: consulo   文件: PopupPositionManager.java
private static Component discoverPopup(final Key<JBPopup> datakey, Component focusOwner) {
  if (focusOwner == null) {
    focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
  }

  if (focusOwner == null) return null;

  final DataContext dataContext = DataManager.getInstance().getDataContext(focusOwner);
  final JBPopup popup = dataContext.getData(datakey);
  if (popup != null && popup.isVisible() && !popup.isDisposed()) {
    return popup.getContent();
  }

  return null;
}
 
源代码22 项目: intellij   文件: BlazeProblemsViewPanel.java
private void scrollToSource(Component tree) {
  DataContext dataContext = DataManager.getInstance().getDataContext(tree);
  getReady(dataContext)
      .doWhenDone(
          () ->
              TransactionGuard.submitTransaction(
                  ApplicationManager.getApplication(),
                  () -> {
                    DataContext context = DataManager.getInstance().getDataContext(tree);
                    Navigatable navigatable = BLAZE_CONSOLE_NAVIGATABLE_DATA_KEY.getData(context);
                    if (navigatable != null) {
                      OpenSourceUtil.navigate(false, true, navigatable);
                    }
                  }));
}
 
源代码23 项目: intellij   文件: ProjectViewEnterHandler.java
private static boolean isApplicable(PsiFile file, DataContext dataContext) {
  if (!(file instanceof ProjectViewPsiFile)) {
    return false;
  }
  Boolean isSplitLine =
      DataManager.getInstance().loadFromDataContext(dataContext, SplitLineAction.SPLIT_LINE_KEY);
  if (isSplitLine != null) {
    return false;
  }
  return true;
}
 
源代码24 项目: intellij   文件: BuildEnterHandler.java
private static boolean isApplicable(PsiFile file, DataContext dataContext) {
  if (!(file instanceof BuildFile)) {
    return false;
  }
  Boolean isSplitLine =
      DataManager.getInstance().loadFromDataContext(dataContext, SplitLineAction.SPLIT_LINE_KEY);
  if (isSplitLine != null) {
    return false;
  }
  return true;
}
 
源代码25 项目: consulo   文件: StructureViewWrapperImpl.java
private void checkUpdate() {
  if (myProject.isDisposed()) return;

  final Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
  final boolean insideToolwindow = SwingUtilities.isDescendingFrom(myToolWindow.getComponent(), owner);
  if (!myFirstRun && (insideToolwindow || JBPopupFactory.getInstance().isPopupActive())) {
    return;
  }

  final DataContext dataContext = DataManager.getInstance().getDataContext(owner);
  if (dataContext.getData(ourDataSelectorKey) == this) return;
  if (dataContext.getData(CommonDataKeys.PROJECT) != myProject) return;

  final VirtualFile[] files = hasFocus() ? null : dataContext.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY);
  if (!myToolWindow.isVisible()) {
    if (files != null && files.length > 0) {
      myFile = files[0];
    }
    return;
  }

  if (files != null && files.length == 1) {
    setFile(files[0]);
  }
  else if (files != null && files.length > 1) {
    setFile(null);
  } else if (myFirstRun) {
    final FileEditorManagerImpl editorManager = (FileEditorManagerImpl)FileEditorManager.getInstance(myProject);
    final List<Pair<VirtualFile, EditorWindow>> history = editorManager.getSelectionHistory();
    if (! history.isEmpty()) {
      setFile(history.get(0).getFirst());
    }
  }

  myFirstRun = false;
}
 
源代码26 项目: intellij   文件: ProjectViewUi.java
/**
 * To support the custom language features, we need a ProjectImpl, and it's not desirable to
 * create one from scratch.<br>
 *
 * @return the current, non-default project, if one exists, else the default project.
 */
public static Project getProject() {
  Project project = (Project) DataManager.getInstance().getDataContext().getData("project");
  if (project != null && project instanceof ProjectImpl) {
    return project;
  }
  return ProjectManager.getInstance().getDefaultProject();
}
 
@Override
@Nonnull
protected JComponent createEditor() {
  JPanel wholePanel = new JPanel(new BorderLayout());

  wholePanel.add(myEditor.getComponent(), BorderLayout.NORTH);
  wholePanel.add(myBeforeLaunchContainer, BorderLayout.SOUTH);

  DataManager.registerDataProvider(wholePanel, new TypeSafeDataProviderAdapter(new MyDataProvider()));
  return wholePanel;
}
 
源代码28 项目: consulo   文件: BranchActionGroupPopup.java
@Override
public void actionPerformed(@Nonnull AnActionEvent e) {
  setExpanded(!myIsExpanded);
  InputEvent event = e.getInputEvent();
  if (event != null && event.getSource() instanceof JComponent) {
    DataProvider dataProvider = DataManager.getDataProvider((JComponent)event.getSource());
    if (dataProvider != null) {
      assertNotNull(dataProvider.getDataUnchecked(POPUP_MODEL)).refilter();
    }
  }
}
 
源代码29 项目: consulo   文件: KeyboardShortcutDialog.java
public KeyboardShortcutDialog(Component component, String actionId, final QuickList[] quickLists) {
  super(component, true);
  setTitle(KeyMapBundle.message("keyboard.shortcut.dialog.title"));
  myActionId = actionId;
  final Project project = DataManager.getInstance().getDataContext(component).getData(CommonDataKeys.PROJECT);
  myMainGroup = ActionsTreeUtil.createMainGroup(project, myKeymap, quickLists, null, false, null); //without current filter
  myEnableSecondKeystroke = new JCheckBox();
  UIUtil.applyStyle(UIUtil.ComponentStyle.SMALL, myEnableSecondKeystroke);
  myEnableSecondKeystroke.setBorder(new EmptyBorder(4, 0, 0, 2));
  myEnableSecondKeystroke.setFocusable(false);
  myKeystrokePreview = new JLabel(" ");
  myConflictInfoArea = new JTextArea("");
  myConflictInfoArea.setFocusable(false);
  init();
}
 
源代码30 项目: consulo   文件: MacrosDialog.java
public MacrosDialog(Component parent) {
  super(parent, true);
  MacroManager.getInstance().cacheMacrosPreview(DataManager.getInstance().getDataContext(parent));
  setTitle(IdeBundle.message("title.macros"));
  setOKButtonText(IdeBundle.message("button.insert"));

  myMacrosModel = new DefaultListModel();
  myMacrosList = new JBList(myMacrosModel);
  myPreviewTextarea = new JTextArea();

  init();
}