Difference between revisions of "IDE tricks/ja"

From Lazarus wiki
Jump to navigationJump to search
Line 26: Line 26:
 
gtk環境においては、ソースエディタページは、ページ名の右側に閉じるボタンがあります。Ctrlキーを押しながら、そのボタンを押すと、クリックしたもの以外の全ファイルが閉じます。
 
gtk環境においては、ソースエディタページは、ページ名の右側に閉じるボタンがあります。Ctrlキーを押しながら、そのボタンを押すと、クリックしたもの以外の全ファイルが閉じます。
  
= Component palette =
+
= コンポーネントパレット =
  
== Finding a component in the palette ==
+
== パレットの中のコンポーネントを見つける ==
  
You know the component name, or part of it, but you don't know in which page it was? This tool finds it:
+
どのページになるかしならくても、コンポーネントの名前を一部でも知っていれば、コンポーネントを見つけることができます。
Right click on a component in the palette to open the popup menu. Choose 'Find component'. Type part of the name to filter the list.
+
コンポーネントパレット上で右クリックをして、popupメニューを出します。'Find component'を選択します。
 +
名前の一部をタイプすると、リストがフィルタされます。
  
== Open the package of a component in the palette ==
+
== パレットのコンポーネントのパッケージを開く ==
  
Right click on the component to open the popup menu, then choose open package.
+
コンポーネントパレット上で右クリックをして、popupメニューを出します。'Open package'を選択します。
  
== Find the source declaration of a component in the palette ==
+
== パレットのコンポーネントの宣言を見つける ==
  
Right click on the component to open the popup menu, then choose open unit.
+
コンポーネントパレット上で右クリックをして、popupメニューを出します。'Open unit'を選択します。
  
 
= My application freeze my linux desktop while debugging =
 
= My application freeze my linux desktop while debugging =

Revision as of 14:03, 9 November 2006

Deutsch (de) English (en) français (fr) magyar (hu) 日本語 (ja) 한국어 (ko) русский (ru) slovenčina (sk) 中文(中国大陆)‎ (zh_CN)

Open file で新しいファイルを作る

新しいファイルをつくって、保存することができます。または、1回の操作で新しいファイルをファイル名とファイルタイプを指定して、作成することもできます。

ただ、open file (Ctrl+o)で、存在しないファイルを指定します。たとえば、unit1.pasを指定すると、IDEはそのファイルを作るかどうか、尋ねます。

IDE マクロ

IDE Macros in paths and filenames/ja

IDEが作成したコマンドラインパラメータをコンパイラで取得する方法

Project -> Compiler Options -> Show Options でパラメータをコピーすることができます。ここに、プロジェクトディレクトリまでの相対パスがあります。多くの場合、調整することなく、これをコピーして使うことが出来ます。

これらのパラメータは *.compiled ファイルにも保存されます。たとえば、test1.lpiというプロジェクトに対しては、test1.compiledというファイルが生成されます。これは、単純なテキストのxmlファイルになっていて、オプションやパスを簡単に他のコンピュータにコピーすることができます。 このファイルは実行ファイルが作成されるのと同じディレクトリにおかれます。

パッケージも同じ仕組みになっています。

このように、lazarus IDEがなくても、(願わくばバグがなく、動く)コードをコンパイルすることができます。

1つを残して、他のエディタファイルをすべて閉じる方法

gtk環境においては、ソースエディタページは、ページ名の右側に閉じるボタンがあります。Ctrlキーを押しながら、そのボタンを押すと、クリックしたもの以外の全ファイルが閉じます。

コンポーネントパレット

パレットの中のコンポーネントを見つける

どのページになるかしならくても、コンポーネントの名前を一部でも知っていれば、コンポーネントを見つけることができます。 コンポーネントパレット上で右クリックをして、popupメニューを出します。'Find component'を選択します。 名前の一部をタイプすると、リストがフィルタされます。

パレットのコンポーネントのパッケージを開く

コンポーネントパレット上で右クリックをして、popupメニューを出します。'Open package'を選択します。

パレットのコンポーネントの宣言を見つける

コンポーネントパレット上で右クリックをして、popupメニューを出します。'Open unit'を選択します。

My application freeze my linux desktop while debugging

X (your desktop) can freeze, when an application that grabbed the mouse is stopped by gdb (the debugger).

Using a second X session

You can start a second X by:

  X :1 &

with Ctrl-Alt-F7 you switch to :0 and with Ctrl-Alt-F8 you switch to :1 after that you can start a second gnome session by:

  gnome-session --display=:1 &

Using VNC

You can use vncserver/client by installing tightvncserver/realvncserver Start the server with:

  vncserver :1

AFAIK, a session is also started. You can connect to the vncserver with vncviewer.

Debug the application on the second server

In lazarus, in the run parameters for your project, check "use display" and enter

 :1

Now your application will run on the second server, so when it is being debugged, only the second server will freeze (but that won't affect you since you are debugging on the first).

Compiling the IDE fast

Working on Lazarus itself needs rebuilding the IDE many times. If you use the following tricks and have enough memory and a recent cpu, you should be able to recompile the IDE in a few seconds.

  • Put the Lazarus sources on a fast harddisk. Not on a slow network filesystem.
  • Install only needed packages.
  • Set USESVN2REVISIONINC=0 to skip the update of the revision.inc.
  • Compile only parts. If the packager registration is recompiled, then all installed packages are recompiled too. If the IDEIntf is recompiled, then all installed design-time packages are recompiled.
  • Under windows: use the internal linker

Finding the source file of a IDE window

  • Open the IDE window.
  • Press Ctrl+Shift+F1 to open the help editor.
  • Remember the window classname. Close the window.
  • Use 'Find In Files' to find the source file of the class.