Exemplo n.º 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();
          }
        }
Exemplo n.º 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;
          }
        }