Package org.eclipse.dltk.compiler.problem

Examples of org.eclipse.dltk.compiler.problem.IProblem


                boolean b = block.equals(required);
                if (b) {
                  return false;
                }
              }
              IProblem problem = problemFactory.createFileNotFoundProblem(ref);
              rep.reportProblem(problem);
            }
          }
          return false;
        }
View Full Code Here


        ASTNode parent = dds.getParent();
        if (parent != null && parent instanceof RutaVariableReference) {
          RutaVariableReference p = (RutaVariableReference) parent;
          String name = p.getName();
          if (finalTypes.contains(name)) {
            IProblem problem = problemFactory.createInheritenceFinalProblem(p);
            rep.reportProblem(problem);
          }
        }
        return true;
      }

      if (s instanceof RutaVariableDeclaration) {
        RutaVariableDeclaration newVar = (RutaVariableDeclaration) s;
        // if (otherVariables.contains(newVar.getName())) {
        // IProblem problem = problemFactory
        // .createVarAlreadyDeclaredProblem(newVar);
        // rep.reportProblem(problem);
        // return false;
        // }
        if (shortTypes.contains(newVar.getName())) {
          IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newVar);
          rep.reportProblem(problem);
          return false;
        }
        if ((newVar.getKind() & RutaTypeConstants.RUTA_TYPE_AT) != 0) {
          typeVariables.add(newVar.getName());
          return false;
        }
        otherVariables.add(newVar.getName());
        return false;
      }
      // if (s instanceof RutaFeatureDeclaration) {
      // RutaFeatureDeclaration fd = (RutaFeatureDeclaration) s;
      // }
      if (s instanceof RutaTypeDeclaration) {
        RutaTypeDeclaration newType = (RutaTypeDeclaration) s;
        if (reportWarningOnShortNames && shortTypes.contains(newType.getName())) {
          IProblem problem = problemFactory.createDuplicateShortName(newType,
                  ProblemSeverity.WARNING);
          rep.reportProblem(problem);
          return false;
        }
        String longName = getLongLocalName(newType.getName());
        if (completeTypes.contains(longName)) {
          IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newType);
          rep.reportProblem(problem);
          return false;
        }
        if (typeVariables.contains(newType.getName()) || otherVariables.contains(newType.getName())) {
          IProblem problem = problemFactory.createIdConflictsWithVariableProblem(newType);
          rep.reportProblem(problem);
          return false;
        }
        List<RutaFeatureDeclaration> features = newType.getFeatures();
        if (features != null) {

          for (RutaFeatureDeclaration each : features) {
            String type = each.getType();
            if (type.equals("INT") || type.equals("STRING") || type.equals("DOUBLE")
                    || type.equals("FLOAT") || type.equals("BOOLEAN")) {
              continue;
            }
            if (!shortTypes.contains(type) && !completeTypes.contains(type)
                    && !otherTypes.contains(type)) {
              IProblem problem = problemFactory.createUnknownFeatureTypeProblem(each);
              rep.reportProblem(problem);
            }
          }
        }
        String[] nameSplit = newType.getName().split("[.]");
View Full Code Here

    int end = start+e.token.getText().length();
   
    // retrieve severity from preferences
    ProblemSeverity severity = SymfonyCorePreferences.getAnnotationSeverity();
   
    IProblem problem = new DefaultProblem(filename, message, IProblem.Syntax,
        new String[0], severity, start+1, end+1, lineNo);
   
   
    context.getProblemReporter().reportProblem(problem);
View Full Code Here

            */
            //IProblem newProblem = new DefaultProblem(filename, message, DefaultProblemIdentifier.NULL, new String[0], ProblemSeverities.Error, start+1, end+1, lineNo, start);

            ProblemSeverity severity = SymfonyCorePreferences.getAnnotationSeverity();

            IProblem problem = new DefaultProblem(filename, message, IProblem.ImportRelated,
                    new String[0], severity, sourcePosition.startOffset + 1, sourcePosition.endOffset + 1, lineNo);

            context.getProblemReporter().reportProblem(problem);
        }
    }
View Full Code Here

        ProblemSeverity severity = TwigCorePreferences.getSyntaxErrorSeverity();

        if (severity == null || severity == ProblemSeverity.IGNORE)
            return;

        IProblem problem = new DefaultProblem(filename, message,
                IProblem.Syntax, new String[0], severity, offset, offset + 1,
                line);

        reporter.reportProblem(problem);
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.compiler.problem.IProblem

Copyright © 2018 www.massapicom. 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.