IDE expert : Extending IDE Options with package expert. lazarus / 9-Editor ---------------------------------------------------------------------- Cyrax · 2013-05-20 12:40 Check attached file for example package. What I'm trying to do is to add own custom option page to IDE options dialog via package. Unfortunately this requires inclusion of ide package as a requirement. Normally you can't use it for design packages and trying to install a package which does have it as requirement shows user a error dialog. See Martin Friebe's explanation in my bug report at http://bugs.freepascal.org/view.php?id=24455. My package needs to access environment options and IDE menus. See this code snippet: Code: [Select]procedure THistoryOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions); Var   EnvOptions : TEnvironmentOptions; begin   EnvOptions := TEnvironmentOptions(AOptions);   If Assigned(EnvOptions) Then Begin     if rfFiles in FRecentFlagsSet then Begin       EnvOptions.RecentOpenFiles.Clear;       MainIDE.SetRecentFilesMenu;     end;     if rfProjects in FRecentFlagsSet then Begin       EnvOptions.RecentProjectFiles.Clear;       MainIDE.SetRecentProjectFilesMenu;     end;     if rfPackage in FRecentFlagsSet then Begin       EnvOptions.RecentPackageFiles.Clear;       itmPkgOpenRecent.Clear;       itmPkgOpenRecent.Enabled := False;     end;   end; end; So IDEIntf package needs to be modified somehow to allow this kind of usage. But how? ---------------------------------------------------------------------- Martin_fr · 2013-05-20 12:59 The Jedi (jcf2) package does that. bottom of file components\jcf2\Settings\JcfSettings.pas -- Edit Sorry it is about adding an option, or getting EnvironmentOpts? ---------------------------------------------------------------------- Martin_fr · 2013-05-20 13:08 What do you try to do with recent file entries? What is the intended feature (as in seen by the user)? ---------------------------------------------------------------------- Martin_fr · 2013-05-20 13:15 BTW: Even if the ide package would be allowed for design, it would not work the way you want. - All packages, that are used by the IDE (includeng yours) are build before the IDE itself is compiled. (They must be in order to be used) - So at the time, where your package is build, the IDE sources have not yet been compiled. They can not be used. It may have worked in your experiments. But it may be that the package was build with old ppu files, because the IDE sources were unchanged... Or not detected to be changed... ---------------------------------------------------------------------- Cyrax · 2013-05-20 13:20 Quote from: Martin_fr on May 20, 2013, 02:59:26 pmThe Jedi (jcf2) package does that. bottom of file components\jcf2\Settings\JcfSettings.pas -- Edit Sorry it is about adding an option, or getting EnvironmentOpts? Doing both, adding option and modifying EnvironmentOpts when user selects different commands. Quote from: Martin_fr on May 20, 2013, 03:08:55 pmWhat do you try to do with recent file entries? What is the intended feature (as in seen by the user)? Clearing up all recent files (project and package) and maybe history lists. ---------------------------------------------------------------------- Martin_fr · 2013-05-20 13:24 I recommend to ask on the mail list as well. I do not know the IDEIntf itself that well. You may get additional feedback on the mail list.