"Versioning" output tab created. It is used for output of VCS commands instead of BLD200207240200
authormentlicher@netbeans.org
Tue, 23 Jul 2002 15:52:11 +0000
changeset 2440eb8c0da73dcc
parent 2439 f66acabf6d23
child 2441 c4fb9b51a53a
"Versioning" output tab created. It is used for output of VCS commands instead of
the standard "Output" tab. Now we're able to make visible this "Versioning" tab when
a command fails.
This is a fix of issue #25008.
vcscore/src/org/netbeans/modules/vcscore/Bundle.properties
vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java
     1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/Bundle.properties	Tue Jul 23 15:21:30 2002 +0000
     1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/Bundle.properties	Tue Jul 23 15:52:11 2002 +0000
     1.3 @@ -74,6 +74,8 @@
     1.4  
     1.5  EXC_CouldNotFindAction=Can not find the action {0}
     1.6  
     1.7 +LBL_VCS_Output=Versioning
     1.8 +
     1.9  #--------------------------------------------------------------------
    1.10  # VcsVersioningSystem
    1.11  Exc_FileCanNotDelete=The file {0} can not be deleted.
     2.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Tue Jul 23 15:21:30 2002 +0000
     2.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Tue Jul 23 15:52:11 2002 +0000
     2.3 @@ -48,6 +48,7 @@
     2.4  import org.openide.util.SharedClassObject;
     2.5  import org.openide.util.UserQuestionException;
     2.6  import org.openide.util.WeakListener;
     2.7 +import org.openide.windows.InputOutput;
     2.8  
     2.9  import org.apache.regexp.RE;
    2.10  import org.apache.regexp.RESyntaxException;
    2.11 @@ -374,6 +375,9 @@
    2.12      /** The refresh request instead of the standard refreshing. */
    2.13      private transient VcsRefreshRequest refresher;
    2.14      
    2.15 +    /** The InputOutput used for display of VCS commands output */
    2.16 +    private transient InputOutput cmdIO = null;
    2.17 +    
    2.18  //    private transient Hashtable revisionListsByName = null;
    2.19  
    2.20      public boolean isLockFilesOn () {
    2.21 @@ -1237,15 +1241,25 @@
    2.22      public void setZeroRefreshTime() {
    2.23          setVcsRefreshTime(0);
    2.24      }
    2.25 +    
    2.26 +    protected InputOutput getCommandsIO () {
    2.27 +        if (cmdIO == null) {
    2.28 +            cmdIO = TopManager.getDefault().getIO(
    2.29 +                        NbBundle.getMessage(VcsFileSystem.class, "LBL_VCS_Output"),
    2.30 +                        false);
    2.31 +            cmdIO.setErrSeparated(false);
    2.32 +        }
    2.33 +        return cmdIO;
    2.34 +    }
    2.35  
    2.36      /**
    2.37       * Clear the debug output.
    2.38       */
    2.39 -    public void debugClear(){
    2.40 -        if( getDebug() ){
    2.41 -            try{
    2.42 -                TopManager.getDefault().getStdOut().reset();
    2.43 -            }catch (IOException e){}
    2.44 +    public void debugClear() {
    2.45 +        if (getDebug()) {
    2.46 +            try {
    2.47 +                getCommandsIO().getOut().reset();
    2.48 +            } catch (IOException ioex) {}
    2.49          }
    2.50      }
    2.51  
    2.52 @@ -1253,11 +1267,11 @@
    2.53      /**
    2.54       * Print a debug output. If the debug property is true, the message
    2.55       * is printed to the Output Window.
    2.56 -     * @param msg the message to print out.
    2.57 +     * @param msg The message to print out.
    2.58       */
    2.59 -    public void debug(String msg){
    2.60 -        if( getDebug() ){
    2.61 -            TopManager.getDefault().getStdOut().println(msg);
    2.62 +    public void debug(String msg) {
    2.63 +        if (getDebug()) {
    2.64 +            getCommandsIO().getOut().println(msg);
    2.65          }
    2.66      }
    2.67  
    2.68 @@ -1266,8 +1280,10 @@
    2.69       * The debug property is not considered.
    2.70       * @param msg the message to print out.
    2.71       */
    2.72 -    public void debugErr(String msg){
    2.73 -        TopManager.getDefault().getStdOut().println(msg);
    2.74 +    public void debugErr(String msg) {
    2.75 +        InputOutput out = getCommandsIO();
    2.76 +        out.getErr().println(msg);
    2.77 +        out.select();
    2.78      }
    2.79  
    2.80