Commit 4c8d5dc3 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Working on command sequencing

parent 8c4668b9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ public class VDT {
    public static final String ATTR_TOOL_INFO =     ID_VDT + ".ATTR_TOOL_INFO";

    public static final String ATTR_LOG_BUILD_STAMP =     ID_VDT + ".ATTR_LOG_BUILD_STAMP";
    public static final String ATTR_TOOL_STATE_FILE =     ID_VDT + ".TOOL_STATE_FILE"; // name of state (snapshot)  file to restore passed at tool launch

    
    /**
@@ -153,4 +154,9 @@ public class VDT {
    public static final String GENERATOR_ID_USERNAME      = "UserName"; 
    public static final String GENERATOR_ID_BLANK         = "Blank"; 
    public static final String GENERATOR_ID_NEWLINE       = "NewLine"; 

    public static final String GENERATOR_ID_STATE_DIR     = "StateDir"; 
    public static final String GENERATOR_ID_STATE_FILE    = "StateFile"; 


} // class VDT
+5 −8
Original line number Diff line number Diff line
@@ -115,8 +115,10 @@ public class LaunchCore {
    		, String logBuildStamp ) throws CoreException {
    	workingCopy.setAttribute(VDT.ATTR_LOG_BUILD_STAMP,     logBuildStamp);
    }

    
    public static void setToolStateFile( ILaunchConfigurationWorkingCopy workingCopy
    		, String stateFile ) throws CoreException {
    	workingCopy.setAttribute(VDT.ATTR_TOOL_STATE_FILE,     stateFile);
    }
    
    
    public static void updateLaunchConfiguration( ILaunchConfigurationWorkingCopy workingCopy
@@ -217,11 +219,6 @@ public class LaunchCore {
        return launchConfig;
    } // createLaunchConfiguration()
    
/*    
    public static void launch(Tool tool, IProject project) throws CoreException {
        launch(tool, project, VDT.VARIABLE_RESOURCE_NAME);
    }
*/
   
  
    
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ public class RunningBuilds {
			if (toolName.equals(runConfig.getToolName())){
				Tool tool=ToolsCore.getTool(runConfig.getToolName());
				tool.setRunning(false);
				tool.updateViewStateIcon();
				tool.toolFinished();
				if (tool.getState()==TOOL_STATE.KEPT_OPEN) {
					MessageUI.error("Termninal that starts by this tool ("+toolName+") is already open in console \""+consoleName+"\"");
					return true;
+8 −0
Original line number Diff line number Diff line
@@ -97,6 +97,14 @@ public class ToolLogFile {
		return null;
	}
	
	public static String insertTimeStamp(String filename, String timestamp){
		int index=filename.lastIndexOf(".");
		if (index>=0){
			return filename.substring(0, index)+BUILD_STAMP_SEPARATOR+timestamp+filename.substring(index);
		} else {
			return filename+BUILD_STAMP_SEPARATOR+timestamp;
		}
	}
	
	/**
	 * @param logDir  Directory path of the log files root directory (or null)
+5 −1
Original line number Diff line number Diff line
@@ -331,6 +331,10 @@ public class VDTLaunchUtil {
    	return configuration.getAttribute(VDT.ATTR_LOG_BUILD_STAMP, (String) null);
    }

    public static String getToolStateFile(ILaunchConfiguration configuration) throws CoreException{
    	return configuration.getAttribute(VDT.ATTR_TOOL_STATE_FILE, (String) null);
    }

    /**
     * Throws a core exception with an error status object built from
     * the given message, lower level exception, and error code.
Loading