Examples of IParser


Examples of org.eclipse.gmf.runtime.common.ui.services.parser.IParser

    IAdaptable hintAdapter = new OntoUML.diagram.providers.OntoUMLParserProvider.HintAdapter(
        OntoUML.diagram.providers.OntoUMLElementTypes.ClassifierAtom_4018,
        (view.getElement() != null ? view.getElement() : view),
        OntoUML.diagram.part.OntoUMLVisualIDRegistry
            .getType(OntoUML.diagram.edit.parts.ClassifierAtomNameEditPart.VISUAL_ID));
    IParser parser = ParserService.getInstance().getParser(hintAdapter);

    if (parser != null) {
      return parser.getPrintString(hintAdapter, ParserOptions.NONE
          .intValue());
    } else {
      OntoUML.diagram.part.OntoUMLDiagramEditorPlugin.getInstance()
          .logError("Parser was not found for label " + 6021); //$NON-NLS-1$
      return ""; //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.ui.services.parser.IParser

    return new ICellEditorValidator() {

      public String isValid(final Object value) {
        if (value instanceof String) {
          final EObject element = getParserElement();
          final IParser parser = getParser();
          try {
            IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
                .runExclusive(new RunnableWithResult.Impl() {

                  public void run() {
                    setResult(parser.isValidEditString(
                        new EObjectAdapter(element),
                        (String) value));
                  }
                });
            return valid.getCode() == ParserEditStatus.EDITABLE ? null
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.ui.services.parser.IParser

    return new ICellEditorValidator() {

      public String isValid(final Object value) {
        if (value instanceof String) {
          final EObject element = getParserElement();
          final IParser parser = getParser();
          try {
            IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
                .runExclusive(new RunnableWithResult.Impl() {

                  public void run() {
                    setResult(parser.isValidEditString(
                        new EObjectAdapter(element),
                        (String) value));
                  }
                });
            return valid.getCode() == ParserEditStatus.EDITABLE ? null
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.ui.services.parser.IParser

    return new ICellEditorValidator() {

      public String isValid(final Object value) {
        if (value instanceof String) {
          final EObject element = getParserElement();
          final IParser parser = getParser();
          try {
            IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
                .runExclusive(new RunnableWithResult.Impl() {

                  public void run() {
                    setResult(parser.isValidEditString(
                        new EObjectAdapter(element),
                        (String) value));
                  }
                });
            return valid.getCode() == ParserEditStatus.EDITABLE ? null
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.ui.services.parser.IParser

    return new ICellEditorValidator() {

      public String isValid(final Object value) {
        if (value instanceof String) {
          final EObject element = getParserElement();
          final IParser parser = getParser();
          try {
            IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
                .runExclusive(new RunnableWithResult.Impl() {

                  public void run() {
                    setResult(parser.isValidEditString(
                        new EObjectAdapter(element),
                        (String) value));
                  }
                });
            return valid.getCode() == ParserEditStatus.EDITABLE ? null
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.ui.services.parser.IParser

    return new ICellEditorValidator() {

      public String isValid(final Object value) {
        if (value instanceof String) {
          final EObject element = getParserElement();
          final IParser parser = getParser();
          try {
            IParserEditStatus valid = (IParserEditStatus) getEditingDomain()
                .runExclusive(new RunnableWithResult.Impl() {

                  public void run() {
                    setResult(parser.isValidEditString(
                        new EObjectAdapter(element),
                        (String) value));
                  }
                });
            return valid.getCode() == ParserEditStatus.EDITABLE ? null
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.ui.services.parser.IParser

    IAdaptable hintAdapter = new OntoUML.diagram.providers.OntoUMLParserProvider.HintAdapter(
        OntoUML.diagram.providers.OntoUMLElementTypes.Category_2001,
        (view.getElement() != null ? view.getElement() : view),
        OntoUML.diagram.part.OntoUMLVisualIDRegistry
            .getType(OntoUML.diagram.edit.parts.WrappingLabelEditPart.VISUAL_ID));
    IParser parser = ParserService.getInstance().getParser(hintAdapter);
    if (parser != null) {
      return parser.getPrintString(hintAdapter, ParserOptions.NONE
          .intValue());
    } else {
      return ""; //$NON-NLS-1$
    }
View Full Code Here

Examples of org.lilystudio.smarty4j.IParser

    mw.visitMaxs(0, 0);
    mw.visitEnd();
    cw.visitEnd();
    byte[] code = cw.toByteArray();
    try {
      IParser parser = (IParser) DynamicClassLoader.getClass(name, code)
          .newInstance();
      parser.merge(context, out);
      out.flush();
      return new String(bos.toByteArray());
    } catch (Exception e) {
      throw new RuntimeException("不能实例化Parser对象");
    }
View Full Code Here

Examples of org.rythmengine.internal.IParser

        DialectBase d = (DialectBase) dialect();
        IContext c = ctx();
        Matcher m = P.matcher(remain());
        if (m.matches()) {
            String s = m.group(1);
            IParser p = d.createBuildInParser(s, c);
            if (null != p) {
                Token tb = p.go();
                if (null != tb) return F.T2(p, tb);
            }
        }
        for (IParserFactory f : d.freeParsers()) {
            IParser p = f.create(c);
            Token tb = p.go();
            if (null != tb) return F.T2(p, tb);
        }
        return null;
    }
View Full Code Here

Examples of tv.ustream.yolo.module.parser.IParser

        Map<String, Object> config = new HashMap<String, Object>();
        config.put("class", PassThruParser.class.getCanonicalName());
        config.put("processors", processors);

        IParser parser = new ModuleFactory().createParser("x", config);

        Assert.assertEquals(PassThruParser.class, parser.getClass());
    }
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.