Examples of IContext


Examples of net.sourceforge.rtf.template.IContext

            putDefaultFormat(request, rtfTemplate);
           
            /**
             * 5. Create a common inner context - not required but showing how common context values can be re-used
             */
            IContext ctx = rtfTemplate.getTemplateEngine().newContext();
            putGlobalContext(request, ctx);
           
            /**
             * 6. Set the template
             */
View Full Code Here

Examples of org.eclipse.dltk.ti.IContext

public class PDTTypeInferenceUtils {
  private static final IType[] EMPTY_TYPES = new IType[] {};
  private static final PHPTypeInferencer TYPE_INFERENCER = new PHPTypeInferencer();

  public static IType[] getTypes(ASTNode expression, ISourceModule sourceModule) {
    IContext context = ASTUtils.findContext(sourceModule, SourceParserUtil.getModuleDeclaration(sourceModule), expression.sourceStart());
    if (context != null) {
      IType[] types = getTypes(new PHPTypeInferencer().evaluateType(new ExpressionTypeGoal(context, expression)), context, expression.sourceStart());
      if (types != null) {
        return types;
      }
View Full Code Here

Examples of org.eclipse.dltk.ti.IContext

  }

  public static IType[] getTypes(PHPCallExpression expression, ISourceModule sourceModule) {
    IType[] receiverTypes = getTypes(expression.getReceiver(), sourceModule);
    if (receiverTypes != null && receiverTypes.length > 0) {
      IContext context = ASTUtils.findContext(sourceModule, SourceParserUtil.getModuleDeclaration(sourceModule), expression.sourceStart());
      if (expression.getArgs() instanceof PHPCallArgumentsList && ((PHPCallArgumentsList) expression.getArgs()).getArrayDereferenceList() != null) {
        return getFunctionArrayReturnTypes(expression, sourceModule, receiverTypes, context);
      } else {
        return getFunctionReturnTypes(expression, sourceModule, receiverTypes, context);
      }
View Full Code Here

Examples of org.eclipse.help.IContext

    action.setHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent event) {
        if (contexts != null && contexts.length > 0
            && getHelpUI() != null) {
          // determine the context
          IContext context = null;
          if (contexts[0] instanceof String) {
            context = HelpSystem.getContext((String) contexts[0]);
          } else if (contexts[0] instanceof IContext) {
            context = (IContext) contexts[0];
          }
View Full Code Here

Examples of org.eclipse.help.IContext

      public void helpRequested(HelpEvent event) {
        Object[] helpContexts = computer.computeContexts(event);
        if (helpContexts != null && helpContexts.length > 0
            && getHelpUI() != null) {
          // determine the context
          IContext context = null;
          if (helpContexts[0] instanceof String) {
            context = HelpSystem
                .getContext((String) helpContexts[0]);
          } else if (helpContexts[0] instanceof IContext) {
            context = (IContext) helpContexts[0];
View Full Code Here

Examples of org.eclipse.help.IContext

    // final String contextId = command.getHelpId();
    final String contextId = ""; //$NON-NLS-1$
    return new HelpListener() {
      public void helpRequested(HelpEvent event) {
        if (getHelpUI() != null) {
          IContext context = HelpSystem.getContext(contextId);
          if (context != null) {
            Point point = computePopUpLocation(event.widget
                .getDisplay());
            displayContext(context, point.x, point.y);
          }
View Full Code Here

Examples of org.eclipse.help.IContext

   * (non-Javadoc)
   *
   * @see org.eclipse.ui.help.IWorkbenchHelpSystem#displayHelp(java.lang.String)
   */
  public void displayHelp(String contextId) {
    IContext context = HelpSystem.getContext(contextId);
    if (context != null) {
      Point point = computePopUpLocation(Display.getCurrent());
      displayContext(context, point.x, point.y);
    }
  }
View Full Code Here

Examples of org.eclipse.help.IContext

   */
  public void setHelp(final IAction action, final String contextId) {
    action.setHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent event) {
        if (getHelpUI() != null) {
          IContext context = HelpSystem.getContext(contextId);
          if (context != null) {
            Point point = computePopUpLocation(event.widget
                .getDisplay());
            displayContext(new ContextWithTitle(context, action.getText()), point.x, point.y);
          }
View Full Code Here

Examples of org.eclipse.help.IContext

      Object object = event.widget.getData(HELP_KEY);

      // Since 2.0 we can expect that object is a String, however
      // for backward compatability we handle context computers and
      // arrays.
      IContext context = null;
      if (object instanceof String) {
        // context id - this is the norm
        context = HelpSystem.getContext((String) object);
      } else if (object instanceof IContext) {
        // already resolved context (pre 2.0)
View Full Code Here

Examples of org.eclipse.help.IContext

    }

    /** @deprecated */
    public void displayContext(String contextId, int x, int y) {
      // convenience method - funnel through the real method
      IContext context = HelpSystem.getContext(contextId);
      if (context != null) {
        displayContext(context, x, y);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.