Java 类org.eclipse.jface.text.IInformationControlCreator 实例源码

项目:solidity-ide    文件:CustomCSSHelpHoverProvider.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI
            .getTooltipAffordanceString();
    if (BrowserInformationControl.isAvailable(parent)) {
        String font = "org.eclipse.jdt.ui.javadocfont";
        BrowserInformationControl iControl = new BrowserInformationControl(
                parent, font, false) {
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent,
                tooltipAffordanceString);
    }
}
项目:egradle    文件:SimpleBrowserInformationControl.java   
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
    /*
     * Its necessary to implement this - otherwise leaving the origin
     * tooltip area, which does not contain the browser control, will hide
     * the control. It would be nicer if eclipse would have an easier
     * mechanism to reuse the origin control!
     */
    return new IInformationControlCreator() {
        @Override
        public IInformationControl createInformationControl(Shell parent) {
            SimpleBrowserInformationControl newControl = new SimpleBrowserInformationControl(parent, 20);
            newControl.setBrowserEGradleLinkListener(browserEGradleLinkListener);
            return newControl;
        }
    };
}
项目:overviewruler    文件:OpenHandler.java   
private void showQuickAnnotations(final JavaEditor editor) {
  InformationPresenter presenter = new InformationPresenter(new IInformationControlCreator() {
    public IInformationControl createInformationControl(Shell parent) {
      int shellStyle = SWT.RESIZE;
      int treeStyle = SWT.V_SCROLL | SWT.H_SCROLL;
      return new QuickAnnotationInformationControl(parent, shellStyle, treeStyle, editor);
    }
  });

  IInformationProvider provider = new JavaElementProvider(editor, false);
  presenter.setInformationProvider(provider, IDocument.DEFAULT_CONTENT_TYPE);

  presenter.install(editor.getViewer());
  presenter.install(editor.getViewer().getTextWidget());
  presenter.showInformation();
}
项目:typescript.java    文件:HoverControlCreator.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = "Press F2 for focus";
    if (BrowserInformationControl.isAvailable(parent)) {
        String font = JFaceResources.DIALOG_FONT;
        BrowserInformationControl iControl = new BrowserInformationControl(
                parent, font, tooltipAffordanceString) {
            /*
             * @see org.eclipse.jface.text.IInformationControlExtension5#
             * getInformationPresenterControlCreator()
             */
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent,
                tooltipAffordanceString);
    }
}
项目:typescript.java    文件:JavaScriptLightWeightEditor.java   
/**
 * Install everything necessary to get document folding working and enable
 * document folding
 * 
 * @param sourceViewer
 */
private void installProjectionSupport() {

    ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
    fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
    fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
    fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
    fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
        public IInformationControl createInformationControl(Shell parent) {
            return new DefaultInformationControl(parent);
        }
    });
    fProjectionSupport.install();

    if (isFoldingEnabled()) {
        projectionViewer.doOperation(ProjectionViewer.TOGGLE);
    }
}
项目:bts    文件:DefaultEObjectHoverProvider.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = ""; //"Press 'F2' for focus";//EditorsUI.getTooltipAffordanceString();
    if (BrowserInformationControl.isAvailable(parent)) {
        String font = "org.eclipse.jdt.ui.javadocfont"; // FIXME: PreferenceConstants.APPEARANCE_JAVADOC_FONT;
        IXtextBrowserInformationControl iControl = new XtextBrowserInformationControl(parent, font,
                tooltipAffordanceString) {
            /*
             * @see org.eclipse.jface.text.IInformationControlExtension5#getInformationPresenterControlCreator()
             */
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:statecharts    文件:CustomCSSHelpHoverProvider.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI
            .getTooltipAffordanceString();
    if (BrowserInformationControl.isAvailable(parent)) {
        String font = "org.eclipse.jdt.ui.javadocfont";
        BrowserInformationControl iControl = new BrowserInformationControl(
                parent, font, false) {
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent,
                tooltipAffordanceString);
    }
}
项目:eclipse-wtp-json    文件:JSONHoverControlCreator.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = "Press F2 for focus";
    if (BrowserInformationControl.isAvailable(parent)) {
        String font = JFaceResources.DIALOG_FONT;
        BrowserInformationControl iControl = new BrowserInformationControl(
                parent, font, tooltipAffordanceString) {
            /*
             * @see org.eclipse.jface.text.IInformationControlExtension5#
             * getInformationPresenterControlCreator()
             */
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        // addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent,
                tooltipAffordanceString);
    }
}
项目:APICloud-Studio    文件:AdditionalInfoController.java   
/**
 * Creates a new additional information controller.
 * 
 * @param creator
 *            the information control creator to be used by this controller
 * @param delay
 *            time in milliseconds after which additional info should be displayed
 */
AdditionalInfoController(IInformationControlCreator creator, int delay)
{
    super(creator);
    setCloser(new Closer());
    fDelay = delay;
    setAnchor(ANCHOR_RIGHT);
    setFallbackAnchors(new Anchor[] { ANCHOR_RIGHT, ANCHOR_LEFT, ANCHOR_BOTTOM });

    /*
     * Adjust the location by one pixel towards the proposal popup, so that the single pixel border of the
     * additional info popup overlays with the border of the popup. This avoids having a double black line.
     */
    int spacing = -1;
    setMargins(spacing, spacing); // see also adjustment in #computeLocation

    InformationControlReplacer replacer = new InformationControlReplacer(new DefaultPresenterControlCreator());
    getInternalAccessor().setInformationControlReplacer(replacer);
}
项目:APICloud-Studio    文件:AbstractDocumentationHover.java   
public IInformationControl doCreateInformationControl(Shell parent)
{
    if (CustomBrowserInformationControl.isAvailable(parent))
    {
        CustomBrowserInformationControl iControl = new CustomBrowserInformationControl(parent, null,
                EditorsUI.getTooltipAffordanceString())
        {
            public IInformationControlCreator getInformationPresenterControlCreator()
            {
                return informationPresenterControlCreator;
            }
        };
        iControl.setBackgroundColor(getBackgroundColor());
        iControl.setForegroundColor(getForegroundColor());
        return iControl;
    }
    else
    {
        // return new ThemedInformationControl(parent, null, EditorsUI.getTooltipAffordanceString());
        return new DefaultInformationControl(parent, true);
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:JavadocHover.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString= fAdditionalInfoAffordance ? JavaPlugin.getAdditionalInfoAffordanceString() : EditorsUI.getTooltipAffordanceString();
    if (BrowserInformationControl.isAvailable(parent)) {
        String font= PreferenceConstants.APPEARANCE_JAVADOC_FONT;
        BrowserInformationControl iControl= new BrowserInformationControl(parent, font, tooltipAffordanceString) {
            /*
             * @see org.eclipse.jface.text.IInformationControlExtension5#getInformationPresenterControlCreator()
             */
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:eclipse-wtp-webresources    文件:WebResourcesHoverControlCreator.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = "Press F2 for focus";
    if (BrowserInformationControl.isAvailable(parent)) {
        String font = JFaceResources.DIALOG_FONT;
        BrowserInformationControl iControl = new BrowserInformationControl(
                parent, font, tooltipAffordanceString) {
            /*
             * @see org.eclipse.jface.text.IInformationControlExtension5#
             * getInformationPresenterControlCreator()
             */
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent,
                tooltipAffordanceString);
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavadocHover.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString= fAdditionalInfoAffordance ? JavaPlugin.getAdditionalInfoAffordanceString() : EditorsUI.getTooltipAffordanceString();
    if (BrowserInformationControl.isAvailable(parent)) {
        String font= PreferenceConstants.APPEARANCE_JAVADOC_FONT;
        BrowserInformationControl iControl= new BrowserInformationControl(parent, font, tooltipAffordanceString) {
            /*
             * @see org.eclipse.jface.text.IInformationControlExtension5#getInformationPresenterControlCreator()
             */
            @Override
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        addLinkListener(iControl);
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:eclipse-bash-editor    文件:BashTextHover.java   
@Override
public IInformationControlCreator getHoverControlCreator() {
    if (creator == null) {
        creator = new GradleTextHoverControlCreator();
    }
    return creator;
}
项目:eclipse-bash-editor    文件:ReducedBrowserInformationControl.java   
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
    return new IInformationControlCreator() {
        @Override
        public IInformationControl createInformationControl(Shell parent) {
            ReducedBrowserInformationControl newControl = new ReducedBrowserInformationControl(parent);
            return newControl;
        }
    };
}
项目:pgcodekeeper    文件:SQLEditorTextHover.java   
@Override
public IInformationControlCreator getHoverControlCreator() {
    return new IInformationControlCreator() {
        @Override
        public IInformationControl createInformationControl(Shell parent) {
            return new DefaultInformationControl(parent, EditorsUI.getTooltipAffordanceString());
        }
    };
}
项目:egradle    文件:GradleCompletionProposal.java   
@Override
public IInformationControlCreator getInformationControlCreator() {
    if (informationControlCreator == null) {
        informationControlCreator=new EGradleInformationControlCreator();
    }
    return informationControlCreator;
}
项目:egradle    文件:GradleTextHover.java   
@Override
public IInformationControlCreator getHoverControlCreator() {
    if (creator == null) {
        creator = new GradleTextHoverControlCreator();
    }
    return creator;
}
项目:DarwinSPL    文件:DwprofileTextHover.java   
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    if (de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl.isAvailable(parent)) {
        de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl iControl = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:DarwinSPL    文件:HyexpressionTextHover.java   
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    if (eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl.isAvailable(parent)) {
        eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl iControl = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:DarwinSPL    文件:HyvalidityformulaTextHover.java   
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    if (eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl.isAvailable(parent)) {
        eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl iControl = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:DarwinSPL    文件:HydatavalueTextHover.java   
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    if (eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl.isAvailable(parent)) {
        eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl iControl = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:DarwinSPL    文件:HymappingTextHover.java   
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    if (eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl.isAvailable(parent)) {
        eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl iControl = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:DarwinSPL    文件:HyconstraintsTextHover.java   
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    if (eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl.isAvailable(parent)) {
        eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl iControl = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:DarwinSPL    文件:HymanifestTextHover.java   
public IInformationControl doCreateInformationControl(Shell parent) {
    String tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
    if (eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl.isAvailable(parent)) {
        eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl iControl = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestBrowserInformationControl(parent, FONT, tooltipAffordanceString) {
            public IInformationControlCreator getInformationPresenterControlCreator() {
                return fInformationPresenterControlCreator;
            }
        };
        return iControl;
    } else {
        return new DefaultInformationControl(parent, tooltipAffordanceString);
    }
}
项目:http4e    文件:HConfiguration.java   
/**
 * @Override
 */
public IInformationControlCreator getInformationControlCreator( ISourceViewer sourceViewer){
   return new IInformationControlCreator() {
      public IInformationControl createInformationControl( Shell parent){
         return new DefaultInformationControl(parent, getInformationPresenter());
      }
   };
}
项目:texlipse    文件:TexSourceViewerConfiguration.java   
public IInformationControlCreator getInformationControlCreator
(ISourceViewer sourceViewer) {
    return new IInformationControlCreator() {
        public IInformationControl createInformationControl(Shell parent) {
            return new DefaultInformationControl(parent, presenter);
        }
    };
}
项目:ncl30-eclipse    文件:NCLInformationControl.java   
public IInformationControlCreator getInformationPresenterControlCreator() {
    return new IInformationControlCreator() {

        public IInformationControl createInformationControl(Shell parent) {
            return new NCLInformationControl(parent, true);
        }
    };
}
项目:ncl30-eclipse    文件:NCLConfiguration.java   
/**
 * TODO: This function must be reimplemented to return a
 * NCLHoverInformationControl
 */

public IInformationControlCreator getInformationControlCreator(
        ISourceViewer sourceViewer) {

    return new IInformationControlCreator() {
        public IInformationControl createInformationControl(Shell parent) {
            // return new DefaultInformationControl(parent); return new
            return new NCLInformationControl(parent, false);
        }
    };

}
项目:fluentmark    文件:FluentMkSourceViewerInfoControl.java   
public IInformationControlCreator getInformationPresenterControlCreator() {
    return new IInformationControlCreator() {

        @Override
        public IInformationControl createInformationControl(Shell parent) {
            return new FluentMkSourceViewerInfoControl(parent, true, orientation, null);
        }
    };
}
项目:fluentmark    文件:FluentMkTextHover.java   
@Override
public IInformationControlCreator getHoverControlCreator() {
    return new IInformationControlCreator() {

        @Override
        public IInformationControl createInformationControl(Shell parent) {
            return new DefaultInformationControl(parent, EditorsUI.getTooltipAffordanceString());
        }
    };
}
项目:typescript.java    文件:TypeScriptCompletionProposal.java   
@Override
public IInformationControlCreator getInformationControlCreator() {
    Shell shell = getActiveWorkbenchShell();
    if (shell == null || !BrowserInformationControl.isAvailable(shell))
        return null;
    if (tsControlCreator == null) {
        PresenterControlCreator presenterControlCreator = new PresenterControlCreator();
        tsControlCreator = new HoverControlCreator(presenterControlCreator, true);
    }
    return tsControlCreator;
}
项目:typescript.java    文件:TypeScriptBrowserInformationControl.java   
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
    // Hack: We don't wan't to have auto-enrichment when the mouse moves
    // into the hover,
    // but we do want F2 to persist the hover. The framework has no way to
    // distinguish the
    // two requests, so we have to implement this aspect.
    for (StackTraceElement element : Thread.currentThread().getStackTrace()) {
        if ("canMoveIntoInformationControl".equals(element.getMethodName()) //$NON-NLS-1$
                && "org.eclipse.jface.text.AbstractHoverInformationControlManager".equals(element.getClassName())) //$NON-NLS-1$
            return null; // do not enrich bracket hover
    }
    return super.getInformationPresenterControlCreator();
}
项目:typescript.java    文件:AbstractTypeScriptHover.java   
@Override
public IInformationControlCreator getHoverControlCreator() {
    return new IInformationControlCreator() {
        @Override
        public IInformationControl createInformationControl(Shell parent) {
            return new DefaultInformationControl(parent, EditorsUI.getTooltipAffordanceString());
        }
    };
}
项目:typescript.java    文件:AbstractTypeScriptHover.java   
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
    return new IInformationControlCreator() {
        @Override
        public IInformationControl createInformationControl(Shell shell) {
            return new DefaultInformationControl(shell, true);
        }
    };
}
项目:typescript.java    文件:AbstractAnnotationHover.java   
@Override
public IInformationControl doCreateInformationControl(Shell parent) {
    return new AnnotationInformationControl(parent, EditorsUI.getTooltipAffordanceString()) {
        /*
         * @see org.eclipse.jface.text.IInformationControlExtension5#
         * getInformationPresenterControlCreator()
         */
        @Override
        public IInformationControlCreator getInformationPresenterControlCreator() {
            return fPresenterControlCreator;
        }
    };
}
项目:typescript.java    文件:CodeTemplateSourceViewerConfiguration.java   
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {

        IPreferenceStore store= JavaScriptPlugin.getDefault().getPreferenceStore();
        JavaScriptTextTools textTools= JavaScriptPlugin.getDefault().getJavaTextTools();
        IColorManager manager= textTools.getColorManager();                 


        ContentAssistant assistant= new ContentAssistant();
        assistant.setContentAssistProcessor(fProcessor, IDocument.DEFAULT_CONTENT_TYPE);
            // Register the same processor for strings and single line comments to get code completion at the start of those partitions.
        assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_STRING);
        assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_CHARACTER);
        assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_SINGLE_LINE_COMMENT);
        assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_MULTI_LINE_COMMENT);
        assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVASCRIPT_TEMPLATE_LITERAL);
        assistant.setContentAssistProcessor(fProcessor, IJavaScriptPartitions.JAVA_DOC);

        assistant.enableAutoInsert(store.getBoolean(PreferenceConstants.CODEASSIST_AUTOINSERT));
        assistant.enableAutoActivation(store.getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION));
        assistant.setAutoActivationDelay(store.getInt(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY));
        assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
        assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
        assistant.setInformationControlCreator(new IInformationControlCreator() {
            public IInformationControl createInformationControl(Shell parent) {
                return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true));
            }
        });

        Color background= getColor(store, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, manager);            
        assistant.setContextInformationPopupBackground(background);
        assistant.setContextSelectorBackground(background);
        assistant.setProposalSelectorBackground(background);

        Color foreground= getColor(store, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, manager);
        assistant.setContextInformationPopupForeground(foreground);
        assistant.setContextSelectorForeground(foreground);
        assistant.setProposalSelectorForeground(foreground);

        return assistant;
    }
项目:typescript.java    文件:TypeScriptSourceViewerConfiguration.java   
/**
 * Returns the outline presenter control creator. The creator is a factory
 * creating outline presenter controls for the given source viewer. This
 * implementation always returns a creator for
 * <code>JavaOutlineInformationControl</code> instances.
 *
 * @param sourceViewer
 *            the source viewer to be configured by this configuration
 * @param commandId
 *            the ID of the command that opens this control
 * @return an information control creator
 *
 */
private IInformationControlCreator getOutlinePresenterControlCreator(final ISourceViewer sourceViewer,
        final String commandId) {
    return new IInformationControlCreator() {
        public IInformationControl createInformationControl(final Shell parent) {
            int shellStyle = SWT.RESIZE;
            try {
                return new TypeScriptQuickOutlineDialog(parent, shellStyle, getTypeScriptFile());
            } catch (Exception e) {
                return null;
            }
        }
    };
}
项目:typescript.java    文件:TypeScriptSourceViewerConfiguration.java   
/**
 * Returns the implementation presenter control creator. The creator is a
 * factory creating implementation presenter controls for the given source
 * viewer.
 *
 * @param sourceViewer
 *            the source viewer to be configured by this configuration
 * @param commandId
 *            the ID of the command that opens this control
 * @return an information control creator
 *
 */
private IInformationControlCreator getImplementationPresenterControlCreator(final ISourceViewer sourceViewer) {
    return new IInformationControlCreator() {
        public IInformationControl createInformationControl(final Shell parent) {
            try {
                int shellStyle = SWT.RESIZE;
                return new TypeScriptImplementationDialog(parent, shellStyle, getTypeScriptFile());
            } catch (Exception e) {
                return null;
            }
        }
    };
}
项目:bts    文件:AnnotationWithQuickFixesHover.java   
@Override
        public IInformationControl doCreateInformationControl(Shell parent) {
//          String str = EditorsUI.getTooltipAffordanceString();
//          System.out.println(str);
            return new AnnotationInformationControl(parent, "Tooltip"){ //EditorsUI.getTooltipAffordanceString()) { // XXX cp uncommented

                @Override
                public IInformationControlCreator getInformationPresenterControlCreator() {
                    return fPresenterControlCreator;
                }
            };
        }