Loading .project +6 −0 Original line number Original line Diff line number Diff line Loading @@ -5,6 +5,11 @@ <projects> <projects> </projects> </projects> <buildSpec> <buildSpec> <buildCommand> <name>org.python.pydev.PyDevBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <buildCommand> <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> <triggers>clean,full,incremental,</triggers> <triggers>clean,full,incremental,</triggers> Loading @@ -24,5 +29,6 @@ <natures> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.python.pydev.pythonNature</nature> </natures> </natures> </projectDescription> </projectDescription> icons/obj16/eraser.png 0 → 100644 +656 B Loading image diff... parsers/parser_ise.py 0 → 100644 +36 −0 Original line number Original line Diff line number Diff line #!/usr/bin/env python ##/usr/bin/python -u import sys tool="EXTERNAL_TOOL" if len(sys.argv)>1: tool=sys.argv[1] def isProblem(str): if str.startswith("ERROR:") or str.startswith("WARNING:") or str.startswith("INFO:"): return True return False def hasLine(str): if '" Line ' in str: return True return False def addTool(str,tool): if hasLine(str): return str else: index=str.find(" - ")+3 return str[:index]+(" \"%s\" Line 0000:"%tool)+str[index:] # return str[:len(str)-1]+(" \"%s\" Line 0000:"%tool)+"\n" pline="" for line in iter(sys.stdin.readline,''): if isProblem(pline): if line.startswith(" ") : pline = pline[:len(pline)-1]+line[2:] else: sys.stdout.write(addTool(pline,tool)) pline = line else: pline = line if isProblem(pline): sys.stdout.write(addTool(pline,tool)) src/com/elphel/vdt/VDT.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -159,6 +159,9 @@ public class VDT { public static final String GENERATOR_ID_STATE_DIR = "StateDir"; public static final String GENERATOR_ID_STATE_DIR = "StateDir"; public static final String GENERATOR_ID_STATE_FILE = "StateFile"; public static final String GENERATOR_ID_STATE_FILE = "StateFile"; public static final String GENERATOR_PARSERS_PATH = "ParsersPath"; public static final String PATH_TO_PARSERS = "parsers"; public static final String TIME_STAMP_FORMAT = "yyyyMMddHHmmssSSS"; public static final String TIME_STAMP_FORMAT = "yyyyMMddHHmmssSSS"; Loading src/com/elphel/vdt/core/tools/generators/ParsersPathGenerator.java 0 → 100644 +55 −0 Original line number Original line Diff line number Diff line /******************************************************************************* * Copyright (c) 2014 Elphel, Inc. * This file is a part of Eclipse/VDT plug-in. * Eclipse/VDT plug-in is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Eclipse/VDT plug-in is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ package com.elphel.vdt.core.tools.generators; import java.net.URI; import java.net.URL; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.Path; import com.elphel.vdt.VDT; import com.elphel.vdt.veditor.VerilogPlugin; public class ParsersPathGenerator extends AbstractGenerator { public static final String NAME = VDT.GENERATOR_PARSERS_PATH; public String getName() { return NAME; } public ParsersPathGenerator() { super(null); // null for topFormatProcessor - this generator can not reference other parameters } protected String[] getStringValues() { String path = "$nl$/" + VDT.PATH_TO_PARSERS; //$NON-NLS-1$ try { URL url=FileLocator.find(VerilogPlugin.getDefault().getBundle(), new Path(path), null); if(url != null) { URI uri=FileLocator.resolve(url).toURI(); // System.out.println("ParsersPathGenerator()->"+uri.getRawPath()+" : "+uri.toString()); return new String[]{uri.getRawPath()}; } return null; } catch (Exception e){ return null; } } } Loading
.project +6 −0 Original line number Original line Diff line number Diff line Loading @@ -5,6 +5,11 @@ <projects> <projects> </projects> </projects> <buildSpec> <buildSpec> <buildCommand> <name>org.python.pydev.PyDevBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <buildCommand> <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> <triggers>clean,full,incremental,</triggers> <triggers>clean,full,incremental,</triggers> Loading @@ -24,5 +29,6 @@ <natures> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.python.pydev.pythonNature</nature> </natures> </natures> </projectDescription> </projectDescription>
parsers/parser_ise.py 0 → 100644 +36 −0 Original line number Original line Diff line number Diff line #!/usr/bin/env python ##/usr/bin/python -u import sys tool="EXTERNAL_TOOL" if len(sys.argv)>1: tool=sys.argv[1] def isProblem(str): if str.startswith("ERROR:") or str.startswith("WARNING:") or str.startswith("INFO:"): return True return False def hasLine(str): if '" Line ' in str: return True return False def addTool(str,tool): if hasLine(str): return str else: index=str.find(" - ")+3 return str[:index]+(" \"%s\" Line 0000:"%tool)+str[index:] # return str[:len(str)-1]+(" \"%s\" Line 0000:"%tool)+"\n" pline="" for line in iter(sys.stdin.readline,''): if isProblem(pline): if line.startswith(" ") : pline = pline[:len(pline)-1]+line[2:] else: sys.stdout.write(addTool(pline,tool)) pline = line else: pline = line if isProblem(pline): sys.stdout.write(addTool(pline,tool))
src/com/elphel/vdt/VDT.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -159,6 +159,9 @@ public class VDT { public static final String GENERATOR_ID_STATE_DIR = "StateDir"; public static final String GENERATOR_ID_STATE_DIR = "StateDir"; public static final String GENERATOR_ID_STATE_FILE = "StateFile"; public static final String GENERATOR_ID_STATE_FILE = "StateFile"; public static final String GENERATOR_PARSERS_PATH = "ParsersPath"; public static final String PATH_TO_PARSERS = "parsers"; public static final String TIME_STAMP_FORMAT = "yyyyMMddHHmmssSSS"; public static final String TIME_STAMP_FORMAT = "yyyyMMddHHmmssSSS"; Loading
src/com/elphel/vdt/core/tools/generators/ParsersPathGenerator.java 0 → 100644 +55 −0 Original line number Original line Diff line number Diff line /******************************************************************************* * Copyright (c) 2014 Elphel, Inc. * This file is a part of Eclipse/VDT plug-in. * Eclipse/VDT plug-in is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Eclipse/VDT plug-in is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ package com.elphel.vdt.core.tools.generators; import java.net.URI; import java.net.URL; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.Path; import com.elphel.vdt.VDT; import com.elphel.vdt.veditor.VerilogPlugin; public class ParsersPathGenerator extends AbstractGenerator { public static final String NAME = VDT.GENERATOR_PARSERS_PATH; public String getName() { return NAME; } public ParsersPathGenerator() { super(null); // null for topFormatProcessor - this generator can not reference other parameters } protected String[] getStringValues() { String path = "$nl$/" + VDT.PATH_TO_PARSERS; //$NON-NLS-1$ try { URL url=FileLocator.find(VerilogPlugin.getDefault().getBundle(), new Path(path), null); if(url != null) { URI uri=FileLocator.resolve(url).toURI(); // System.out.println("ParsersPathGenerator()->"+uri.getRawPath()+" : "+uri.toString()); return new String[]{uri.getRawPath()}; } return null; } catch (Exception e){ return null; } } }