Compile only one tab

yann

Member²
Hello,

I am using source file with many procedure. PL/SQL open automatically each procedure in a separate tab when I open the file...that is fine.

But when I press execute to compile the source all procedure a recompiled. Is there a way to compile only one tab?

Best regards
 
Thank you for your reply.

But I already tried it but I am not really happy with it.

It open the source of the current tab in a new window and compile the new window. When an error occucrs, you see it in the compile window but you can not change the code directly. You have to close the compile window to go back in the "real" source, find back manually where was the error and correct it.
Not really user friendly...

Best regards
 
Yann,

This probably isn't what you desired, since you lose the capabilities of the Program Window, however, if you change the window type that your source file was opened in to SQL Window, you can select just the procedure you want to compile and hit F8 (Session | Execute).

bc
 
Yann,
Since I have never seen this mode of using PL/SQL Developer, with multiple procedures in one file, I have been trying to reproduce what you are getting and I am failing.

I made a file with multiple procedures in it (each starts with 'create or replace procedure xxxxx' and has a begin null; end;). I did this with a text editor. I then tried opening it as a Program file, SQL file and a Command file, but they only showed one tab with all the procedures in it.

How did you get PL/SQL Developer to do that?
 
Scott Mattes, it has to be a valid SQL-script as
Code:
create or replace procedure a as
begin
  null;
end;
/
create or replace procedure b as
begin
  null;
end;
/
If you forget the /'s it will be shown in one tab and it will not compile.

This is also not a mode I have seen used with PL/SQL Developer generally, but I have seen it used in older systems where the scripts are edited in Notepad or where the source code is generated.

Bo Pedersen
 
Thank for your reply.

The example Bo Pedersen gives is exaclty what I mean. You have no way to compile only procedure A.

We are working this way because each file contains all needed sources (triggers, package, procedure...) for a function of our application. So we get all linked source when we open the file.
 
I understand now.

If all source for each function has a common string in the name, or associated comment, you can create browser folders that display only those objects matching that string.

And there are other, albeit manual, ways to do this same thing.
 
Yann,

If you have the influence, try to encourage your development manager to change their way of thinking and building applications. In all shops I've worked in or heard of, each major PL/SQL object (trigger, package, view) is contained within its own file. The file is named for the object within it. This gives you much finer-grained control over the source code for that object. Source code control is easier because multiple developers aren't jockying to check out the same file. The number of checkouts is reduced, so you can now see which ones are the "hot" objects getting frequent revisits. When you want to compile just one piece of your application (which is the crux of your problem here), there is no longer any issue: simply compile the file that changed. There are probably ten more benefits to storing your source code this way, but since I've never had to work in an environment like yours, I'm having a hard time spelling them out as they're taken for granted.

"Smaller" objects that contain no -- or little -- PL/SQL, like synonyms, sequences and types you can keep in aggregated source files, with all the objects collected in one file. We happen to store even those separately.

This WILL make your life easier all around, not just within PSD. Good luck convincing the PTB!!

bc
 
Bcoulam,

I am use to work with only one file per objet or even no file and regulary save all source of database into files.

But the customer I am now working for (I am a consultant) is working the way I explained before.
The customer is using Toad, that is able to compile only one tab. As I am the only one using PL/SQL developer I do not think they will change there rules for the problem they do not have with Toad.

I really prefer PL/SQL developper, but this limitation make it difficult to use at this customer.

Best regards.
 
Back
Top