Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/20/14 17:33:22 (10 years ago)
Author:
jkarder
Message:

#2136:

  • refactored HLScriptGeneration to separate outputs from different running HL scripts.
  • added persistence support for HLScripts and fixed cloning
  • added code completion for all types in the currently loaded assemblies
  • merged trunk changes
Location:
branches/HLScript
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HLScript

  • branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.cs

    r10332 r10358  
    3636  [View("HLScript View")]
    3737  [Content(typeof(HLScript), true)]
    38   public partial class HLScriptView : ItemView {
     38  public partial class HLScriptView : NamedItemView {
    3939    private bool running;
    4040
     
    6969    }
    7070    private void Content_ScriptExecutionStarted(object sender, EventArgs e) {
    71       ReadOnly = true;
     71      Locked = true;
    7272      startStopButton.Image = VSImageLibrary.Stop;
    7373    }
    7474    private void Content_ScriptExecutionFinished(object sender, EventArgs e) {
    75       ReadOnly = false;
     75      Locked = false;
    7676      startStopButton.Image = VSImageLibrary.Play;
    7777      running = false;
     
    9292      } else {
    9393        codeEditor.UserCode = Content.Code;
     94        foreach (var asm in Content.GetAssemblies())
     95          codeEditor.AddAssembly(asm);
    9496        variableStoreView.Content = Content.VariableStore;
    9597        if (Content.CompileErrors == null) {
     
    108110    protected override void SetEnabledStateOfControls() {
    109111      base.SetEnabledStateOfControls();
    110       startStopButton.Enabled = Content != null;
     112      startStopButton.Enabled = Content != null && !Locked;
    111113      showCodeButton.Enabled = Content != null && !string.IsNullOrEmpty(Content.CompilationUnitCode);
    112       codeEditor.Enabled = Content != null && !ReadOnly;
     114      codeEditor.Enabled = Content != null && !Locked && !ReadOnly;
    113115    }
    114116
     
    137139    protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
    138140      if (keyData == Keys.F5) {
    139         if (Content == null || ReadOnly)
     141        if (Content == null || Locked)
    140142          return base.ProcessCmdKey(ref msg, keyData);
    141143        outputTextBox.Clear();
     
    144146          outputTextBox.Clear();
    145147          Content.Execute();
     148          running = true;
    146149        }
    147150        return true;
     
    156159    private bool Compile() {
    157160      ReadOnly = true;
     161      Locked = true;
    158162      errorListView.Items.Clear();
    159163      outputTextBox.Clear();
     
    170174        OnContentChanged();
    171175        ReadOnly = false;
     176        Locked = false;
    172177      }
    173178    }
Note: See TracChangeset for help on using the changeset viewer.