Commit 2a1704e7 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Added support for problems without file:line information

parent 3bb6b738
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -98,14 +98,16 @@ public class VDTConsoleRunner{
		IConsole[] consoles=(IConsole[]) man.getConsoles();
		IOConsole iCons=null;
		consoleInStreamProxy=null;
		String consoleStartsWith=consolePrefix+" ("; // space and start of date
		for (int i=0;i<consoles.length;i++){
			if (consoles[i].getName().startsWith(consolePrefix)){
//			if (consoles[i].getName().startsWith(consolePrefix)){
			if (consoles[i].getName().startsWith(consoleStartsWith)){
				iCons=(IOConsole) consoles[i];
				break;
			}
		}
		if (iCons==null) {
			MessageUI.error("Specified console: "+consolePrefix+" is not found");
			MessageUI.error("Specified console: "+consolePrefix+" is not found (was looking for \""+consoleStartsWith+"\"");
			return null;
		}
		// try to send 
+14 −4
Original line number Diff line number Diff line
@@ -189,6 +189,16 @@ public abstract class Context {
        return createdControlFiles;
    }
    
    public String subsitutePattern(String pattern){
    	if ((pattern==null) || (pattern.length()==0)) return pattern;
    	Parameter param=findParam(pattern);
    	if (param==null) return pattern;
    	List<String> lv=param.getCurrentValue();
    	if ((lv==null) || (lv.size()==0)) return null;
    	return lv.get(0);
    }

    
    // scans all the parameters that belong to the tool, checks those of them
    // which need to be put into a control file, and puts them to that file
    // all other needed params are built into command line array
@@ -213,9 +223,9 @@ public abstract class Context {
            
            String name=commandLinesBlock.getName();    
        	String mark=commandLinesBlock.getMark();
        	String toolErrors=commandLinesBlock.getErrors();
        	String toolWarnings=commandLinesBlock.getWarnings();
        	String toolInfo=commandLinesBlock.getInfo();
        	String toolErrors=  subsitutePattern(commandLinesBlock.getErrors());
        	String toolWarnings=subsitutePattern(commandLinesBlock.getWarnings());
        	String toolInfo=    subsitutePattern(commandLinesBlock.getInfo());
        	String stderr=commandLinesBlock.getStderr();
        	String stdout=commandLinesBlock.getStdout();
        	String prompt=  buildSimpleString(commandLinesBlock.getPrompt()); // evaluate string
+2 −0
Original line number Diff line number Diff line
@@ -370,6 +370,8 @@
     			"| %SedPaths"
     			<if NoBabyTalk="true">
     				"| grep --line-buffered -v \"license\""
		  				<!-- Add  [Placement:0000] to lines that do not have [file:line] - then "Placement" will appear in "Problems" location-->
     				"| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Placement:0000\]@'"
     			</if>
     			
			</line>
+25 −4
Original line number Diff line number Diff line
@@ -152,6 +152,17 @@
   	   <parameter   id="VivadoSynthActionIndex" default="%%ChosenActionIndex"
					type="String" format="CopyValue" visible="false"  />
        			
<!-- parser parameters -->
        <parameter	id="PatternErrors"   label="Errors" tooltip= "Regular expression for error messages"
        			default=".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]"
        			visible="true"  type="String" format="CopyValue"/>
        <parameter	id="PatternWarnings"   label="Warnings" tooltip= "Regular expression for warnings messages"
        			default=".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]"
        			visible="true"  type="String" format="CopyValue"/>
        <parameter	id="PatternInfo"   label="Info" tooltip= "Regular expression for info messages"
        			default=".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]"
        			visible="true"  type="String" format="CopyValue"/>

			
		<input>
			<group name="General">
@@ -188,6 +199,11 @@
		        "quiet"
		        "verbose"
			</group>
			<group name="Parser">
				"PatternErrors"
				"PatternWarnings"
 				"PatternInfo" 
			</group>
		</input>

		<output>
@@ -275,17 +291,22 @@
	        <!-- errors=".*[ERROR|CRITICAL WARNING]: (\[.*\].*)\[(.*):([0-9]+)\]"
	         -->
			<line name="parser_VivadoSynth"
				errors=   ".*ERROR: (\[.*\].*)\[(.*):([0-9]+)\]"
				warnings= ".*WARNING: (\[.*\].*)\[(.*):([0-9]+)\]"
				info=     ".*INFO: (\[.*\].*)\[(.*):([0-9]+)\]">
				errors=   "PatternErrors"
				warnings= "PatternWarnings"
				info=     "PatternInfo">
				"-c"
     			"%GrepEWI"
     			"| %SedPaths"
     			<if NoBabyTalk="true">
     				"| grep --line-buffered -v \"license\""
     				<!-- Add  [Synthesis:0000] to lines that do not have [file:line] - then "Synthesis" will appear in "Problems" location-->
     				"| sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Synthesis:0000\]@'"
     			</if>
			</line>
		</output>
	</tool>
<!--  sed    's@^[^\[]*\[[^\[]*$@&\[Synthesis:0000\]@'
      sed -u 's@^[^\[]*\[[^\[]*$@&amp;\[Synthesis:0000\]@'
 
 -->
</vdt-project>
+1 −1

File changed.

Contains only whitespace changes.