anchor.diff:    u.FileName := s;
     u.Opened := True;
     GProject.UnitList.Add(u);
  +  // add reference to tabsheet
  +  pcEditor.ActivePage.TagPointer := u;
  +  s := ExtractRelativepath(GProject.ProjectDir, u.FileName);
  +  r := GetUnitsNode;
  +  n := r.AppendText(s);
  +  // add reference to treenode
  +  n.Data := u;
  +  tvProject.Invalidate;
  +end;
  +
  +procedure TMainForm.tvProjectDoubleClick(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
  +var
  +  r: TfpgTreeNode;
  +  n: TfpgTreeNode;
  +  ts: TfpgTabSheet;
  +  u: TUnit;
  +begin
  +  r := GetUnitsNode;
  +  n := tvProject.Selection;
  +  if n.Data <> nil then
  +    u := TUnit(n.Data);
  +  if u <> nil then
  +  begin
  +    ts := OpenEditorPage(u.FileName);
  +    u.Opened := True;
  +    ts.TagPointer := u; // add reference to tabsheet
  +  end;
   end;
   
   procedure TMainForm.TabSheetClosing(Sender: TObject; ATabSheet: TfpgTabSheet);
   var
  -  n: TfpgTreeNode;
     u: TUnit;
   begin
  -  u := GProject.UnitList.FindByName(ATabSheet.Text);
  +  u := TUnit(ATabSheet.TagPointer);
     if Assigned(u) then
       u.Opened := False;
  -  n := tvProject.RootNode.FindSubNode(ATabSheet, True);
  -  if Assigned(n) then
  -  begin
  -    tvProject.RootNode.Remove(n);
  -    n.Free;
  -    tvProject.Invalidate;
  -  end;
   end;
   
   procedure TMainForm.UpdateStatus(const AText: TfpgString);
  
positive.code:   end;
  end;
  
  procedure TMainForm.OpenEditorPage(const AFilename: TfpgString);
  var
    s: TfpgString;
    f: TfpgString;
    n: TfpgTreeNode;
    i: integer;
    found: Boolean;
    ts: TfpgTabSheet;
  
negative.code: 
  procedure TMainForm.SetupProjectTree;
  begin
    tvProject.RootNode.Clear;
    tvProject.RootNode.AppendText('Units');
    tvProject.RootNode.AppendText('Images');
    tvProject.RootNode.AppendText('Help Files');
  