예제 #1
0
        private void handleKey(final KeyEvent e) {
          int modifiers = e.getModifiers();
          if (modifiers == myStoredModifiers) {
            return;
          }

          BrowseMode browseMode = getBrowseMode(modifiers);

          if (browseMode != BrowseMode.None) {
            TooltipProvider tooltipProvider = myTooltipProvider;
            if (tooltipProvider != null) {
              if (browseMode != tooltipProvider.getBrowseMode()) {
                disposeHighlighter();
              }
              myStoredModifiers = modifiers;
              cancelPreviousTooltip();
              myTooltipProvider =
                  new TooltipProvider(tooltipProvider.myEditor, tooltipProvider.myPosition);
              myTooltipProvider.execute(browseMode);
            }
          } else {
            disposeHighlighter();
            cancelPreviousTooltip();
          }
        }
예제 #2
0
        private void handleKey(final KeyEvent e) {
          int modifiers = e.getModifiers();
          if (modifiers == myStoredModifiers) {
            return;
          }

          BrowseMode browseMode = getBrowseMode(modifiers);

          if (browseMode != BrowseMode.None) {
            if (myTooltipProvider != null) {
              if (browseMode != myTooltipProvider.getBrowseMode()) {
                disposeHighlighter();
              }
              myStoredModifiers = modifiers;
              myTooltipProvider.execute(browseMode);
            }
          } else {
            disposeHighlighter();
            myTooltipProvider = null;
          }
        }