Package tool.repository

Examples of tool.repository.RepositorySession


                file.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ONE);
              } catch (CoreException e) {
                ToolPlugin.showError("Error deleting file markers", e);
              }
              IProject project = file.getProject();
              RepositorySession session = RepositorySession.getRepositorySession(project);
              if (session != null){
               
                if (session.isJustRefreshed())
                  return false;
               
                IFolder plan = (IFolder) file.getParent();
               
                String result;
                try {
                  if (!session.isRepositoryOpen()){
                    session.openRepository();
                  }
                  if (!session.isWorkspaceOpen()){
                    session.openWorkspace();
                  }
                  mon.subTask("Compiling: " + file.getName());
                  result = session.compileComponent(plan.getName(), file.getLocation().toPortableString());
                  if (result != null)
                    processCompileErrors(file, result);
                } catch (NotConnectedException e) {
                  ToolPlugin.showError("Tool System Exception", e);
                } catch (CommandException e) {
View Full Code Here


 
  protected void setupResourceChangeListener(){
    IResourceChangeListener rcl = new IResourceChangeListener() {
      public void resourceChanged(IResourceChangeEvent event) {
        IProject project = event.getResource().getProject();
        RepositorySession session = RepositorySession.getRepositorySession(project);
        if (session != null){
          try {
            if (session.isWorkspaceOpen()){
              session.closeWorkspace();
            }
            if (session.isRepositoryOpen()){
              session.closeRepository();
            }
            session.killInterfaceProcess();
          } catch (NotConnectedException e) {
            log(IStatus.WARNING, "Error terminating repository interface", e);
          } catch (CommandException e) {
            log(IStatus.WARNING, "Error terminating repository interface", e);
          }
View Full Code Here

TOP

Related Classes of tool.repository.RepositorySession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.