public void getChanges()

in src/net/sourceforge/transparent/ChangeManagement/CCaseChangeProvider.java [102:199]


  public void getChanges(@NotNull final VcsDirtyScope dirtyScope, @NotNull final ChangelistBuilder builder, @NotNull final ProgressIndicator progressIndicator,
                         @NotNull final ChangeListManagerGate addGate) throws VcsException {
    myDirs.clear();
    //-------------------------------------------------------------------------
    //  Protect ourselves from the calls which come during the unsafe project
    //  phases like unload or reload.
    //-------------------------------------------------------------------------
    if( project.isDisposed() )
      return;

    logChangesContent( dirtyScope );

    //  Do not perform any actions if we have no VSS-related
    //  content roots configured.
    if( ProjectLevelVcsManager.getInstance( project ).getDirectoryMappings( host ).size() == 0 )
      return;

    config = host.getConfig();
    mySharedConfig = CCaseSharedConfig.getInstance(project);
    progress = progressIndicator;
    isBatchUpdate = isBatchUpdate( dirtyScope );

    showOptionalReminder();
    initInternals();
    isFirstShow = false;

    try
    {
      iterateOverRecursiveFolders( dirtyScope );
      iterateOverDirtyDirectories( dirtyScope );
      iterateOverDirtyFiles( dirtyScope );

      //  Perform status computation only if we operate in the online mode.
      //  For offline mode just display the last valid state (for new and
      //  modified files, others are hijacked).
      if(! config.isOffline() ) {
        if(isBatchUpdate && config.synchActivitiesOnRefresh) {
          myViewManager.extractViewActivities();
          myViewManager.synchActivities2ChangeLists(addGate);
        }
        computeStatuses(dirtyScope);
      } else {
        restoreStatusesFromCached();
      }
      processStatusExceptions();

      getUnversioned();
      addCheckedOutFolders();

      //-----------------------------------------------------------------------
      //  For an UCM view we must determine the corresponding changes list name
      //  which is associated with the "activity" of the particular view.
      //-----------------------------------------------------------------------
      if(mySharedConfig.isUseUcmModel()) {
        setActivityInfoOnChangedFiles();
      }

      addLocallyDeletedFiles(builder);
      addAddedFiles( builder );
      addChangedFiles( builder );
      addRemovedFiles( builder );
      addIgnoredFiles( builder );
      addMergeConflictFiles( builder );
    }
    catch( ClearCaseException e )
    {
      String excMessage = e.getMessage();
      excMessage = excMessage == null ? "" : excMessage;
      @NonNls String message = FAIL_2_CONNECT_MSG + excMessage;

      if( TransparentVcs.isServerDownMessage( excMessage ))
      {
        message += "\n\nSwitching to the offline mode";
        config.setOfflineMode(true);
      }
      else
      if( excMessage.contains( UNABLE_OPEN_VIEW_SSIG ) ||
          excMessage.contains( ESTABLISH_CONNECTION_FAIL_SIG ) )
      {
        message = FAIL_2_START_VIEW_MSG + excMessage;
      }

      final String msg = message;
      LOG.info(e);
      throw new VcsException(msg);
    }
    catch( RuntimeException e )
    {
      @NonNls final String message = FAIL_2_START_MSG + ": " + e.getMessage();
      LOG.info(e);
      throw new VcsException(message);
    }
    finally
    {
      TransparentVcs.LOG.debug( "-- EndChangeProvider| New: " + filesNew.size() + ", modified: " + filesChanged.size() +
                                ", hijacked:" + filesHijacked.size() + ", ignored: " + filesIgnored.size() );
    }
  }